From 8f3de792db5a9c2d409cf9d02b29db49bf256dba Mon Sep 17 00:00:00 2001 From: Doug Date: Tue, 1 Oct 2019 12:28:15 +0100 Subject: [PATCH 1/3] Modified meta_curriculum JSON reading loop --- ml-agents/mlagents/trainers/meta_curriculum.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ml-agents/mlagents/trainers/meta_curriculum.py b/ml-agents/mlagents/trainers/meta_curriculum.py index 6c93ddbd0a..a557aa2cde 100644 --- a/ml-agents/mlagents/trainers/meta_curriculum.py +++ b/ml-agents/mlagents/trainers/meta_curriculum.py @@ -30,6 +30,11 @@ def __init__(self, curriculum_folder, default_reset_parameters): try: for curriculum_filename in os.listdir(curriculum_folder): + + # This process requires JSON files + if not curriculum_filename.lower().endswith('.json'): + continue + brain_name = curriculum_filename.split(".")[0] curriculum_filepath = os.path.join( curriculum_folder, curriculum_filename From 8691aa85936b9084b4e9436ca14000e169f4d941 Mon Sep 17 00:00:00 2001 From: Doug Date: Tue, 1 Oct 2019 13:38:50 +0100 Subject: [PATCH 2/3] Switched quote styling --- ml-agents/mlagents/trainers/meta_curriculum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ml-agents/mlagents/trainers/meta_curriculum.py b/ml-agents/mlagents/trainers/meta_curriculum.py index a557aa2cde..7626bb315e 100644 --- a/ml-agents/mlagents/trainers/meta_curriculum.py +++ b/ml-agents/mlagents/trainers/meta_curriculum.py @@ -32,7 +32,7 @@ def __init__(self, curriculum_folder, default_reset_parameters): for curriculum_filename in os.listdir(curriculum_folder): # This process requires JSON files - if not curriculum_filename.lower().endswith('.json'): + if not curriculum_filename.lower().endswith(".json"): continue brain_name = curriculum_filename.split(".")[0] From eb8d61ca2ebf02696b88dfc0effe3ecaebe6a963 Mon Sep 17 00:00:00 2001 From: Doug Date: Tue, 1 Oct 2019 18:33:14 +0100 Subject: [PATCH 3/3] Removed whitespace --- ml-agents/mlagents/trainers/meta_curriculum.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/ml-agents/mlagents/trainers/meta_curriculum.py b/ml-agents/mlagents/trainers/meta_curriculum.py index 7626bb315e..2a41994e45 100644 --- a/ml-agents/mlagents/trainers/meta_curriculum.py +++ b/ml-agents/mlagents/trainers/meta_curriculum.py @@ -30,11 +30,9 @@ def __init__(self, curriculum_folder, default_reset_parameters): try: for curriculum_filename in os.listdir(curriculum_folder): - # This process requires JSON files if not curriculum_filename.lower().endswith(".json"): continue - brain_name = curriculum_filename.split(".")[0] curriculum_filepath = os.path.join( curriculum_folder, curriculum_filename