SageMaker TF 2.3分布式培训

2024-06-01 02:25:00 发布

您现在位置:Python中文网/ 问答频道 /正文

使用SageMaker v2.29.2和Tensorflow v2.3.2,我试图实现分布式培训,如以下博客文章所述:

https://docs.aws.amazon.com/sagemaker/latest/dg/model-parallel-customize-training-script-tf.html#model-parallel-customize-training-script-tf-23

但是,我在导入SMC分布式脚本时遇到困难

这是我的密码:

import tensorflow as tf
import smdistributed.modelparallel.tensorflow as smp

错误:

Traceback (most recent call last):
  File "temp.py", line 2, in <module>
    import smdistributed.modelparallel.tensorflow as smp
ModuleNotFoundError: No module named 'smdistributed'

我错过了什么


Tags: importmodelparalleltftensorflowastraining分布式
1条回答
网友
1楼 · 发布于 2024-06-01 02:25:00

smdistributed仅在SageMaker容器上可用。特定TensorFlow版本支持它,您必须添加:

distribution={'smdistributed': {
            'dataparallel': {
                'enabled': True
            }
        }}

关于估计码,以使其成为可能

相关问题 更多 >