[PR #643] fixed finetune requirements.txt #275

Open
opened 2026-10-26 21:05:15 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/DeepSeek-Coder/pull/643
Author: @komaksym
Created: 3/6/2025
Status: 🔄 Open

Base: main ← Head: test


📝 Commits (1)

  • ff84325 fixed finetune requirements.txt

📊 Changes

2 files changed (+5 additions, -1 deletions)

View changed files

➕ finetune/install.sh (+4 -0)
📝 finetune/requirements.txt (+1 -1)

📄 Description

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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/deepseek-ai/DeepSeek-Coder/pull/643 **Author:** [@komaksym](https://github.com/komaksym) **Created:** 3/6/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `test` --- ### 📝 Commits (1) - [`ff84325`](https://github.com/deepseek-ai/DeepSeek-Coder/commit/ff8432500b991b73600f82847da0afb7f7b1807b) fixed finetune requirements.txt ### 📊 Changes **2 files changed** (+5 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `finetune/install.sh` (+4 -0) 📝 `finetune/requirements.txt` (+1 -1) </details> ### 📄 Description 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 ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepSeek-Coder#275
No description provided.