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

fixed finetune requirements.txt #643

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

komaksym
Copy link

@komaksym komaksym commented Mar 6, 2025

Fixes #642

Fix

  1. ImportError: cannot import name 'BUFSIZE' from 'numpy' (/root/finetune/lib/python3.10/site-packages/numpy/__init__.py)
    Solution: numpy<2.0.0 is required.
  2. AttributeError: 'DeepSpeedCPUAdam' object has no attribute 'ds_opt_adam'
    Solution: deepspeed installation with an environmental variable DS_BUILD_CPU_ADAM set to 1 is required.
  3. But pydantic_core._pydantic_core.ValidationError: 1 validation error for DeepSpeedZeroConfig will be thrown if we install the specified in the source requirements.txt version of deepspeed (ver. 0.12.2) with the aforementioned env var set to 1.
    Solution: DS_BUILD_CPU_ADAM=1 pip install deepspeed==0.14.5

Since we can't specify environmental variables in requirements.txt I added a shell script that installs everything in the fixed requirements.txt and the correct deepspeed version with the required env var set to 1 to fix the issue №2.

Install

To install fixed dependancies:

cd finetune/
./install.sh

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.

finetune/requirements.txt dependancy issues
1 participant