Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion ml-agents/mlagents/trainers/learn.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def prepare_for_docker_run(docker_target_name, env_path):
def load_config(trainer_config_path):
try:
with open(trainer_config_path) as data_file:
trainer_config = yaml.load(data_file)
trainer_config = yaml.safe_load(data_file)
return trainer_config
except IOError:
raise UnityEnvironmentException(
Expand Down
2 changes: 1 addition & 1 deletion ml-agents/mlagents/trainers/tests/test_bc.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

@pytest.fixture
def dummy_config():
return yaml.load(
return yaml.safe_load(
"""
hidden_units: 128
learning_rate: 3.0e-4
Expand Down
2 changes: 1 addition & 1 deletion ml-agents/mlagents/trainers/tests/test_ppo.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

@pytest.fixture
def dummy_config():
return yaml.load(
return yaml.safe_load(
"""
trainer: ppo
batch_size: 32
Expand Down
8 changes: 4 additions & 4 deletions ml-agents/mlagents/trainers/tests/test_trainer_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

@pytest.fixture
def dummy_config():
return yaml.load(
return yaml.safe_load(
"""
default:
trainer: ppo
Expand Down Expand Up @@ -46,7 +46,7 @@ def dummy_config():

@pytest.fixture
def dummy_online_bc_config():
return yaml.load(
return yaml.safe_load(
"""
default:
trainer: online_bc
Expand Down Expand Up @@ -78,7 +78,7 @@ def dummy_online_bc_config():

@pytest.fixture
def dummy_offline_bc_config():
return yaml.load(
return yaml.safe_load(
"""
default:
trainer: offline_bc
Expand Down Expand Up @@ -120,7 +120,7 @@ def dummy_offline_bc_config_with_override():

@pytest.fixture
def dummy_bad_config():
return yaml.load(
return yaml.safe_load(
"""
default:
trainer: incorrect_trainer
Expand Down