이 페이지에서는 AutoML Tables를 사용해 커스텀 모델에 대한 정보를 배포, 배포 취소, 나열, 삭제, 가져오는 방법을 설명합니다.
새 모델 학습에 대한 자세한 내용은 학습 모델을 참조하세요.
모델 배포
모델 학습이 끝나면 모델을 배포해야 해당 모델을 이용해 온라인 예측을 요청할 수 있습니다. 일괄 예측은 배포되지 않은 모델에서 요청할 수 있습니다.
모델을 배포하면 비용이 발생합니다. 자세한 내용은 가격 책정 페이지를 참조하세요.
콘솔
Google Cloud Console의 AutoML Tables 페이지로 이동합니다.
왼쪽 탐색창에서 모델 탭을 선택하고 리전을 선택합니다.
배포할 모델의 추가 작업 메뉴에서 모델 배포를 클릭합니다.
REST
models.deploy 메서드를 사용해 모델을 배포합니다.요청 데이터를 사용하기 전에 다음을 바꿉니다.
-
endpoint: 전역 위치인 경우
automl.googleapis.com
, EU 리전인 경우eu-automl.googleapis.com
입니다. - project-id: Google Cloud 프로젝트 ID입니다.
- location: 리소스의 위치로 전역인 경우
us-central1
, 유럽 연합인 경우eu
입니다. -
model-id: 배포할 모델의 ID입니다. 예를 들면
TBL543
입니다.
HTTP 메서드 및 URL:
POST https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id:deploy
요청을 보내려면 다음 옵션 중 하나를 선택합니다.
curl
다음 명령어를 실행합니다.
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "x-goog-user-project: project-id" \
-H "Content-Type: application/json; charset=utf-8" \
-d "" \
"https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id:deploy"
PowerShell
다음 명령어를 실행합니다.
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred"; "x-goog-user-project" = "project-id" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-Uri "https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id:deploy" | Select-Object -Expand Content
다음과 비슷한 JSON 응답이 표시됩니다.
{ "name": "projects/292381/locations/us-central1/operations/TBL543", "metadata": { "@type": "type.googleapis.com/google.cloud.automl.v1beta1.OperationMetadata", "createTime": "2019-12-26T19:21:00.550021Z", "updateTime": "2019-12-26T19:21:00.550021Z", "worksOn": [ "projects/292381/locations/us-central1/models/TBL543" ], "deployModelDetails": {}, "state": "RUNNING" } }
모델 배포는 장기 실행 작업입니다. 작업 상태를 폴링하거나 작업이 반환될 때까지 기다립니다. 자세히 알아보기
Java
리소스가 EU 리전에 있다면 엔드포인트를 명시적으로 설정해야 합니다. 자세히 알아보기
Node.js
리소스가 EU 리전에 있다면 엔드포인트를 명시적으로 설정해야 합니다. 자세히 알아보기
Python
AutoML Tables용 클라이언트 라이브러리에는 AutoML Tables API로 간소화할 수 있는 추가 Python 메서드가 포함됩니다. 이러한 메서드는 데이터세트와 모델을 id가 아닌 이름으로 지칭합니다. 데이터 세트와 모델 이름은 고유해야 합니다. 자세한 내용은 클라이언트 참조를 확인하세요.
리소스가 EU 리전에 있다면 엔드포인트를 명시적으로 설정해야 합니다. 자세히 알아보기
모델 배포 취소
온라인 예측을 요청하려면 먼저 모델을 배포해야 합니다. 온라인 예측에 더 이상 모델이 필요하지 않으면 모델의 배포를 취소하여 배포 요금이 부과되지 않도록 하세요.
배포 비용에 대한 자세한 내용은 가격 책정 페이지를 참조하세요.
콘솔
Google Cloud Console의 AutoML Tables 페이지로 이동합니다.
왼쪽 탐색창에서 모델 탭을 선택하고 리전을 선택합니다.
배포 취소할 모델의 추가 작업 메뉴에서 배포 제거를 클릭합니다.
REST
models.undeploy 메서드를 사용해 모델을 배포 취소합니다.요청 데이터를 사용하기 전에 다음을 바꿉니다.
-
endpoint: 전역 위치인 경우
automl.googleapis.com
, EU 리전인 경우eu-automl.googleapis.com
입니다. - project-id: Google Cloud 프로젝트 ID입니다.
- location: 리소스의 위치로 전역인 경우
us-central1
, 유럽 연합인 경우eu
입니다. -
model-id: 배포를 취소할 모델의 ID입니다. 예를 들면
TBL543
입니다.
HTTP 메서드 및 URL:
POST https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id:undeploy
요청을 보내려면 다음 옵션 중 하나를 선택합니다.
curl
다음 명령어를 실행합니다.
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "x-goog-user-project: project-id" \
-H "Content-Type: application/json; charset=utf-8" \
-d "" \
"https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id:undeploy"
PowerShell
다음 명령어를 실행합니다.
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred"; "x-goog-user-project" = "project-id" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-Uri "https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id:undeploy" | Select-Object -Expand Content
다음과 비슷한 JSON 응답이 표시됩니다.
{ "name": "projects/292381/locations/us-central1/operations/TBL543", "metadata": { "@type": "type.googleapis.com/google.cloud.automl.v1beta1.OperationMetadata", "createTime": "2019-12-26T19:19:21.579163Z", "updateTime": "2019-12-26T19:19:21.579163Z", "worksOn": [ "projects/292381/locations/us-central1/models/TBL543" ], "undeployModelDetails": {}, "state": "RUNNING" } }
Java
리소스가 EU 리전에 있다면 엔드포인트를 명시적으로 설정해야 합니다. 자세히 알아보기
Node.js
리소스가 EU 리전에 있다면 엔드포인트를 명시적으로 설정해야 합니다. 자세히 알아보기
Python
AutoML Tables용 클라이언트 라이브러리에는 AutoML Tables API로 간소화할 수 있는 추가 Python 메서드가 포함됩니다. 이러한 메서드는 데이터세트와 모델을 id가 아닌 이름으로 지칭합니다. 데이터 세트와 모델 이름은 고유해야 합니다. 자세한 내용은 클라이언트 참조를 확인하세요.
리소스가 EU 리전에 있다면 엔드포인트를 명시적으로 설정해야 합니다. 자세히 알아보기
모델 정보 가져오기
학습이 끝나면 새로 생성한 모델 관련 정보를 얻을 수 있습니다.
콘솔
Google Cloud Console의 AutoML Tables 페이지로 이동합니다.
왼쪽 탐색창에서 모델 탭을 선택하고 정보를 확인할 모델을 선택합니다.
학습 탭을 선택합니다.
정밀도와 재현율 같은 모델에 대한 상위 측정항목을 확인할 수 있습니다.
모델 품질 평가 관련 도움이 필요하다면 모델 평가를 참조하세요.
REST
모델에 대한 정보를 가져오려면 models.get 메서드를 사용합니다.
요청 데이터를 사용하기 전에 다음을 바꿉니다.
-
endpoint: 전역 위치인 경우
automl.googleapis.com
, EU 리전인 경우eu-automl.googleapis.com
입니다. - project-id: Google Cloud 프로젝트 ID입니다.
- location: 리소스의 위치로 전역인 경우
us-central1
, 유럽 연합인 경우eu
입니다. -
model-id: 정보를 가져올 모델의 ID입니다. 예를 들면
TBL543
입니다.
HTTP 메서드 및 URL:
GET https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id
요청을 보내려면 다음 옵션 중 하나를 선택합니다.
curl
다음 명령어를 실행합니다.
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "x-goog-user-project: project-id" \
"https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id"
PowerShell
다음 명령어를 실행합니다.
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred"; "x-goog-user-project" = "project-id" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id" | Select-Object -Expand Content
다음과 비슷한 JSON 응답이 표시됩니다.
Java
리소스가 EU 리전에 있다면 엔드포인트를 명시적으로 설정해야 합니다. 자세히 알아보기
Node.js
리소스가 EU 리전에 있다면 엔드포인트를 명시적으로 설정해야 합니다. 자세히 알아보기
Python
AutoML Tables용 클라이언트 라이브러리에는 AutoML Tables API로 간소화할 수 있는 추가 Python 메서드가 포함됩니다. 이러한 메서드는 데이터세트와 모델을 id가 아닌 이름으로 지칭합니다. 데이터 세트와 모델 이름은 고유해야 합니다. 자세한 내용은 클라이언트 참조를 확인하세요.
리소스가 EU 리전에 있다면 엔드포인트를 명시적으로 설정해야 합니다. 자세히 알아보기
모델 나열
프로젝트에는 동일하거나 다른 데이터세트에서 학습한 수많은 모델이 포함될 수 있습니다.
콘솔
Google Cloud 콘솔에 사용 가능한 모델 목록을 표시하려면 왼쪽 탐색 메뉴에서 모델 탭을 선택하고 리전을 선택합니다.
REST
API를 사용하여 사용 가능한 모델 목록을 보려면 models.list 메서드를 사용합니다.
요청 데이터를 사용하기 전에 다음을 바꿉니다.
-
endpoint: 전역 위치인 경우
automl.googleapis.com
, EU 리전인 경우eu-automl.googleapis.com
입니다. - project-id: Google Cloud 프로젝트 ID입니다.
- location: 리소스의 위치로 전역인 경우
us-central1
, 유럽 연합인 경우eu
입니다.
HTTP 메서드 및 URL:
GET https://endpoint/v1beta1/projects/project-id/locations/location/models
요청을 보내려면 다음 옵션 중 하나를 선택합니다.
curl
다음 명령어를 실행합니다.
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "x-goog-user-project: project-id" \
"https://endpoint/v1beta1/projects/project-id/locations/location/models"
PowerShell
다음 명령어를 실행합니다.
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred"; "x-goog-user-project" = "project-id" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://endpoint/v1beta1/projects/project-id/locations/location/models" | Select-Object -Expand Content
Java
리소스가 EU 리전에 있다면 엔드포인트를 명시적으로 설정해야 합니다. 자세히 알아보기
Node.js
리소스가 EU 리전에 있다면 엔드포인트를 명시적으로 설정해야 합니다. 자세히 알아보기
Python
AutoML Tables용 클라이언트 라이브러리에는 AutoML Tables API로 간소화할 수 있는 추가 Python 메서드가 포함됩니다. 이러한 메서드는 데이터세트와 모델을 id가 아닌 이름으로 지칭합니다. 데이터 세트와 모델 이름은 고유해야 합니다. 자세한 내용은 클라이언트 참조를 확인하세요.
리소스가 EU 리전에 있다면 엔드포인트를 명시적으로 설정해야 합니다. 자세히 알아보기
모델 삭제
모델을 삭제하면 모델이 프로젝트에서 영구적으로 제거됩니다.
Console
AutoML Tables UI의 왼쪽 탐색 메뉴에서 모델 탭을 클릭하고 리전을 선택하여 해당 리전에 사용 가능한 모델 목록을 표시합니다.
삭제하려는 행 맨 오른쪽에 있는 점 3개로 된 메뉴를 클릭하고 모델 삭제를 클릭합니다.
확인 대화상자에서 삭제를 클릭합니다.
REST
모델을 삭제하려면 models.delete 메서드를 사용합니다.
요청 데이터를 사용하기 전에 다음을 바꿉니다.
-
endpoint: 전역 위치인 경우
automl.googleapis.com
, EU 리전인 경우eu-automl.googleapis.com
입니다. - project-id: Google Cloud 프로젝트 ID입니다.
- location: 리소스의 위치로 전역인 경우
us-central1
, 유럽 연합인 경우eu
입니다. -
model-id: 삭제할 모델의 ID입니다. 예를 들면
TBL543
입니다.
HTTP 메서드 및 URL:
DELETE https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id
요청을 보내려면 다음 옵션 중 하나를 선택합니다.
curl
다음 명령어를 실행합니다.
curl -X DELETE \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "x-goog-user-project: project-id" \
"https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id"
PowerShell
다음 명령어를 실행합니다.
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred"; "x-goog-user-project" = "project-id" }
Invoke-WebRequest `
-Method DELETE `
-Headers $headers `
-Uri "https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id" | Select-Object -Expand Content
다음과 비슷한 JSON 응답이 표시됩니다.
{ "name": "projects/29452381/locations/us-central1/operations/TBL543", "metadata": { "@type": "type.googleapis.com/google.cloud.automl.v1beta1.OperationMetadata", "createTime": "2019-12-26T17:19:50.684850Z", "updateTime": "2019-12-26T17:19:50.684850Z", "deleteDetails": {}, "worksOn": [ "projects/29452381/locations/us-central1/models/TBL543" ], "state": "DONE" }, "done": true, "response": { "@type": "type.googleapis.com/google.protobuf.Empty" } }
모델 삭제는 장기 실행 작업입니다. 작업 상태를 폴링하거나 작업이 반환될 때까지 기다립니다. 자세히 알아보기
Java
리소스가 EU 리전에 있다면 엔드포인트를 명시적으로 설정해야 합니다. 자세히 알아보기
Node.js
리소스가 EU 리전에 있다면 엔드포인트를 명시적으로 설정해야 합니다. 자세히 알아보기
Python
AutoML Tables용 클라이언트 라이브러리에는 AutoML Tables API로 간소화할 수 있는 추가 Python 메서드가 포함됩니다. 이러한 메서드는 데이터세트와 모델을 id가 아닌 이름으로 지칭합니다. 데이터 세트와 모델 이름은 고유해야 합니다. 자세한 내용은 클라이언트 참조를 확인하세요.
리소스가 EU 리전에 있다면 엔드포인트를 명시적으로 설정해야 합니다. 자세히 알아보기
다음 단계
- 모델을 평가합니다.
- 모델에서 일괄 예측을 가져옵니다.
- 모델에서 온라인 예측을 가져옵니다.
- 장기 실행 작업 사용 자세히 알아보기