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

[Docker] Update Dockerfile to force-use transformers main #1085

Merged
merged 3 commits into from
Nov 7, 2023

Conversation

younesbelkada
Copy link
Contributor

What does this PR do?

Optimum pins transformers to <4.35.0, leading our docker images to have transformers==4.34.1, which is not intended since we want to test PEFT against transformers and accelerate main

This PR fixes it, there is no need to update the cpu docker file as optimum is not installed there

cc @pacman100 @BenjaminBossan

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Nov 6, 2023

The documentation is not available anymore as the PR was closed or merged.

Copy link
Member

@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

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

Making this change should be fine. We are, however, changing what exactly we're testing here, going from latest transformers release to transformers main. We could, theoretically, also do a pip install -U transformers after installing optimum to get the latest transformers release, ignoring the pin from optimum.

If we do opt to go with transformers main, we should show the commit hash to allow us to debug potential failures, e.g. by running pip freeze | grep transformers.

@younesbelkada
Copy link
Contributor Author

@BenjaminBossan as far as I know we've been always testing on transformers main: https://github.com/huggingface/peft/blob/main/docker/peft-gpu/Dockerfile#L38 except until the latest optimum release

@BenjaminBossan
Copy link
Member

Oh, so this is more of a problem of the order in which the packages are installed. Is there a reason why bitsandbytes optimum auto-gptq are installed in a separate block further down below? Maybe they should be installed in the first block, and then we add a second block to install every package that needs to be installed from source? Otherwise, we are prone to run into similar issues in the future if any dependency adds another pin to a version.

@younesbelkada
Copy link
Contributor Author

Makes sense yes, let me update that as well

Copy link
Member

@BenjaminBossan BenjaminBossan 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 investigating this issue and providing a solution, looks good.

@younesbelkada
Copy link
Contributor Author

Thanks @BenjaminBossan !

@younesbelkada younesbelkada merged commit 46e0360 into main Nov 7, 2023
11 checks passed
@younesbelkada younesbelkada deleted the younesbelkada-fix-docker-image branch December 18, 2023 10:01
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