-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
train.py: error: unrecognized arguments: --local-rank=0 #134
Comments
Change parser.add_argument('--local_rank', type=int, default=0) To parser.add_argument('--local-rank', type=int, default=0) And I didn't add os.environ['RANK'] = str(0) |
thanks,when i try to use torchrun it reported:”can not open python:no such file“,when i follow your change,it works! |
It seems that "local-rank" with a "-" in the middle instead of "_" doesn't follow the naming rule in Python. |
Hi, I had this issue when I tried to debug from VSCode by setting the I hope it helps |
usage: train.py [-h] -opt OPT [--launcher {none,pytorch,slurm}] [--local-rank LOCAL_RANK] |
Encounter this error when trying to train GoPro datasets:
python -m torch.distributed.launch --nproc_per_node=1 --master_port=4321 train.py -opt options/train/GoPro/NAFNet-width32.yml --launcher pytorch
I searched the train.py, there is no
--local-rank=0
.How to fix?
The text was updated successfully, but these errors were encountered: