Skip to content

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