我尝试在 amazon sagemaker studio 上训练一个 pytorch 模型。
当我使用 EC2 进行以下培训时,它可以正常工作:
estimator = PyTorch(entry_point='train_script.py',
role=role,
sagemaker_session = sess,
train_instance_count=1,
train_instance_type='ml.c5.xlarge',
framework_version='1.4.0',
source_dir='.',
git_config=git_config,
)
estimator.fit({'stockdata': data_path})
它在经典 sagemaker 笔记本(非工作室)中使用本地模式:
estimator = PyTorch(entry_point='train_script.py',
role=role,
train_instance_count=1,
train_instance_type='local',
framework_version='1.4.0',
source_dir='.',
git_config=git_config,
)
estimator.fit({'stockdata': data_path})
但是,当我在 sagemaker studio 上使用相同的代码(使用 train_instance_type='local')时,它不起作用,并且出现以下错误:没有这样的文件或目录:'docker':'docker'
我尝试使用 pip install 安装 docker,但是如果在终端中使用它,则找不到 docker 命令
最佳答案
这表明在查找 Docker 服务时出现问题。
默认情况下,Docker 未安装在 SageMaker Studio ( confirming github ticket response ) 中。
关于docker - 没有这样的文件或目录 : 'docker' : 'docker' when running sagemaker studio in local mode,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61520346/