浏览代码

setup venv in yamato commands

/yamato-linux-debug-venv
Chris Elion 4 年前
当前提交
3a4dc3c9
共有 2 个文件被更改,包括 5 次插入6 次删除
  1. 6
      ml-agents/tests/yamato/training_int_tests.py
  2. 5
      ml-agents/tests/yamato/yamato_utils.py

6
ml-agents/tests/yamato/training_int_tests.py


else:
standalone_player_path = "testPlayer"
venv_path = init_venv(python_version)
init_venv(python_version)
# Copy the default training config but override the max_steps parameter,
# and reduce the batch_size and buffer_size enough to ensure an update step happens.

f"mlagents-learn {yaml_out} --force --env={env_path} "
f"--run-id={run_id} --no-graphics --env-args -logFile -"
) # noqa
res = subprocess.run(
f"source {venv_path}/bin/activate; {mla_learn_cmd}", shell=True
)
res = subprocess.run(f"{mla_learn_cmd}", shell=True)
# Save models as artifacts (only if we're using latest python and C#)
if csharp_version is None and python_version is None:

5
ml-agents/tests/yamato/yamato_utils.py


pip_commands += ["-e ./ml-agents-envs", "-e ./ml-agents", "-e ./gym-unity"]
if extra_packages:
pip_commands += extra_packages
print(f'Running "python3 -m pip install -q {cmd} {pip_index_url}"')
f"source {venv_path}/bin/activate; python3 -m pip install -q {cmd} {pip_index_url}",
shell=True,
f"python3 -m pip install -q {cmd} {pip_index_url}", shell=True
)
return venv_path

正在加载...
取消
保存