【报错】macos+python+分布式训练

Downloads/loca-main/train.py

Traceback (most recent call last):

File "/Users/dearr/Downloads/loca-main/train.py", line 222, in <module>

train(args)

File "/Users/dearr/Downloads/loca-main/train.py", line 32, in train

world_size = int(os.environ['WORLD_SIZE'])

File "/Users/dearr/anaconda3/envs/pytorch/lib/python3.8/os.py", line 675, in getitem

raise KeyError(key) from None
KeyError: 'WORLD_SIZE'

分布式训练出现这个错误的解决办法:KeyError:'RANK'_keyerror: 'rank-CSDN博客

(pytorch) (base) dearr@dearrdeMacBook-Air loca-main % /Users/dearr/anaconda3/envs/pytorch/bin/python /Users/dearr/

Downloads/loca-main/train.py

Traceback (most recent call last):

File "/Users/dearr/Downloads/loca-main/train.py", line 224, in <module>

train(args)

File "/Users/dearr/Downloads/loca-main/train.py", line 36, in train

gpu = int(os.environ['LOCAL_RANK'])

File "/Users/dearr/anaconda3/envs/pytorch/lib/python3.8/os.py", line 675, in getitem

raise KeyError(key) from None
KeyError: 'LOCAL_RANK'

(pytorch) (base) dearr@dearrdeMacBook-Air loca-main % export LOCAL_RANK=0

(pytorch) (base) dearr@dearrdeMacBook-Air loca-main % /Users/dearr/anaconda3/envs/pytorch/bin/python /Users/dearr/Dow

nloads/loca-main/dearRongerr.py

Traceback (most recent call last):

File "/Users/dearr/Downloads/loca-main/dearRongerr.py", line 25, in <module>

print(os.environ['RANK'])

File "/Users/dearr/anaconda3/envs/pytorch/lib/python3.8/os.py", line 675, in getitem

raise KeyError(key) from None
KeyError: 'RANK'

相关推荐
杨荧5 分钟前
【JAVA毕业设计】基于Vue和SpringBoot的服装商城系统学科竞赛管理系统
java·开发语言·vue.js·spring boot·spring cloud·java-ee·kafka
白子寰11 分钟前
【C++打怪之路Lv14】- “多态“篇
开发语言·c++
yannan2019031311 分钟前
【算法】(Python)动态规划
python·算法·动态规划
蒙娜丽宁21 分钟前
《Python OpenCV从菜鸟到高手》——零基础进阶,开启图像处理与计算机视觉的大门!
python·opencv·计算机视觉
光芒再现dev23 分钟前
已解决,部署GPTSoVITS报错‘AsyncRequest‘ object has no attribute ‘_json_response_data‘
运维·python·gpt·语言模型·自然语言处理
王俊山IT23 分钟前
C++学习笔记----10、模块、头文件及各种主题(一)---- 模块(5)
开发语言·c++·笔记·学习
为将者,自当识天晓地。25 分钟前
c++多线程
java·开发语言
小政爱学习!27 分钟前
封装axios、环境变量、api解耦、解决跨域、全局组件注入
开发语言·前端·javascript
小李飞刀李寻欢35 分钟前
Mac电脑如何解压rar压缩包
macos·rar·解压
Java小白笔记36 分钟前
Mac中禁用系统更新
macos