AutoGluon-Cloud 常见问题#
支持的 Docker 容器#
autogluon.cloud
支持 AutoGluon 深度学习容器 0.6.0 及更新版本。
如何使用 AutoGluon 容器的先前版本#
默认情况下,autogluon.cloud
将获取最新版本的 AutoGluon DLC。但是,您可以通过向 fit/inference API 提供 framework_version
来访问先前版本,例如
cloud_predictor.fit(..., framework_version="0.6")
始终建议使用最新版本,因为它包含更多功能和最新的安全补丁。
如何使用自定义容器#
尽管不建议,但 autogluon.cloud
支持通过指定 custom_image_uri
来使用您的自定义容器。
cloud_predictor.fit(..., custom_image_uri="CUSTOM_IMAGE_URI")
cloud_predictor.predict_real_time(..., custom_image_uri="CUSTOM_IMAGE_URI")
cloud_predictor.predict(..., custom_image_uri="CUSTOM_IMAGE_URI")
如果此自定义镜像位于某个 ECR 下,您需要授予云模块使用的 IAM 角色访问权限。
遇到权限问题#
您可以通过以下方式尝试获取必要的 IAM 权限和信任关系:
from autogluon.cloud import TabularCloudPredictor # Can be other CloudPredictor as well
TabularCloudPredictor.generate_default_permission(
backend="BACKNED_YOU_WANT" # We currently support sagemaker and ray_aws
account_id="YOUR_ACCOUNT_ID", # The AWS account ID you plan to use for CloudPredictor.
cloud_output_bucket="S3_BUCKET" # S3 bucket name where intermediate artifacts will be uploaded and trained models should be saved. You need to create this bucket beforehand.
)
上面的实用函数将为您提供两个 json 文件,分别描述信任关系和 IAM 策略。请务必在使用前仔细查看这些文件,并根据您的用例进行必要的更改。
我们建议您为您的 IAM 用户创建一个 IAM 角色进行委托,因为 IAM 角色没有永久的长期凭证,并且用于直接与 AWS 服务交互。请参考此教程来
使用您上面生成的信任关系和 IAM 策略创建 IAM 角色
设置凭证
承担角色