|
|
|
|
|
|
external_brains = {"testbrain": brain_params_mock} |
|
|
|
|
|
|
|
def mock_constructor(self, brain, trainer_parameters, training, load, seed, run_id): |
|
|
|
assert brain == brain_params_mock |
|
|
|
assert brain == brain_params_mock.brain_name |
|
|
|
assert trainer_parameters == expected_config |
|
|
|
assert training == train_model |
|
|
|
assert load == load_model |
|
|
|
|
|
|
) |
|
|
|
trainers = {} |
|
|
|
for _, brain_parameters in external_brains.items(): |
|
|
|
trainers["testbrain"] = trainer_factory.generate(brain_parameters) |
|
|
|
trainers["testbrain"] = trainer_factory.generate( |
|
|
|
brain_parameters.brain_name |
|
|
|
) |
|
|
|
assert "testbrain" in trainers |
|
|
|
assert isinstance(trainers["testbrain"], OfflineBCTrainer) |
|
|
|
|
|
|
|
|
|
|
multi_gpu, |
|
|
|
): |
|
|
|
self.trainer_metrics = TrainerMetrics("", "") |
|
|
|
assert brain == brain_params_mock |
|
|
|
assert brain == brain_params_mock.brain_name |
|
|
|
assert trainer_parameters == expected_config |
|
|
|
assert reward_buff_cap == expected_reward_buff_cap |
|
|
|
assert training == train_model |
|
|
|
|
|
|
) |
|
|
|
trainers = {} |
|
|
|
for brain_name, brain_parameters in external_brains.items(): |
|
|
|
trainers[brain_name] = trainer_factory.generate(brain_parameters) |
|
|
|
trainers[brain_name] = trainer_factory.generate(brain_parameters.brain_name) |
|
|
|
assert "testbrain" in trainers |
|
|
|
assert isinstance(trainers["testbrain"], PPOTrainer) |
|
|
|
|
|
|
|
|
|
|
) |
|
|
|
trainers = {} |
|
|
|
for brain_name, brain_parameters in external_brains.items(): |
|
|
|
trainers[brain_name] = trainer_factory.generate(brain_parameters) |
|
|
|
trainers[brain_name] = trainer_factory.generate(brain_parameters.brain_name) |
|
|
|
|
|
|
|
|
|
|
|
def test_load_config_missing_file(): |
|
|
|