DeepSpeed
DeepSpeed copied to clipboard
training.log[BUG]
Displayed in the training.log file /Users/houhaoyu/Desktop/DeepSpeedExamples/applications/DeepSpeed-Chat/training/step1_supervised_finetuning/training_scripts/single_gpu/run_1.3b.sh: line 18: deepspeed: command not found
Here are some steps to resolve this issue:
-
Check if DeepSpeed is installed: Run
pip list
orpip freeze
in your terminal to see if DeepSpeed is installed in your current Python environment. If DeepSpeed is not listed, install it usingpip install deepspeed
. -
Find the DeepSpeed executable: If DeepSpeed is installed, locate the DeepSpeed executable by running
find $(dirname $(dirname $(which python)))/ -name deepspeed
. This command will search for the DeepSpeed executable within the Python environment's directories. -
Add the DeepSpeed executable to the PATH: Once you've found the DeepSpeed executable, add its parent directory to your system's
PATH
variable. You can do this by runningexport PATH=$PATH:/path/to/deepspeed/executable/parent/directory
in your terminal. Replace/path/to/deepspeed/executable/parent/directory
with the actual path to the directory containing the DeepSpeed executable. To make this change permanent, add the same export command to your shell's startup script (e.g., ~/.bashrc, ~/.zshrc, or ~/.bash_profile). -
Verify the DeepSpeed command is available: After adding the DeepSpeed executable to your PATH, run which deepspeed in the terminal. This command should now return the path to the DeepSpeed executable. If it still says "command not found," ensure that you've correctly updated the PATH variable and that the DeepSpeed executable is present in the specified directory.
-
Run the script again: After confirming that the DeepSpeed command is available in your terminal, try running the run_1.3b.sh script again.
If the issue persists after following these steps, consider providing more information in the GitHub issue, such as details about your operating system, Python environment, and any other relevant context. This will help the DeepSpeed maintainers in identifying the root cause and providing a more specific solution.
Here are some steps to resolve this issue:
- Check if DeepSpeed is installed: Run
pip list
orpip freeze
in your terminal to see if DeepSpeed is installed in your current Python environment. If DeepSpeed is not listed, install it usingpip install deepspeed
.- Find the DeepSpeed executable: If DeepSpeed is installed, locate the DeepSpeed executable by running
find $(dirname $(dirname $(which python)))/ -name deepspeed
. This command will search for the DeepSpeed executable within the Python environment's directories.- Add the DeepSpeed executable to the PATH: Once you've found the DeepSpeed executable, add its parent directory to your system's
PATH
variable. You can do this by runningexport PATH=$PATH:/path/to/deepspeed/executable/parent/directory
in your terminal. Replace/path/to/deepspeed/executable/parent/directory
with the actual path to the directory containing the DeepSpeed executable. To make this change permanent, add the same export command to your shell's startup script (e.g., ~/.bashrc, ~/.zshrc, or ~/.bash_profile).- Verify the DeepSpeed command is available: After adding the DeepSpeed executable to your PATH, run which deepspeed in the terminal. This command should now return the path to the DeepSpeed executable. If it still says "command not found," ensure that you've correctly updated the PATH variable and that the DeepSpeed executable is present in the specified directory.
- Run the script again: After confirming that the DeepSpeed command is available in your terminal, try running the run_1.3b.sh script again.
If the issue persists after following these steps, consider providing more information in the GitHub issue, such as details about your operating system, Python environment, and any other relevant context. This will help the DeepSpeed maintainers in identifying the root cause and providing a more specific solution.
find $(dirname $(dirname $(which python)))/ -name deepspeed
The command cannot find the executable
@haoyu-lab if you run which deepspeed
, do you see any output? How did you install deepspeed? Is this in a virtual environment?
I got the same bug, pip list shows deepspeed but I cannot find the executable with find (dirname $(which python)))/ -name deepspeed
Any tips for that?
For my case, it does not work for Python 3.8, but works for Python 3.10.