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

partners: support reading HuggingFace params from env #23309

Merged
merged 2 commits into from
Jul 2, 2024

Conversation

Zizo-Vi
Copy link
Contributor

@Zizo-Vi Zizo-Vi commented Jun 23, 2024

Description:

  1. partners/HuggingFace module support reading params from env. Not adjust langchain_community/.../huggingfaceXX modules since they are deprecated.
  2. pydantic 2 @root_validator migration.

Issue: #22448 #22819

@efriis efriis added the partner label Jun 23, 2024
@efriis efriis self-assigned this Jun 23, 2024
Copy link

vercel bot commented Jun 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Jun 23, 2024 3:09am

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. 🔌: huggingface Primarily related to HuggingFace integrations 🤖:improvement Medium size change to existing code to handle new use-cases labels Jun 23, 2024
@Zizo-Vi
Copy link
Contributor Author

Zizo-Vi commented Jul 1, 2024

@efriis Please review and merge.

@@ -46,11 +46,15 @@ class Config:

extra = Extra.forbid

@root_validator()
@root_validator(pre=False, skip_on_failure=True)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be pre=True based on the logic below -- all of it can be done as pre-init logic

Just requires re-writing values['model'] to values.get('model')

Copy link
Collaborator

Choose a reason for hiding this comment

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

Merging as is, but if you can please re-write this with pre=True

@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Jul 2, 2024
@eyurtsev eyurtsev merged commit ee5eedf into langchain-ai:master Jul 2, 2024
25 checks passed
@eyurtsev eyurtsev added the 0.3 prep Work done for 0.3 prep label Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.3 prep Work done for 0.3 prep 🔌: huggingface Primarily related to HuggingFace integrations 🤖:improvement Medium size change to existing code to handle new use-cases lgtm PR looks good. Use to confirm that a PR is ready for merging. partner size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants