欢迎光临
我们一直在努力

【Bug已解决】[BUG] AutoEP breaks Python 3.9 compatibility -- `TypeError: unsupported operand type(s) for

【Bug已解决】[BUG] AutoEP breaks Python 3.9 compatibility — `TypeError: unsupported operand type(s) for |: \’type\’ and \’NoneType\’“ 解决方案

一、现象长什么样

在 Python 3.9 环境里跑启用了 AutoEP(自动专家并行) 的 DeepSpeed,导入模块或初始化时直接炸:

TypeError: unsupported operand type(s) for |: \’type\’ and \’NoneType\’

或更完整:

File \”deepspeed/runtime/auto_ep.py\”, line 42, in <module>
def foo(x: int | None) -> None: …
TypeError: unsupported operand type(s) for |: \’type\’ and \’NoneType\’

现象特征:

  • 只在 Python 3.9(及更低)失败,Python 3.10+ 正常;
  • 报错发生在函数注解/类型注解的求值阶段(模块导入即触发),不是运行时逻辑错误;
  • 报错信息精确指向 X | None 这种PE
赞(0)
未经允许不得转载:171主机测评 » 【Bug已解决】[BUG] AutoEP breaks Python 3.9 compatibility -- `TypeError: unsupported operand type(s) for
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址