feature: Add dataset fetch retry and update tests with new word sets references#64
Merged
pbadillatorrealba merged 2 commits intodevelopfrom Jul 29, 2025
Merged
feature: Add dataset fetch retry and update tests with new word sets references#64pbadillatorrealba merged 2 commits intodevelopfrom
pbadillatorrealba merged 2 commits intodevelopfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates word set references from unpleasant_5 to unpleasant_5a throughout the codebase to maintain consistency with updated word sets.
Key Changes:
- Replaced all references to
unpleasant_5withunpleasant_5aacross test files, documentation, and utility functions - Updated query definitions in test fixtures and conftest files
- Modified documentation examples to use the new word set reference
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_utils.py | Updated query definitions to use unpleasant_5a |
| tests/test_query.py | Updated test cases and query objects to reference unpleasant_5a |
| tests/test_preprocessing.py | Updated query fixtures and test functions to use unpleasant_5a |
| tests/test_datasets.py | Updated expected word set list to include unpleasant_5a |
| tests/metrics/conftest.py | Updated query fixtures to use unpleasant_5a |
| tests/debias/test_multiclass_hard_debias.py | Updated attribute list to use unpleasant_5a |
| tests/debias/test_hard_debias.py | Updated attribute list to use unpleasant_5a |
| tests/debias/test_half_sibling_regression.py | Updated attribute list to use unpleasant_5a |
| tests/debias/test_double_hard_debias.py | Updated commented code to use unpleasant_5a |
| tests/debias/conftest.py | Updated query fixtures and labels to use unpleasant_5a |
| docs/user_guide/mitigation_user_guide.rst | Updated documentation examples to use unpleasant_5a |
| docs/user_guide/measurement_user_guide.rst | Updated documentation examples to use unpleasant_5a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates several queries and tests to replace the
unpleasant_5word set with a newunpleasant_5aword set. Additionally, it introduces a new_retry_requestfunction with comprehensive test coverage for retrying network requests. Below is a breakdown of the most important changes grouped by theme:Query Updates:
docs/user_guide/measurement_user_guide.rstanddocs/user_guide/mitigation_user_guide.rstto useunpleasant_5ainstead ofunpleasant_5for bias measurements. [1] [2] [3] [4]Test Updates:
tests/debias/conftest.pyandtests/metrics/conftest.pyto reflect the change fromunpleasant_5tounpleasant_5ain various queries. [1] [2] [3] [4]tests/debiasandtests/test_preprocessing.pyto ensure compatibility with the newunpleasant_5aword set. [1] [2] [3] [4]New Retry Functionality:
_retry_requestfunction intests/test_datasets.pyto handle retries for network requests, including support for exponential backoff and handling specific exceptions like HTTP 429 (rate limit) and timeout errors._retry_requestto validate its behavior under various scenarios, such as success on first attempt, rate limit errors, timeout errors, and non-retryable HTTP errors.Dataset Updates:
tests/test_datasets.pyto include the newunpleasant_5aandunpleasant_5bword sets for validation.These changes ensure consistency across the codebase for the updated word set and enhance the robustness of network request handling.