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

fix(dspy): Loosen pydantic version #807

Merged
merged 4 commits into from
Apr 17, 2024
Merged

fix(dspy): Loosen pydantic version #807

merged 4 commits into from
Apr 17, 2024

Conversation

isaacbmiller
Copy link
Collaborator

Loosen Pydantic version restriction to be >= 2.0

Reasoning is from #570

@isaacbmiller isaacbmiller marked this pull request as ready for review April 14, 2024 19:29
@isaacbmiller
Copy link
Collaborator Author

@thomasahle Would you anticipate any issues with this change?

@isaacbmiller isaacbmiller requested a review from thomasahle April 14, 2024 19:40
@isaacbmiller
Copy link
Collaborator Author

I could also cap at 2.7

@@ -82,7 +82,7 @@ keywords = ["dspy", "ai", "language models", "llm", "openai"]

[tool.poetry.dependencies]
python = ">=3.9,<3.12"
pydantic = ">=2.5.0,<=2.7"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use pydantic="^2.0" which also ensures that it would be <3.0.0. See https://python-poetry.org/docs/dependency-specification/

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. Thanks!

@isaacbmiller isaacbmiller merged commit aa56d03 into main Apr 17, 2024
4 checks passed
@isaacbmiller isaacbmiller deleted the loosen-pydantic branch April 17, 2024 14:59
@arnavsinghvi11
Copy link
Collaborator

@isaacbmiller this merged PR has errors with pyproject.toml. can you take a look and fix it?

Resolved https://github.com/stanfordnlp/dspy.git to commit d0e455a10797bef7e6793ae2fb64e0aa64555d12
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [46 lines of output]
      configuration error: `project.dependencies[{data__dependencies_x}]` must be pep508
      DESCRIPTION:
          Project dependency specification according to PEP 508
      
      GIVEN VALUE:
          "pydantic=^2.0"
      
      OFFENDING RULE: 'format'
      
      DEFINITION:
          {
              "$id": "#/definitions/dependency",
              "title": "Dependency",
              "type": "string",
              "format": "pep508"
          }
      Traceback (most recent call last):
             ValueError: invalid pyproject.toml config: `project.dependencies[{data__dependencies_x}]`.
      configuration error: `project.dependencies[{data__dependencies_x}]` must be pep508
      [end of output]

@isaacbmiller
Copy link
Collaborator Author

Oops. Thanks for catching. will follow up soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants