S95Sedan / Deepspeed-Windows

Deepspeed windows information
Apache License 2.0
30 stars 2 forks source link

Experiencing No module named deepspeed.__main__; 'deepspeed' is a package and cannot be directly executed when called deepspeed #2

Closed xingyunjohn1 closed 9 months ago

xingyunjohn1 commented 9 months ago

my command:python -m deepspeed -V output:

[2023-12-26 03:34:00,919] [INFO] [real_accelerator.py:158:get_accelerator] Setting ds_accelerator to cuda (auto detect)
[2023-12-26 03:34:01,056] torch.distributed.elastic.multiprocessing.redirects: [WARNING] NOTE: Redirects are currently not supported in Windows or MacOs.
D:\anaconda3\envs\cyh-Fuyu\python.exe: No module named deepspeed.__main__; 'deepspeed' is a package and cannot be directly executed

I have tried deepspeed -V, but only get "Open With" window. If I open with notepad, I get

#!D:\anaconda3\python.exe

from deepspeed.launcher.runner import main

if __name__ == '__main__':
    main()
S95Sedan commented 9 months ago

What exactly are you trying to do?

xingyunjohn1 commented 9 months ago

I am trying to run Fuyu-8b on my 4090 and 3090 So I am using deepspeed. But it seems no command runs correctly after installing your whl. Even the deepspeed -V doesn't work as expected. Thanks.

S95Sedan commented 9 months ago

I think you are trying to use the package in a way it isnt designed to. As from what i can see the -m flag only works if the _ main _; file is present, which isnt the case here.

ds_report should show if its installed and functioning. Assuming both CUDA_PATH and CUDA_HOME are set correctly.

image

xingyunjohn1 commented 9 months ago

I change the command and it work for me now. Using python deepspeed. Thanks a lot.