accelerate
accelerate copied to clipboard
Running with Pycharm debugger
I'm trying to run a script with accelerate on Pycharm debugger. I've come across issue-535 and followed the steps. However, I'm getting the following lines of error.
Traceback (most recent call last): File "/home/envs/HF/lib/python3.7/site-packages/accelerate/commands/launch.py", line 280, in simple_launcher mixed_precision = PrecisionType(args.mixed_precision.lower()) AttributeError: 'NoneType' object has no attribute 'lower' python-BaseException
Do I need additional parameters when running with module accelerate.commands.launch?
You need to still configure accelerate. Run accelerate config from thr CLI. This error will be much more clear in the next release.
Here's the new docs talking about launch https://huggingface.co/docs/accelerate/main/en/basic_tutorials/launch
(The helpers it mentions about being able to guess and pass in non-configured launches won't be live until the next release here this week, or install from github following the install directions)
Thanks for the comment!
I configured running accelerate config. However, I'm getting another error. Though it seems like either a python subprocess error or a compatibility problem between accelerate and subprocess, I'm sharing the error message here in case you've seen something similar before.
Traceback (most recent call last):
File "/home/.conda/envs/ltr/lib/python3.7/subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "/home/.conda/envs/ltr/lib/python3.7/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'torchrun': 'torchrun'
python-BaseException
Is pytorch installed? How did you install accelerate?
Pytorch is installed. I installed accelerate through pip install accelerate and ran accelerate config right after.
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
@SeoHyeong
Has you solved the "FileNotFoundError: [Errno 2] No such file or directory: 'torchrun': 'torchrun'" error?
Run into the same bug for some other project.