위치

AutoML Tables는 프로젝트의 리소스(데이터세트 및 모델)가 저장되고 처리되는 위치를 제어할 수 있습니다. 특히 저장 데이터를 저장하고 EU에서만 머신러닝 처리를 수행하도록 AutoML Tables를 구성할 수 있습니다.

기본적으로 AutoML Tables는 전역 위치에 리소스를 저장하고 처리하므로 AutoML Tables를 사용한다고 해서 리소스가 특정 위치 또는 리전에 그대로 남게 되는 것은 아닙니다. EU 위치를 선택하면 Google은 EU 리전에서만 데이터를 저장하고 처리합니다. 개발자와 사용자는 어디에서든 데이터에 액세스할 수 있습니다.

Google Cloud Console에서 위치 설정

새 데이터 세트을 만들 때 데이터 세트 이름을 입력하는 텍스트 상자 바로 아래에 있는 드롭다운 목록을 사용해 데이터 세트의 위치를 지정합니다. 해당 데이터세트를 사용해 학습된 모델이 동일한 위치에 생성됩니다.

데이터세트와 모델의 각 목록 페이지에는 선택한 위치의 모든 리소스를 표시하는 데 사용할 수 있는 위치 드롭다운 목록이 있습니다.

API를 사용하여 위치 설정

AutoML Tables는 전역 API 엔드포인트(automl.googleapis.com)와 EU 엔드포인트(eu-automl.googleapis.com)를 모두 지원합니다. 데이터를 EU에서만 저장하고 처리하려면 REST API 호출용 automl.googleapis.com 대신 eu-automl.googleapis.com URI를 사용하세요.

AutoML API를 사용하는 경우 위치와 고유 ID가 포함된 전체 리소스 이름을 사용하여 리소스를 식별합니다. 예를 들어 데이터세트의 리소스 이름은 projects/{project-id}/locations/{location}/datasets/{dataset-id} 형식을 따릅니다. 전역 위치에 저장된 리소스는 {location} 변수를 us-central1 값으로 바꾸세요. EU 위치에 저장된 리소스의 경우 {location} 변수를 eu 값으로 바꾼 다음 eu-automl.googleapis.com 엔드포인트를 사용합니다.

클라이언트 라이브러리를 사용하여 위치 설정

기본적으로 AutoML 클라이언트 라이브러리는 전역 API 엔드포인트(automl.googleapis.com)에 액세스할 수 있습니다. EU에서만 데이터를 저장하고 처리하려면 엔드포인트를 명시적으로 설정해야 합니다. 아래의 코드 샘플은 이 설정을 구성하는 방법을 보여줍니다.

Java

AutoMlSettings settings =
    AutoMlSettings.newBuilder().setEndpoint("eu-automl.googleapis.com:443").build();

// Initialize client that will be used to send requests. This client only needs to be created
// once, and can be reused for multiple requests. After completing all of your requests, call
// the "close" method on the client to safely clean up any remaining background resources.
AutoMlClient client = AutoMlClient.create(settings);

// A resource that represents Google Cloud Platform location.
LocationName projectLocation = LocationName.of(projectId, "eu");

Node.js

AutoML Tables에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정합니다. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

const automl = require('@google-cloud/automl').v1beta1;

// You must first create a dataset, using the `eu` endpoint, before you can
// call other operations such as: list, get, import, delete, etc.
const clientOptions = {apiEndpoint: 'eu-automl.googleapis.com'};

// Instantiates a client
const client = new automl.AutoMlClient(clientOptions);

// A resource that represents Google Cloud Platform location.
const projectLocation = client.locationPath(projectId, 'eu');

Python

AutoML Tables에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정합니다. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

from google.cloud import automl_v1beta1 as automl

# You must first create a dataset, using the `eu` endpoint, before you can
# call other operations such as: list, get, import, delete, etc.
client_options = {"api_endpoint": "eu-automl.googleapis.com:443"}

# Instantiates a client
client = automl.AutoMlClient(client_options=client_options)

# A resource that represents Google Cloud Platform location.
# project_id = 'YOUR_PROJECT_ID'
project_location = f"projects/{project_id}/locations/eu"

버킷 요구사항

로컬 컴퓨터에서 데이터 가져오기와 같은 일부 AutoML Tables 작업에서는 Cloud Storage 버킷을 사용합니다. 버킷 요구사항은 전역(us-central1) 및 EU(eu) 위치 간에 서로 다릅니다.

us-central1의 버킷 요구사항

  • 위치 유형: Region
  • 위치: us-central1
  • 스토리지 클래스: Standard(Cloud Storage 브라우저에 Regional로 표시되는 경우도 있음)

eu의 버킷 요구사항

  • 위치 유형: Multi-region
  • 위치: eu
  • 스토리지 클래스: Standard(Cloud Storage 브라우저에 Multi-Regional로 표시되는 경우도 있음)