robocar-training/create_job.sh
NITESCU Cristian b81cb57230 1.8.0 image
2018-08-03 12:30:42 +02:00

23 lines
950 B
Bash
Executable File

#!/bin/bash
job_name=$1
if [ -z $job_name ]
then
echo 'Provide model name'
exit 0
fi
echo 'Creating training job '$1
training_image="<replace_me>.dkr.ecr.eu-west-1.amazonaws.com/robocars:1.8.0-gpu-py3"
iam_role_arn="arn:aws:iam::<replace_me>:role/service-role/<replace_me>"
aws sagemaker create-training-job \
--training-job-name $job_name \
--hyper-parameters '{ "sagemaker_region": "\"eu-west-1\"", "with_slide": "true" }' \
--algorithm-specification TrainingImage=$training_image,TrainingInputMode=File \
--role-arn $iam_role_arn \
--input-data-config '[{ "ChannelName": "train", "DataSource": { "S3DataSource": { "S3DataType": "S3Prefix", "S3Uri": "s3://<replace_me>", "S3DataDistributionType": "FullyReplicated" }} }]' \
--output-data-config S3OutputPath=s3://<replace_me> \
--resource-config InstanceType=ml.p2.xlarge,InstanceCount=1,VolumeSizeInGB=1 \
--stopping-condition MaxRuntimeInSeconds=1800