-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update dataclasses.replace calls in DefaultRetryStrategy #112
Update dataclasses.replace calls in DefaultRetryStrategy #112
Commits on Sep 4, 2024
-
Update dataclasses.replace calls in DefaultRetryStrategy
This pull request addresses issue #111 by updating the `dataclasses.replace` calls to `call_args.model_copy(update={...})` in the `DefaultRetryStrategy` class. This change is necessary because `SpiceCallArgs` has been converted from a dataclass to a Pydantic model. The updates ensure that the retry strategy correctly modifies the `temperature` attribute of `call_args` based on the attempt number.
Configuration menu - View commit details
-
Copy full SHA for b9e2fe0 - Browse repository at this point
Copy the full SHA b9e2fe0View commit details -
Update dataclasses.replace calls in DefaultRetryStrategy
This commit further addresses issue #111 by updating additional `dataclasses.replace` calls to `call_args.model_copy(update={...})` in the `spice/models.py` file. This change is necessary because `SpiceCallArgs` has been converted from a dataclass to a Pydantic model. The updates ensure that the model copying mechanism is consistent across the codebase. Additionally, the unnecessary import of `dataclasses` has been removed from `default_strategy.py`.
Configuration menu - View commit details
-
Copy full SHA for 31be854 - Browse repository at this point
Copy the full SHA 31be854View commit details -
CI fix: Fix CI failure due to formatting issue
This commit addresses the CI failure in pull request #112 by reformatting the `spice/models.py` file to comply with the required code style. The `model_copy` call has been split into multiple lines to ensure proper formatting. This change should resolve the CI error and allow the pull request to pass the checks.
Configuration menu - View commit details
-
Copy full SHA for 0cdea61 - Browse repository at this point
Copy the full SHA 0cdea61View commit details -
CI fix: Fix CI failure due to formatting issue
This commit addresses a CI failure caused by a formatting issue in `spice/models.py`. The file has been reformatted to comply with the project's code style guidelines. This should resolve the CI failure and allow the pull request to pass all checks.
Configuration menu - View commit details
-
Copy full SHA for f139c96 - Browse repository at this point
Copy the full SHA f139c96View commit details -
Incorporate feedback to maintain dataclass usage for Model class
Reverted changes in `spice/models.py` to keep using `dataclasses.replace` for the `Model` class, as it remains a dataclass. Updated only the `SpiceCallArgs`-related code in `DefaultRetryStrategy` to use `model_copy` for Pydantic model updates. This ensures correct handling of both dataclasses and Pydantic models.
Configuration menu - View commit details
-
Copy full SHA for 6e6d7f1 - Browse repository at this point
Copy the full SHA 6e6d7f1View commit details -
CI fix: Fix CI failure due to incorrect attribute access in models.py
This commit addresses a CI failure caused by an incorrect attribute access in `spice/models.py`. The error was due to attempting to access the `model_copy` attribute on a class that does not have it. The fix involves reverting the change to use `dataclasses.replace` for the `Model` class, which is still a dataclass, while keeping the `model_copy` usage for the `SpiceCallArgs` class, which has been converted to a Pydantic model. This ensures compatibility and correct behavior for both dataclasses and Pydantic models in our codebase.
Configuration menu - View commit details
-
Copy full SHA for 8572625 - Browse repository at this point
Copy the full SHA 8572625View commit details -
CI fix: Fix CI failure due to incorrect attribute access in models.py
This commit addresses a CI failure caused by an incorrect attribute access in `models.py`. The error was due to attempting to access the `model_copy` attribute on a dataclass, which does not exist. The fix involves reverting the change to use `dataclasses.replace` for the `Model` class while keeping the `model_copy` method for the `SpiceCallArgs` class, which is a Pydantic model. This ensures compatibility and correct behavior for both dataclasses and Pydantic models in our codebase.
Configuration menu - View commit details
-
Copy full SHA for 81e4434 - Browse repository at this point
Copy the full SHA 81e4434View commit details
Commits on Sep 5, 2024
-
Configuration menu - View commit details
-
Copy full SHA for f44adfe - Browse repository at this point
Copy the full SHA f44adfeView commit details