Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ml-agents/mlagents/trainers/meta_curriculum.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ def __init__(self, curriculum_folder, default_reset_parameters):
self._brains_to_curriculums = {}

try:
for curriculum_filename in os.listdir(curriculum_folder):
for curriculum_filename in\
[fn for fn in os.listdir(curriculum_folder)\
if not fn.endswith('.meta')]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just moving this check inside the loop, like

if curriculum_filename.endswith('.meta'):
    continue

?


brain_name = curriculum_filename.split(".")[0]
curriculum_filepath = os.path.join(
curriculum_folder, curriculum_filename
Expand Down