DeepSpeed icon indicating copy to clipboard operation
DeepSpeed copied to clipboard

training.log[BUG]

Open haoyu-lab opened this issue 1 year ago • 3 comments

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

haoyu-lab avatar Apr 15 '23 05:04 haoyu-lab

Here are some steps to resolve this issue:

  1. Check if DeepSpeed is installed: Run pip list or pip freeze in your terminal to see if DeepSpeed is installed in your current Python environment. If DeepSpeed is not listed, install it using pip install deepspeed.

  2. 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.

  3. 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 running export 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).

  4. 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.

  5. 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.

hemangjoshi37a avatar Apr 15 '23 09:04 hemangjoshi37a

Here are some steps to resolve this issue:

  1. Check if DeepSpeed is installed: Run pip list or pip freeze in your terminal to see if DeepSpeed is installed in your current Python environment. If DeepSpeed is not listed, install it using pip install deepspeed.
  2. 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.
  3. 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 running export 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).
  4. 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.
  5. 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 image

haoyu-lab avatar Apr 15 '23 11:04 haoyu-lab

@haoyu-lab if you run which deepspeed, do you see any output? How did you install deepspeed? Is this in a virtual environment?

mrwyattii avatar Apr 17 '23 17:04 mrwyattii

I got the same bug, pip list shows deepspeed but I cannot find the executable with find (dirname $(which python)))/ -name deepspeed

Screenshot 2023-07-10 at 14 40 44

Screenshot 2023-07-10 at 14 43 33

Any tips for that?

rguo12 avatar Jul 10 '23 13:07 rguo12

For my case, it does not work for Python 3.8, but works for Python 3.10.

rguo12 avatar Jul 10 '23 14:07 rguo12