TabularCloudPredictor.deploy#

TabularCloudPredictor.deploy(predictor_path: Optional[str] = None, endpoint_name: Optional[str] = None, framework_version: str = 'latest', instance_type: str = 'ml.m5.2xlarge', initial_instance_count: int = 1, custom_image_uri: Optional[str] = None, volume_size: Optional[int] = None, wait: bool = True, backend_kwargs: Optional[Dict] = None) None#

将预测器部署到端点,后续可用于实时推理。

参数
  • predictor_path (str) – 你想部署的预测器 tarball 路径。路径可以是本地路径或 S3 位置。如果为 None,将部署使用 fit() 训练的最新预测器。

  • endpoint_name (str) – 用于部署的端点名称。如果为 None,CloudPredictor 将创建一个以 ag-cloudpredictor 为前缀的名称。

  • framework_version (str, default = latest) – autogluon 推理容器版本。如果为 latest,将使用最新的可用容器版本。如果提供了特定版本,将使用此版本。如果设置了 custom_image_uri,此参数将被忽略。

  • instance_type (str, default = 'ml.m5.2xlarge') – 用于部署端点的实例类型。

  • initial_instance_count (int, default = 1,) – 用于部署端点的初始实例数量。

  • custom_image_uri (Optional[str], default = None,) – 用于部署端点的自定义镜像。如果未指定,将使用官方 DLC 镜像: https://github.com/aws/deep-learning-containers/blob/master/available_images.md#autogluon-inference-containers

  • volumes_size (int, default = None) – 用于端点的 EBS 卷大小,单位为 GB(默认值:None)。SageMaker GPU 实例端点当前不支持指定 volumes_size。在这种情况下将忽略此参数。

  • wait (Bool, default = True,) – 是否等待端点部署完成。需要注意的是,函数不会立即返回,因为部署前需要一些准备工作。

  • backend_kwargs (dict, default = None) –

    传递给底层后端的任何额外参数。对于 SageMaker 后端,有效键包括:

    1. model_kwargs: dict, default = dict()

      初始化 Sagemaker Model 所需的任何额外参数。有关所有选项,请参阅 https://sagemaker.readthedocs.io/en/stable/api/inference/model.html#model

    2. deploy_kwargs

      传递给 deploy 的任何额外参数。有关所有选项,请参阅 https://sagemaker.readthedocs.io/en/stable/api/inference/model.html#sagemaker.model.Model.deploy