250x250
반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- Airflow
- top_k
- session 유지
- correlation
- flask
- GCP
- TensorFlow
- GenericGBQException
- 공분산
- spark udf
- UDF
- 유튜브 API
- Retry
- integrated gradient
- chatGPT
- tensorflow text
- login crawling
- 상관관계
- youtube data
- Counterfactual Explanations
- BigQuery
- subdag
- gather_nd
- grad-cam
- XAI
- API Gateway
- hadoop
- airflow subdag
- API
- requests
Archives
- Today
- Total
데이터과학 삼학년
GCP ai-platform (cloudML)에서 환경 설정 (라이브러리 추가)-setup.py 본문
반응형
Cloud ML로 모델을 학습시키고자 한다.
하지만 나의 모델 학습을 위해 꼭 필요한 라이브러리가 있다면,
어떻게 해야할까?
답은 setup.py를 추가하면 된다.
gcloud ai-platform jobs submit training text_model \ 이하생략
이런 텍스트 모델을 돌리고,
여기에 soynlp라는 라이브러리가 필요하다면
setup.py에 이런 식으로 코드를 넣어주면 된다.
from setuptools import find_packages from setuptools import setup REQUIRED_PACKAGES = [ 'tensorflow==2.1.0', 'tensorflow-model-analysis==0.15.0', 'scipy>=1.1.0', 'tensorboard==2.1.0' , 'soynlp>=0.0.493', 'tensorflow-estimator==2.1.0' ] setup( name='trainer', version='0.1', install_requires=REQUIRED_PACKAGES, packages=find_packages(), include_package_data=True, description='census trainer package.' )
setup.py는 trainer 폴더와 동등한 수준에 놓아주면 된다.
![](https://blog.kakaocdn.net/dn/bAVUry/btqE6jzAvo9/5VfwXmiZoXxgKHfp4mcNek/img.png)
ai-platform을 이용하여 cloud 환경에서 train을 시킬때 훈련환경 instance는 setup.py를 참조하여 구성한다.
출처: https://cloud.google.com/ai-platform/training/docs/packaging-trainer
학습 애플리케이션 패키징 | AI Platform Training | Google Cloud
AI Platform Training으로 학습 애플리케이션을 실행하려면 먼저 Google Cloud 프로젝트에서 액세스 가능한 Cloud Storage 버킷에 코드 및 종속 항목을 업로드해야 합니다. 이 페이지에서는 클라우드에서 애�
cloud.google.com
728x90
반응형
LIST
'GCP' 카테고리의 다른 글
Cloud Run VS Cloud Functions (0) | 2020.06.25 |
---|---|
pandas - GCP GCS 로 읽기, 쓰기 (0) | 2020.06.24 |
AutoML TimeSeries forecasting (0) | 2020.06.02 |
Cloud Natural Language API (GCP) (0) | 2020.06.01 |
AutoML Natural Language 소개 (0) | 2020.05.22 |
Comments