浏览代码
Merge branch 'develop-hybrid-actions-singleton' into develop-hybrid-actions-csharp
/MLA-1734-demo-provider
Merge branch 'develop-hybrid-actions-singleton' into develop-hybrid-actions-csharp
/MLA-1734-demo-provider
Ruo-Ping Dong
4 年前
当前提交
8ed14762
共有 120 个文件被更改,包括 1530 次插入 和 1287 次删除
-
2.github/ISSUE_TEMPLATE/bug_report.md
-
4.github/workflows/pytest.yml
-
11.yamato/test_versions.metafile
-
2.yamato/training-int-tests.yml
-
22Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs
-
8README.md
-
11com.unity.ml-agents/CHANGELOG.md
-
27com.unity.ml-agents/Runtime/Academy.cs
-
24com.unity.ml-agents/Runtime/Agent.cs
-
56com.unity.ml-agents/Tests/Editor/MLAgentsEditModeTest.cs
-
2com.unity.ml-agents/package.json
-
2docs/Background-Machine-Learning.md
-
10docs/Getting-Started.md
-
24docs/Installation.md
-
4docs/Learning-Environment-Executable.md
-
8docs/ML-Agents-Overview.md
-
2docs/Readme.md
-
2docs/Training-Configuration-File.md
-
35docs/Training-ML-Agents.md
-
2docs/Training-on-Amazon-Web-Service.md
-
5docs/Unity-Inference-Engine.md
-
21gym-unity/gym_unity/envs/__init__.py
-
8gym-unity/gym_unity/tests/test_gym.py
-
206ml-agents-envs/mlagents_envs/base_env.py
-
56ml-agents-envs/mlagents_envs/environment.py
-
28ml-agents-envs/mlagents_envs/rpc_utils.py
-
19ml-agents-envs/mlagents_envs/tests/test_envs.py
-
30ml-agents-envs/mlagents_envs/tests/test_rpc_utils.py
-
71ml-agents-envs/mlagents_envs/tests/test_steps.py
-
1ml-agents/mlagents/tf_utils/__init__.py
-
63ml-agents/mlagents/tf_utils/tf.py
-
1ml-agents/mlagents/torch_utils/__init__.py
-
66ml-agents/mlagents/torch_utils/torch.py
-
12ml-agents/mlagents/trainers/agent_processor.py
-
2ml-agents/mlagents/trainers/buffer.py
-
11ml-agents/mlagents/trainers/cli_utils.py
-
23ml-agents/mlagents/trainers/demo_loader.py
-
13ml-agents/mlagents/trainers/env_manager.py
-
16ml-agents/mlagents/trainers/ghost/trainer.py
-
6ml-agents/mlagents/trainers/learn.py
-
4ml-agents/mlagents/trainers/optimizer/tf_optimizer.py
-
29ml-agents/mlagents/trainers/policy/policy.py
-
19ml-agents/mlagents/trainers/policy/tf_policy.py
-
58ml-agents/mlagents/trainers/policy/torch_policy.py
-
9ml-agents/mlagents/trainers/ppo/optimizer_tf.py
-
17ml-agents/mlagents/trainers/ppo/optimizer_torch.py
-
41ml-agents/mlagents/trainers/ppo/trainer.py
-
6ml-agents/mlagents/trainers/sac/optimizer_tf.py
-
71ml-agents/mlagents/trainers/sac/optimizer_torch.py
-
61ml-agents/mlagents/trainers/sac/trainer.py
-
2ml-agents/mlagents/trainers/settings.py
-
3ml-agents/mlagents/trainers/simple_env_manager.py
-
86ml-agents/mlagents/trainers/stats.py
-
5ml-agents/mlagents/trainers/subprocess_env_manager.py
-
71ml-agents/mlagents/trainers/tests/mock_brain.py
-
76ml-agents/mlagents/trainers/tests/simple_test_envs.py
-
46ml-agents/mlagents/trainers/tests/tensorflow/test_ghost.py
-
5ml-agents/mlagents/trainers/tests/tensorflow/test_models.py
-
8ml-agents/mlagents/trainers/tests/tensorflow/test_nn_policy.py
-
12ml-agents/mlagents/trainers/tests/tensorflow/test_ppo.py
-
9ml-agents/mlagents/trainers/tests/tensorflow/test_sac.py
-
4ml-agents/mlagents/trainers/tests/tensorflow/test_saver.py
-
116ml-agents/mlagents/trainers/tests/tensorflow/test_simple_rl.py
-
27ml-agents/mlagents/trainers/tests/tensorflow/test_tf_policy.py
-
45ml-agents/mlagents/trainers/tests/test_agent_processor.py
-
10ml-agents/mlagents/trainers/tests/test_demo_loader.py
-
6ml-agents/mlagents/trainers/tests/test_rl_trainer.py
-
20ml-agents/mlagents/trainers/tests/test_stats.py
-
2ml-agents/mlagents/trainers/tests/test_subprocess_env_manager.py
-
6ml-agents/mlagents/trainers/tests/test_trajectory.py
-
9ml-agents/mlagents/trainers/tests/torch/saver/test_saver.py
-
46ml-agents/mlagents/trainers/tests/torch/test_ghost.py
-
77ml-agents/mlagents/trainers/tests/torch/test_networks.py
-
39ml-agents/mlagents/trainers/tests/torch/test_policy.py
-
33ml-agents/mlagents/trainers/tests/torch/test_ppo.py
-
34ml-agents/mlagents/trainers/tests/torch/test_reward_providers/test_curiosity.py
-
18ml-agents/mlagents/trainers/tests/torch/test_reward_providers/test_extrinsic.py
-
29ml-agents/mlagents/trainers/tests/torch/test_reward_providers/test_gail.py
-
25ml-agents/mlagents/trainers/tests/torch/test_reward_providers/test_rnd.py
-
17ml-agents/mlagents/trainers/tests/torch/test_reward_providers/utils.py
-
122ml-agents/mlagents/trainers/tests/torch/test_simple_rl.py
-
44ml-agents/mlagents/trainers/tests/torch/test_utils.py
-
2ml-agents/mlagents/trainers/tf/components/bc/model.py
-
10ml-agents/mlagents/trainers/tf/components/bc/module.py
-
2ml-agents/mlagents/trainers/tf/components/reward_signals/curiosity/model.py
-
10ml-agents/mlagents/trainers/tf/components/reward_signals/curiosity/signal.py
-
2ml-agents/mlagents/trainers/tf/components/reward_signals/gail/model.py
-
17ml-agents/mlagents/trainers/tf/components/reward_signals/gail/signal.py
-
4ml-agents/mlagents/trainers/tf/model_serialization.py
-
48ml-agents/mlagents/trainers/torch/components/bc/module.py
-
80ml-agents/mlagents/trainers/torch/components/reward_providers/curiosity_reward_provider.py
-
9ml-agents/mlagents/trainers/torch/components/reward_providers/gail_reward_provider.py
-
1ml-agents/mlagents/trainers/torch/components/reward_providers/rnd_reward_provider.py
-
26ml-agents/mlagents/trainers/torch/distributions.py
-
4ml-agents/mlagents/trainers/torch/model_serialization.py
-
207ml-agents/mlagents/trainers/torch/networks.py
-
50ml-agents/mlagents/trainers/torch/utils.py
-
34ml-agents/mlagents/trainers/trainer/rl_trainer.py
-
18ml-agents/mlagents/trainers/trainer/trainer_factory.py
-
10ml-agents/mlagents/trainers/trainer_controller.py
|
|||
# List of editor versions for standalone-build-test and its dependencies. |
|||
# csharp_backcompat_version is used in training-int-tests to determine the |
|||
# older package version to run the backwards compat tests against. |
|||
csharp_backcompat_version: 1.0.0 |
|||
csharp_backcompat_version: 1.0.0 |
|||
# Waiting on a barracuda fix, see https://jira.unity3d.com/browse/MLA-1464 |
|||
# - version: 2020.2 |
|||
csharp_backcompat_version: 1.0.0 |
|||
- version: 2020.2 |
|||
# 2020.2 moved the AssetImporters namespace |
|||
# but we didn't handle this until 1.2.0 |
|||
csharp_backcompat_version: 1.2.0 |
|
|||
from mlagents.tf_utils.tf import tf as tf # noqa |
|||
from mlagents.tf_utils.tf import set_warnings_enabled # noqa |
|||
from mlagents.tf_utils.tf import generate_session_config # noqa |
|||
from mlagents.tf_utils.tf import is_available # noqa |
|
|||
# This should be the only place that we import tensorflow directly. |
|||
# Everywhere else is caught by the banned-modules setting for flake8 |
|||
import tensorflow as tf # noqa I201 |
|||
|
|||
try: |
|||
import tensorflow as tf # noqa I201 |
|||
# LooseVersion handles things "1.2.3a" or "4.5.6-rc7" fairly sensibly. |
|||
_is_tensorflow2 = LooseVersion(tf.__version__) >= LooseVersion("2.0.0") |
|||
# LooseVersion handles things "1.2.3a" or "4.5.6-rc7" fairly sensibly. |
|||
_is_tensorflow2 = LooseVersion(tf.__version__) >= LooseVersion("2.0.0") |
|||
if _is_tensorflow2: |
|||
import tensorflow.compat.v1 as tf |
|||
if _is_tensorflow2: |
|||
import tensorflow.compat.v1 as tf |
|||
tf.disable_v2_behavior() |
|||
tf_logging = tf.logging |
|||
else: |
|||
try: |
|||
# Newer versions of tf 1.x will complain that tf.logging is deprecated |
|||
tf_logging = tf.compat.v1.logging |
|||
except AttributeError: |
|||
# Fall back to the safe import, even if it might generate a warning or two. |
|||
tf.disable_v2_behavior() |
|||
else: |
|||
try: |
|||
# Newer versions of tf 1.x will complain that tf.logging is deprecated |
|||
tf_logging = tf.compat.v1.logging |
|||
except AttributeError: |
|||
# Fall back to the safe import, even if it might generate a warning or two. |
|||
tf_logging = tf.logging |
|||
except ImportError: |
|||
tf = None |
|||
|
|||
|
|||
def is_available(): |
|||
""" |
|||