Skip to content

Commit ba73779

Browse files
goelakashgoel-akas
andauthored
RL: Minor updates to a few notebooks (aws#1911)
1. Adding "-evaluation" prefix for eval jobs. 2. Updating kernel names 3. Updating roboschool Dockerfile to use sagemaker-training library. Co-authored-by: Akash Goel <[email protected]>
1 parent 535a834 commit ba73779

File tree

7 files changed

+15
-10
lines changed

7 files changed

+15
-10
lines changed

reinforcement_learning/rl_cartpole_batch_coach/rl_cartpole_batch_coach.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -706,9 +706,9 @@
706706
],
707707
"metadata": {
708708
"kernelspec": {
709-
"display_name": "Python 3",
709+
"display_name": "conda_mxnet_p36",
710710
"language": "python",
711-
"name": "python3"
711+
"name": "conda_mxnet_p36"
712712
},
713713
"language_info": {
714714
"codemirror_mode": {
@@ -720,7 +720,7 @@
720720
"name": "python",
721721
"nbconvert_exporter": "python",
722722
"pygments_lexer": "ipython3",
723-
"version": "3.6.5"
723+
"version": "3.6.10"
724724
}
725725
},
726726
"nbformat": 4,

reinforcement_learning/rl_knapsack_coach_custom/rl_knapsack_coach_customEnv.ipynb

+3-2
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@
380380
"metadata": {},
381381
"outputs": [],
382382
"source": [
383-
"wait_for_s3_object(s3_bucket, output_tar_key, tmp_dir) \n",
383+
"wait_for_s3_object(s3_bucket, output_tar_key, tmp_dir, timeout=1800)\n",
384384
"\n",
385385
"if not os.path.isfile(\"{}/output.tar.gz\".format(tmp_dir)):\n",
386386
" raise FileNotFoundError(\"File output.tar.gz not found\")\n",
@@ -435,6 +435,7 @@
435435
" entry_point=\"evaluate-coach.py\",\n",
436436
" instance_count=1,\n",
437437
" instance_type=instance_type,\n",
438+
" base_job_name=job_name_prefix+\"-evaluation\",\n",
438439
" hyperparameters = {\n",
439440
" \"RLCOACH_PRESET\":\"preset-knapsack-clippedppo\",\n",
440441
" \"evaluate_steps\": 250, #5 episodes\n",
@@ -470,7 +471,7 @@
470471
"name": "python",
471472
"nbconvert_exporter": "python",
472473
"pygments_lexer": "ipython3",
473-
"version": "3.8.3"
474+
"version": "3.6.10"
474475
},
475476
"notice": "Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with the License. A copy of the License is located at http://aws.amazon.com/apache2.0/ or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
476477
},

reinforcement_learning/rl_mountain_car_coach_gymEnv/rl_mountain_car_coach_gymEnv.ipynb

+2-1
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,7 @@
493493
" entry_point=\"evaluate-coach.py\",\n",
494494
" instance_count=1,\n",
495495
" instance_type=instance_type,\n",
496+
" base_job_name=job_name_prefix+\"-evaluation\",\n",
496497
" hyperparameters = {\n",
497498
" \"RLCOACH_PRESET\": \"preset-mountain-car-continuous-clipped-ppo\",\n",
498499
" \"evaluate_steps\": 10000*2 # evaluate on 2 episodes\n",
@@ -606,7 +607,7 @@
606607
"name": "python",
607608
"nbconvert_exporter": "python",
608609
"pygments_lexer": "ipython3",
609-
"version": "3.8.3"
610+
"version": "3.6.10"
610611
},
611612
"notice": "Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with the License. A copy of the License is located at http://aws.amazon.com/apache2.0/ or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
612613
},

reinforcement_learning/rl_portfolio_management_coach_customEnv/rl_portfolio_management_coach_customEnv.ipynb

+2-1
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@
557557
" entry_point=\"evaluate-coach.py\",\n",
558558
" instance_count=1,\n",
559559
" instance_type=instance_type,\n",
560+
" base_job_name=job_name_prefix+\"-evaluation\",\n",
560561
" hyperparameters = {\n",
561562
" \"evaluate_steps\": 731*2 # evaluate on 2 episodes\n",
562563
" }\n",
@@ -592,7 +593,7 @@
592593
"name": "python",
593594
"nbconvert_exporter": "python",
594595
"pygments_lexer": "ipython3",
595-
"version": "3.8.3"
596+
"version": "3.6.10"
596597
},
597598
"notice": "Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with the License. A copy of the License is located at http://aws.amazon.com/apache2.0/ or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
598599
},

reinforcement_learning/rl_predictive_autoscaling_coach_customEnv/rl_predictive_autoscaling_coach_customEnv.ipynb

+2-1
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,7 @@
523523
" entry_point=\"evaluate-coach.py\",\n",
524524
" instance_count=1,\n",
525525
" instance_type=instance_type,\n",
526+
" base_job_name=job_name_prefix+\"-evaluation\",\n",
526527
" hyperparameters = {\n",
527528
" \"RLCOACH_PRESET\": \"preset-autoscale-ppo\",\n",
528529
" \"evaluate_steps\": 10001*2 # evaluate on 2 episodes\n",
@@ -604,7 +605,7 @@
604605
"name": "python",
605606
"nbconvert_exporter": "python",
606607
"pygments_lexer": "ipython3",
607-
"version": "3.8.3"
608+
"version": "3.6.10"
608609
},
609610
"notice": "Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with the License. A copy of the License is located at http://aws.amazon.com/apache2.0/ or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
610611
},

reinforcement_learning/rl_roboschool_ray/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ RUN pip install --upgrade \
3434
lz4 \
3535
psutil
3636

37-
RUN pip install sagemaker-containers --upgrade
37+
RUN pip install sagemaker-tensorflow-training==20.1.4
3838

3939
RUN pip install roboschool==1.0.46
4040

reinforcement_learning/rl_traveling_salesman_vehicle_routing_coach/rl_traveling_salesman_vehicle_routing_coach.ipynb

+2-1
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,7 @@
545545
" entry_point=\"evaluate-coach.py\",\n",
546546
" instance_count=1,\n",
547547
" instance_type=instance_type,\n",
548+
" base_job_name=job_name_prefix+\"-evaluation\",\n",
548549
" hyperparameters = {\n",
549550
" \"RLCOACH_PRESET\": \"preset-tsp-easy\",\n",
550551
" \"evaluate_steps\": 200, #max 4 episodes\n",
@@ -791,7 +792,7 @@
791792
"name": "python",
792793
"nbconvert_exporter": "python",
793794
"pygments_lexer": "ipython3",
794-
"version": "3.8.3"
795+
"version": "3.6.10"
795796
},
796797
"notice": "Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with the License. A copy of the License is located at http://aws.amazon.com/apache2.0/ or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
797798
},

0 commit comments

Comments
 (0)