Skip to content
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

Merged
merged 8 commits into from
Sep 5, 2024

Commits on Sep 4, 2024

  1. 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.
    mentatai[bot] committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    b9e2fe0 View commit details
    Browse the repository at this point in the history
  2. 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`.
    mentatai[bot] committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    31be854 View commit details
    Browse the repository at this point in the history
  3. 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.
    mentatai[bot] committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    0cdea61 View commit details
    Browse the repository at this point in the history
  4. 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.
    mentatai[bot] committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    f139c96 View commit details
    Browse the repository at this point in the history
  5. 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.
    mentatai[bot] committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    6e6d7f1 View commit details
    Browse the repository at this point in the history
  6. 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.
    mentatai[bot] committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    8572625 View commit details
    Browse the repository at this point in the history
  7. 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.
    mentatai[bot] committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    81e4434 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2024

  1. version

    scotttestbot[bot] committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    f44adfe View commit details
    Browse the repository at this point in the history