0
0

More than 1 year has passed since last update.

steps functionでtraining jobを実行する

Posted at

背景

  • AWS Step FunctionsでAWS APIを利用してAWS Serviceを操作できる
  • APIのパラメーターは、SDKと違いある

SageMaker CreateTrainingJob

スクリーンショット 2022-08-18 16.33.35.png

APIパラメーター

{
  "AlgorithmSpecification": {
    "TrainingImage": "{AWS::AccountId}.dkr.ecr.ap-northeast-1.amazonaws.com/{repository_name}:latest",
    "TrainingInputMode": "File"
  },
  "InputDataConfig": [
    {
      "ChannelName": "train",
      "ContentType": "text/csv",
      "DataSource": {
        "S3DataSource": {
          "S3DataDistributionType": "FullyReplicated",
          "S3DataType": "S3Prefix",
          "S3Uri.$": "s3://{bucket_name}/path/"
        }
      }
    }
  ],
  "OutputDataConfig": {
    "S3OutputPath.$": "s3://{bucket_name}/path/"
  },
  "ResourceConfig": {
    "InstanceCount": 1,
    "InstanceType": "ml.m5.4xlarge",
    "VolumeSizeInGB": 5
  },
  "StoppingCondition": {
    "MaxRuntimeInSeconds": 3000
  },
  "RoleArn": "${TrainingRole}",
  "TrainingJobName.$": "xxxxxx",
  "VpcConfig": {
    "SecurityGroupIds.$": "$.security_group",
    "Subnets.$": "$.subnets"
  }
}

注意点

  "InputDataConfig": [
    {
      "ChannelName": "train",
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0