|
|
|
|
|
|
@mock.patch( |
|
|
|
"mlagents.trainers.subprocess_env_manager.SubprocessEnvManager.create_worker" |
|
|
|
) |
|
|
|
def test_training_behaviors_collects_results_from_all_envs(self, mock_create_worker): |
|
|
|
def test_training_behaviors_collects_results_from_all_envs( |
|
|
|
self, mock_create_worker |
|
|
|
): |
|
|
|
worker_id, EnvironmentResponse(EnvironmentCommand.RESET, worker_id, {f"key{worker_id}" : worker_id}) |
|
|
|
worker_id, |
|
|
|
EnvironmentResponse( |
|
|
|
EnvironmentCommand.RESET, worker_id, {f"key{worker_id}": worker_id} |
|
|
|
), |
|
|
|
) |
|
|
|
|
|
|
|
mock_create_worker.side_effect = create_worker_mock |
|
|
|
|
|
|
|
|
|
|
params = {"test": "params"} |
|
|
|
for i, env in enumerate(manager.env_workers): |
|
|
|
for env in manager.env_workers: |
|
|
|
|
|
|
|
|
|
|
|
@mock.patch( |
|
|
|
"mlagents.trainers.subprocess_env_manager.SubprocessEnvManager.create_worker" |
|
|
|