GitHub에 더 많은 내용이 있습니다. AWS 코드 예시 리포지토리에서 전체 예시를 찾고 설정 및 실행하는 방법을 배워보세요.
class Models:
@staticmethod
def describe_models(lookoutvision_client, project_name):
"""
Gets information about all models in a Lookout for Vision project.
:param lookoutvision_client: A Boto3 Lookout for Vision client.
:param project_name: The name of the project that you want to use.
"""
try:
response = lookoutvision_client.list_models(ProjectName=project_name)
print("Project: " + project_name)
for model in response["Models"]:
Models.describe_model(
lookoutvision_client, project_name, model["ModelVersion"]
)
print()
print("Done...")
except ClientError:
logger.exception("Couldn't list models.")
raise
API 세부 정보는 AWS SDK for Python (Boto3) API 참조의 ListModels를 참조하십시오.