浏览代码

Add settings test

/MLA-1734-demo-provider
Ervin Teng 5 年前
当前提交
2b0c0163
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9
      ml-agents/mlagents/trainers/tests/test_settings.py

9
ml-agents/mlagents/trainers/tests/test_settings.py


from mlagents.trainers.settings import (
RunOptions,
TrainerSettings,
NetworkSettings,
PPOSettings,
SACSettings,
RewardSignalType,

RewardSignalSettings.structure(
"notadict", Dict[RewardSignalType, RewardSignalSettings]
)
def test_memory_settings_validation():
with pytest.raises(TrainerConfigError):
NetworkSettings.MemorySettings(sequence_length=128, memory_size=63)
with pytest.raises(TrainerConfigError):
NetworkSettings.MemorySettings(sequence_length=128, memory_size=0)
def test_parameter_randomization_structure():

正在加载...
取消
保存