Skip to content

Commit d1d12bf

Browse files
authored
Merge pull request aws#547 from wentzeld/RM_location_fix
Add outputLocation parameter to RoboMaker call
2 parents 2ac96c9 + e1aca95 commit d1d12bf

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

reinforcement_learning/rl_deepracer_robomaker_coach_gazebo/rl_deepracer_coach_robomaker.ipynb

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@
131131
"job_name_prefix = 'rl-deepracer'\n",
132132
"\n",
133133
"# create unique job name\n",
134-
"job_name = s3_prefix = job_name_prefix + \"-sagemaker-\" + strftime(\"%y%m%d-%H%M%S\", gmtime())\n",
134+
"tm = gmtime()\n",
135+
"job_name = s3_prefix = job_name_prefix + \"-sagemaker-\" + strftime(\"%y%m%d-%H%M%S\", tm) #Ensure S3 prefix contains SageMaker\n",
136+
"s3_prefix_robomaker = job_name_prefix + \"-robomaker-\" + strftime(\"%y%m%d-%H%M%S\", tm) #Ensure that the S3 prefix contains the keyword 'robomaker'\n",
137+
"\n",
135138
"\n",
136139
"# Duration of job in seconds (5 hours)\n",
137140
"job_duration_in_seconds = 3600 * 5\n",
@@ -414,7 +417,7 @@
414417
"source": [
415418
"RLCOACH_PRESET = \"deepracer\"\n",
416419
"\n",
417-
"instance_type = \"ml.c5.4xlarge\"\n",
420+
"instance_type = \"ml.c4.2xlarge\"\n",
418421
"\n",
419422
"estimator = RLEstimator(entry_point=\"training_worker.py\",\n",
420423
" source_dir='src',\n",
@@ -578,7 +581,8 @@
578581
" maxJobDurationInSeconds=job_duration_in_seconds,\n",
579582
" failureBehavior=\"Continue\",\n",
580583
" simulationApplications=[simulation_application],\n",
581-
" vpcConfig=vpcConfig\n",
584+
" vpcConfig=vpcConfig,\n",
585+
" outputLocation={\"s3Bucket\":s3_bucket, \"s3Prefix\":s3_prefix_robomaker}\n",
582586
" )\n",
583587
" responses.append(response)\n",
584588
"\n",
@@ -723,7 +727,8 @@
723727
" maxJobDurationInSeconds=job_duration_in_seconds,\n",
724728
" failureBehavior=\"Continue\",\n",
725729
" simulationApplications=[simulation_application],\n",
726-
" vpcConfig=vpcConfig\n",
730+
" vpcConfig=vpcConfig,\n",
731+
" outputLocation={\"s3Bucket\":s3_bucket, \"s3Prefix\":s3_prefix_robomaker}\n",
727732
" )\n",
728733
"print(\"Created the following job:\")\n",
729734
"print(\"Job ARN\", response[\"arn\"])"

0 commit comments

Comments
 (0)