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(community): Migrate xenova transformers lib to huggingface #7431

Merged

Conversation

PylotLight
Copy link
Contributor

Fixes # (issue)

  • Update all xenova npm pkg references to huggingface and update lib version to latest.
  • Noting I have tested building which worked successfully for me after reference changes were made.

I tested the build with the following dockerfile for reference:

FROM node:18-slim
WORKDIR /usr/src
RUN apt-get update \
 && apt-get install -y --no-install-recommends \
    git \
    build-essential \
    python3 \
    python3-pip \
 && apt-get clean \
 && rm -rf /var/lib/apt/lists/*

RUN corepack enable \
 && corepack prepare [email protected] --activate

COPY . .

WORKDIR /usr/src/libs/langchain-community
RUN yarn

WORKDIR /usr/src/langchain-core
RUN yarn && yarn build

WORKDIR /usr/src/app
CMD ["/bin/bash"]

image

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Dec 26, 2024
Copy link

vercel bot commented Dec 26, 2024

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

Name Status Preview Comments Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview Dec 31, 2024 1:38am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) Dec 31, 2024 1:38am

@dosubot dosubot bot added the auto:nit Small modifications/deletions, fixes, deps or improvements to existing code or docs label Dec 26, 2024
@PylotLight
Copy link
Contributor Author

I didn't touch docs, not sure why that check is failing and if there's anything I can do about it. I can't see logs of what the issue is either.

Update @xenova/transformers npm package references to @huggingface/transformers
Copy link
Collaborator

@jacoblee93 jacoblee93 left a comment

Choose a reason for hiding this comment

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

Thanks for this!

Would be nice to have some kind of fallback so that it fails gracefully for people using the old package - can take over and look into it!

@PylotLight
Copy link
Contributor Author

PylotLight commented Dec 30, 2024

Thanks for this!

Would be nice to have some kind of fallback so that it fails gracefully for people using the old package - can take over and look into it!

Please do!
Let me know if there's anything I can help with.

Update:
Added my own version to consider

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Dec 30, 2024
@jacoblee93 jacoblee93 force-pushed the migrate_xenova_HFtransformers branch from 2783dc3 to bc344d1 Compare December 31, 2024 01:24
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Dec 31, 2024
@jacoblee93
Copy link
Collaborator

Hey @PylotLight - given how finicky bundlers can be I think it's safer to just make it a new entrypoint and deprecate the old one

I've done that here. Will merge and ship tonight or tomorrow!

@jacoblee93 jacoblee93 added the lgtm PRs that are ready to be merged as-is label Dec 31, 2024
@PylotLight
Copy link
Contributor Author

Hey @PylotLight - given how finicky bundlers can be I think it's safer to just make it a new entrypoint and deprecate the old one

I've done that here. Will merge and ship tonight or tomorrow!

Love it!
Thank you for pushing this =]

@jacoblee93 jacoblee93 merged commit 7e7df50 into langchain-ai:main Dec 31, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:nit Small modifications/deletions, fixes, deps or improvements to existing code or docs lgtm PRs that are ready to be merged as-is size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants