AWS 文档 AWS SDK示例 GitHub 存储库中还有更多SDK示例
本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
DeleteDataset
搭配使用 AWS SDK
以下代码示例演示如何使用 DeleteDataset
。
有关更多信息,请参阅删除数据集。
- Python
-
- SDK适用于 Python (Boto3)
-
注意
还有更多相关信息 GitHub。查找完整示例,学习如何在 AWS 代码示例存储库
中进行设置和运行。 class Datasets: @staticmethod def delete_dataset(lookoutvision_client, project_name, dataset_type): """ Deletes a Lookout for Vision dataset :param lookoutvision_client: A Boto3 Lookout for Vision client. :param project_name: The name of the project that contains the dataset that you want to delete. :param dataset_type: The type (train or test) of the dataset that you want to delete. """ try: logger.info( "Deleting the %s dataset for project %s.", dataset_type, project_name ) lookoutvision_client.delete_dataset( ProjectName=project_name, DatasetType=dataset_type ) logger.info("Dataset deleted.") except ClientError: logger.exception("Service error: Couldn't delete dataset.") raise
-
有关API详细信息,请参阅DeleteDataset中的 AWS SDKPython (Boto3) API 参考。
-
CreateProject
DeleteModel