Python용 Agent Platform SDK를 사용하면 데이터 수집을 자동화하고 모델을 학습시켜 Gemini Enterprise Agent Platform에서 예측을 가져올 수 있습니다. Agent Platform SDK는 Python 코드를 사용하여 Agent Platform API에 액세스하므로 콘솔에서 수행할 수 있는 대부분의 작업을 프로그래매틱 방식으로 수행할 수 있습니다. Google Cloud
Python용 Agent Platform SDK를 설치하거나 업데이트하는 방법은 Agent Platform SDK for Python 설치를 참조하세요. 자세한 내용은 Python용 Agent Platform SDK API 참고 문서를 확인하세요.
Agent Platform SDK를 사용하는 이유
Python용 Agent Platform SDK는 숙련된 머신러닝 (ML) 및 인공지능 (AI) 엔지니어 또는 워크플로를 프로그래매틱 방식으로 자동화하려는 데이터 과학자에게 권장됩니다. Python용 Agent Platform SDK는 Agent Platform SDK가 더 상위 레벨이고 덜 세분화되어 있다는 점을 제외하고 Gemini Enterprise Agent Platform Python 클라이언트 라이브러리와 유사합니다. 자세한 내용은 SDK와 클라이언트 라이브러리의 차이점 이해를 참조하세요.
Python용 Agent Platform SDK로 코드 작성
Python용 Agent Platform SDK를 사용하려면 다음 안내를 따르세요.
가상 환경에서 다음 명령어를 실행하여 Python용 Agent Platform SDK 및 Gemini Enterprise Agent Platform Python 클라이언트 라이브러리가 모두 포함된
google-cloud-aiplatform패키지를 설치합니다.pip install --upgrade google-cloud-aiplatform다음 코드를 사용하여
google.cloud.aiplatform네임스페이스를 가져옵니다.from google.cloud import aiplatform-
로컬 셸을 사용하는 경우 사용자 계정에 대한 로컬 인증 사용자 인증 정보를 만듭니다.
gcloud auth application-default login
Cloud Shell을 사용하는 경우 이 작업을 수행할 필요는 없습니다.
인증 오류가 반환되고 외부 ID 공급업체(IdP)를 사용하는 경우 제휴 ID로 gcloud CLI에 로그인했는지 확인합니다.
Python용 Agent Platform SDK에 대해 알아보기
다음 문서를 참조하세요.
Agent Platform SDK 클래스 개요: Agent Platform SDK의 주요 클래스와 기능을 소개합니다.
Gemini Enterprise Agent Platform용 Python 참조: Agent Platform SDK, Agent Platform SDK 미리보기, Gemini Enterprise Agent Platform 클라이언트 라이브러리를 포함한
google-cloud-aiplatform패키지의 모든 네임스페이스, 클래스, 메서드, 속성에 대한 참고 문서가 포함됩니다.
코드 샘플 및 튜토리얼 사용해 보기
노트북 튜토리얼에서는 Python용 Agent Platform SDK를 더 큰 워크플로의 일부로 사용하는 방법을 보여줍니다. 자세한 내용은 Gemini Enterprise Agent Platform 노트북 튜토리얼을 참조하세요.
Python용 Agent Platform SDK GitHub 저장소의 코드 샘플은 개별 태스크를 완료하는 방법을 보여줍니다. 자세한 내용은 Python용 Agent Platform SDK GitHub 저장소를 참조하세요.
Agent Platform SDK와 클라이언트 라이브러리의 차이점 이해
Python용 Agent Platform SDK를 설치하면 Gemini Enterprise Agent Platform Python 클라이언트 라이브러리도 설치됩니다. Agent Platform SDK와 Gemini Enterprise Agent Platform Python 클라이언트 라이브러리는 서로 다른 수준의 세부사항으로 유사한 기능을 제공합니다. Agent Platform SDK는 클라이언트 라이브러리보다 높은 추상화 수준에서 작동하며 대부분의 일반적인 데이터 과학 워크플로에 적합합니다. 하위 수준 기능이 필요하면 Gemini Enterprise Agent Platform Python 클라이언트 라이브러리를 사용합니다.
Agent Platform SDK는 Python에서, Gemini Enterprise Agent Platform 클라이언트 라이브러리는 Python, 자바, Node.js에서 사용할 수 있습니다. Java 또는 Node.js 클라이언트 라이브러리를 설치하는 방법은 Gemini Enterprise Agent Platform 클라이언트 라이브러리 설치를 참조하세요. 선호하는 프로그래밍 언어로 클라이언트 라이브러리를 사용할 수 없는 경우 Gemini Enterprise Agent Platform REST API를 사용할 수 있습니다. 자세한 내용은 Gemini Enterprise Agent Platform REST 참조를 확인하세요.
Gemini Enterprise Agent Platform Python 클라이언트 라이브러리와 SDK 함께 사용
Python용 Agent Platform SDK를 사용하여 더 높은 수준의 유연성 또는 제어 기능이 필요하거나 Agent Platform SDK에 포함되지 않은 메서드가 필요한 경우 동일한 워크플로에서 Gemini Enterprise Agent Platform Python 클라이언트 라이브러리를 사용할 수 있습니다. Gemini Enterprise Agent Platform Python 클라이언트 라이브러리는 다른 네임스페이스를 사용하여 Agent Platform API에 액세스합니다. Python 스크립트의 각 항목에 import 줄을 추가하여 같은 Python 스크립트에서 클라이언트 라이브러리와 Python용 Agent Platform SDK 네임스페이스를 사용할 수 있습니다.
Gemini Enterprise Agent Platform Python 클라이언트 라이브러리 네임스페이스 가져오기
Gemini Enterprise Agent Platform Python 클라이언트 라이브러리 네임스페이스는 google.cloud.aiplatform.gapic입니다. 이 네임스페이스는 google.cloud.aiplatform_v1 네임스페이스에 매핑됩니다. 이 두 네임스페이스는 서로 바꿔서 사용할 수 있습니다. Python 클라이언트 라이브러리를 가져오려면 Python 스크립트에 다음 중 하나를 포함합니다.
from google.cloud import aiplatform_v1
from google.cloud.aiplatform import gapic
다음 단계
학습 방법을 선택하는 방법 알아보기