亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Sagemaker 培訓作業未將培訓模型上傳/保存到 S3 輸出路徑

Sagemaker 培訓作業未將培訓模型上傳/保存到 S3 輸出路徑

千巷貓影 2023-04-11 15:57:23
好的,我已經在 Sagemaker 中處理這個問題將近一個星期了,我已經準備好解決問題了。在 BYO 算法 Docker 部署類型場景中,我有一個自定義訓練腳本與一個數據處理腳本配對。這是一個用 Python 3.x 構建的 Pytorch 模型,BYO Docker 文件最初是為 Python 2 構建的,但我看不出我遇到的問題有什么問題......這是在成功培訓之后運行 Sagemaker 不會將模型保存到目標 S3 存儲桶。我進行了廣泛的搜索,似乎無法在任何地方找到適用的答案。這一切都在 Notebook 實例中完成。注意:我將其用作承包商,并且沒有對 AWS 其余部分的完全權限,包括下載 Docker 映像。文件:FROM ubuntu:18.04MAINTAINER Amazon AI <[email protected]>RUN apt-get -y update && apt-get install -y --no-install-recommends \         wget \         python-pip \         python3-pip3         nginx \         ca-certificates \    && rm -rf /var/lib/apt/lists/*RUN wget https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py && \    pip3 install future numpy torch scipy scikit-learn pandas flask gevent gunicorn && \        rm -rf /root/.cacheENV PYTHONUNBUFFERED=TRUEENV PYTHONDONTWRITEBYTECODE=TRUEENV PATH="/opt/program:${PATH}"COPY decision_trees /opt/programWORKDIR /opt/programDocker 鏡像構建:%%shalgorithm_name="name-this-algo"cd containerchmod +x decision_trees/trainchmod +x decision_trees/serveaccount=$(aws sts get-caller-identity --query Account --output text)region=$(aws configure get region)region=${region:-us-east-2}fullname="${account}.dkr.ecr.${region}.amazonaws.com/${algorithm_name}:latest"aws ecr describe-repositories --repository-names "${algorithm_name}" > /dev/null 2>&1if [ $? -ne 0 ]then    aws ecr create-repository --repository-name "${algorithm_name}" > /dev/nullfi# Get the login command from ECR and execute it directly$(aws ecr get-login --region ${region} --no-include-email)# Build the docker image locally with the image name and then push it to ECR# with the full name.docker build  -t ${algorithm_name} .docker tag ${algorithm_name} ${fullname}docker push ${fullname}
查看完整描述

目前暫無任何回答

  • 0 回答
  • 0 關注
  • 100 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號