Skip to content

Release 0.10.0 #2648

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 69 commits into from
Sep 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
835c736
Fixed small typo in documentation.
DanAmador Aug 20, 2019
2b64e45
Merge pull request #2470 from Unity-Technologies/release-0.9.2
xiaomaogy Aug 29, 2019
982f01e
Merge pull request #2451 from DanAmador/patch-1
xiaomaogy Aug 29, 2019
9cde007
Fixed typo in Training-Imitation-Learning.md (#2485)
AcelisWeaven Sep 3, 2019
4b1f1a3
python coverage: specify dirs, exclude test files (#2473)
Sep 3, 2019
fe97df8
Change update buffer to float32 instead of float64 (#2461)
Sep 3, 2019
863610b
Fix bug with construct_curr_info and test
Sep 4, 2019
77f105c
Add more tests
Sep 4, 2019
2a4724d
Add 2 visual obs test
Sep 4, 2019
5566760
Fix bug with construct_curr_info (#2490)
Sep 4, 2019
3d324db
Minor fix to link to GAIL reward signal doc (#2435)
shihzy Sep 4, 2019
d150c51
initialize trainer step count (#2498)
Sep 5, 2019
5cd2118
Add Soft Actor-Critic as trainer option (#2341)
Sep 6, 2019
784c3ef
Fix Baselines gym_unity example to work with the latest Baselines (#2…
qfettes Sep 6, 2019
5ada924
Renamed "StepInfo" to "EnvironmentStep"
Aug 19, 2019
035045e
Merge pull request #2516 from Unity-Technologies/master
Sep 9, 2019
8892581
Delete VisualBanana
Sep 9, 2019
31529b8
unit test - don't use global random generator (#2521)
Sep 9, 2019
bb82962
Merge pull request #2522 from Unity-Technologies/develop-cleanupconfig
xiaomaogy Sep 9, 2019
ec913ba
Use numpy for random sample in buffer (#2524)
Sep 10, 2019
ebe7e7c
Update the offline_bc_config path
xiaomaogy Sep 10, 2019
7deade9
Merge pull request #2526 from Unity-Technologies/develop-update-offli…
xiaomaogy Sep 10, 2019
7208853
Changing Training-RewardSignals.md --> Reward-Signals.md (#2525)
Sep 10, 2019
56ea0a8
Made the _check_environment_trains test a little more easy to pass so…
vincentpierre Sep 11, 2019
77c83cc
Fix determinism in unit test (#2530)
Sep 11, 2019
4a414cc
Reducing complexity on a number of classes. (#2480)
Sep 11, 2019
d79df88
Add a note on Custom messages about needing trainer changes (#2534)
Sep 11, 2019
27a4629
[memory] Fix for tensors not being disposed of. (#2541)
surfnerd Sep 11, 2019
a737e83
Fix run_id typing in trainer.py (#2537)
Sep 12, 2019
7fc5f54
Fixes missing camera resolution info in demos (#2523)
awjuliani Sep 12, 2019
884a662
Markdown link check in CI (#2543)
Sep 12, 2019
3d3a91c
Fix issue where SAC encoder type is always simple (#2548)
Sep 13, 2019
2107fdc
Fix crash when next_info is empty and using recurrent
Sep 13, 2019
c16eee4
Revert "Fix crash when next_info is empty and using recurrent"
Sep 13, 2019
bb479c9
[format] Format code whitespace with Unity Formatter. (#2550)
surfnerd Sep 13, 2019
0a2a095
Fix crash in construct_curr_info when next_info doesn't have any agen…
Sep 13, 2019
876d815
Add clearer message for bad permissions (#2539)
Sep 13, 2019
46f170b
[coding conventions] Change c# code to be compliant with Unity coding…
surfnerd Sep 13, 2019
602fe02
Enable learning rate decay to be disabled (#2567)
Sep 16, 2019
d1387ce
[coding conventions] Revert NNModelImporter rename and remove NonAllo…
surfnerd Sep 16, 2019
7248276
Develop allow python 3.7 (#2544)
Sep 16, 2019
92db4de
check for potentially bad env variables (#2540)
Sep 16, 2019
d98d9f9
Removed writing to UnitySDK.log from Academy/Changed UnityTimeOutExce…
andrewcoh Sep 17, 2019
102d0c5
fixed formatting
andrewcoh Sep 17, 2019
2a06b63
Develop remove academy done (#2519)
vincentpierre Sep 17, 2019
1f6492e
Normalize observations when adding experiences (#2556)
Sep 18, 2019
e594ba8
Fix flake8 import warnings (#2584)
Sep 18, 2019
b787e81
Allow mypy to reject incomplete defs for mlagents-envs (#2585)
Sep 18, 2019
88caccf
Merge pull request #2580 from Unity-Technologies/develop-removeUnityS…
andrewcoh Sep 19, 2019
e618318
Use argparse for arg parsing (#2586)
Sep 19, 2019
f3042b5
TensorFlowSharp is no more (#2590)
vincentpierre Sep 19, 2019
aa65274
Added option to use environment arguments in learn (#2594)
Sep 19, 2019
5fc2fb2
Fix issue exporting graph with multi-GPU (#2573)
Sep 19, 2019
8e580ff
Fix crash with VAIL + GAIL (#2598)
Sep 20, 2019
d5ea5af
image decompress timer (#2596)
Sep 20, 2019
97b9951
fix hang with multiple envs (#2600)
Sep 20, 2019
2e0bab8
When checking for the compatibility of the expert brain with the poli…
vincentpierre Sep 23, 2019
efc9d84
Develop yaml json loading errors (#2601)
Sep 24, 2019
98ea56a
ML-Agents Branding & Color Updates (#2583)
Hunter-Unity Sep 24, 2019
e557dab
Add note about using GPU inference for ResNet (#2607)
Sep 24, 2019
23404c0
Tick version of API and pypi packages to 10 (#2610)
Sep 24, 2019
4d3f2e5
Update project version to 2017.4.32 (#2613)
Sep 24, 2019
03453e1
Update Bouncer learning NN file (#2614)
Sep 24, 2019
6502feb
Record new demos for new envs (#2622)
Sep 25, 2019
75b149f
Update Migrating.md with note about environments (#2624)
Sep 25, 2019
62e8fb1
Remove Soccer .nn files (#2615)
Sep 26, 2019
f5b98ca
Improved SAC hyperparameters for Crawler, Walker (#2635)
Sep 27, 2019
83e3924
Fix spelling error in documentation (#2636)
Sep 27, 2019
600d94c
Fix visual hallway and visual pushblock brains and scenes. (#2645)
surfnerd Sep 30, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
103 changes: 91 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,40 @@
version: 2.0

jobs:
build:
version: 2.1
executors:
python361:
docker:
- image: circleci/python:3.6.1
python373:
docker:
- image: circleci/python:3.7.3

jobs:
build_python:
parameters:
executor:
type: executor
pyversion:
type: string
description: python version to being used (currently only affects caching).
pip_constraints:
type: string
description: Constraints file that is passed to "pip install". We constraint older versions of libraries for older python runtime, in order to help ensure compatibility.
executor: << parameters.executor >>
working_directory: ~/repo

steps:
- checkout

- run:
# Combine all the python dependencies into one file so that we can use that for the cache checksum
name: Combine pip dependencies for caching
command: cat ml-agents/setup.py ml-agents-envs/setup.py gym-unity/setup.py test_requirements.txt << parameters.pip_constraints >> > python_deps.txt

- restore_cache:
keys:
- v1-dependencies-{{ checksum "ml-agents/setup.py" }}
# Parameterize the cache so that different python versions can get different versions of the packages
- v1-dependencies-py<< parameters.pyversion >>-{{ checksum "python_deps.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- v1-dependencies-py<< parameters.pyversion >>-

- run:
name: Install Dependencies
Expand All @@ -22,22 +43,24 @@ jobs:
. venv/bin/activate
pip install --upgrade pip
pip install --upgrade setuptools
cd ml-agents-envs && pip install -e .
cd ../ml-agents && pip install -e .
pip install pre-commit pytest-cov==2.6.1
cd ../gym-unity && pip install -e .
pip install --progress-bar=off -e ./ml-agents-envs -c << parameters.pip_constraints >>
pip install --progress-bar=off -e ./ml-agents -c << parameters.pip_constraints >>
pip install --progress-bar=off -r test_requirements.txt -c << parameters.pip_constraints >>
pip install --progress-bar=off -e ./gym-unity -c << parameters.pip_constraints >>

- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "ml-agents/setup.py" }}
key: v1-dependencies-py<< parameters.pyversion >>-{{ checksum "python_deps.txt" }}

- run:
name: Run Tests for ml-agents and gym_unity
# This also dumps the installed pip packages to a file, so we can see what versions are actually being used.
command: |
. venv/bin/activate
mkdir test-reports
pytest --cov=mlagents --cov-report xml --junitxml=test-reports/junit.xml -p no:warnings
pip freeze > test-reports/pip_versions.txt
pytest --cov=ml-agents --cov=ml-agents-envs --cov=gym-unity --cov-report html --junitxml=test-reports/junit.xml -p no:warnings

- run:
name: Check Code Style using pre-commit
Expand All @@ -58,3 +81,59 @@ jobs:
- store_artifacts:
path: test-reports
destination: test-reports

- store_artifacts:
path: htmlcov
destination: htmlcov


markdown_link_check:
docker:
- image: circleci/node:12.6.0
working_directory: ~/repo

steps:
- checkout

- restore_cache:
keys:
- v1-node-dependencies-{{ checksum ".pre-commit-config.yaml" }}
# fallback to using the latest cache if no exact match is found
- v1-node-dependencies-

- run:
name: Install Dependencies
command: |
sudo apt-get install python3-venv
python3 -m venv venv
. venv/bin/activate
pip install pre-commit
- run: sudo npm install -g markdown-link-check

- save_cache:
paths:
- ./venv
key: v1-node-dependencies-{{ checksum ".pre-commit-config.yaml" }}

- run:
name: Run markdown-link-check via precommit
command: |
. venv/bin/activate
pre-commit run --hook-stage manual markdown-link-check --all-files

workflows:
workflow:
jobs:
- build_python:
name: python_3.6.1
executor: python361
pyversion: 3.6.1
# Test python 3.6 with the oldest supported versions
pip_constraints: test_constraints_min_version.txt
- build_python:
name: python_3.7.3
executor: python373
pyversion: 3.7.3
# Test python 3.7 with the newest supported versions
pip_constraints: test_constraints_max_version.txt
- markdown_link_check
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,5 @@ venv/

# Code coverage report
.coverage
coverage.xml
/htmlcov/
18 changes: 16 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ repos:
files: "ml-agents-envs/.*"
# Exclude protobuf files and don't follow them when imported
exclude: ".*_pb2.py"
# TODO get disallow-incomplete-defs working
args: [--ignore-missing-imports, --follow-imports=silent]
args: [--ignore-missing-imports, --disallow-incomplete-defs]
- id: mypy
name: mypy-gym-unity
files: "gym-unity/.*"
Expand All @@ -37,3 +36,18 @@ repos:
.*_pb2.py|
.*_pb2_grpc.py
)$
# "Local" hooks, see https://pre-commit.com/#repository-local-hooks
- repo: local
hooks:
- id: markdown-link-check
name: markdown-link-check
# markdown-link-check doesn't support multiple files on the commandline, so this hacks around that.
# Note that you must install the package separately via npm. For example:
# brew install npm; npm install -g markdown-link-check
entry: bash -xc 'echo "$@" | xargs -n1 -t markdown-link-check -c markdown-link-check.config.json' --
language: system
types: [markdown]
# Don't check localized files since their target might not be localized.
exclude: ".*localized.*"
# Only run manually, e.g. pre-commit run --hook-stage manual markdown-link-check
stages: [manual]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ developer communities.

* Unity environment control from Python
* 10+ sample Unity environments
* Two deep reinforcement learning algorithms, [Proximal Policy Optimization](docs/Training-PPO.md) (PPO) and [Soft Actor-Critic](docs/Training-SAC.md) (SAC)
* Support for multiple environment configurations and training scenarios
* Train memory-enhanced agents using deep reinforcement learning
* Easily definable Curriculum Learning and Generalization scenarios
Expand Down
37 changes: 18 additions & 19 deletions UnitySDK/Assets/ML-Agents/Editor/AgentEditor.cs
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using UnityEditor;

namespace MLAgents
Expand All @@ -11,39 +11,38 @@ This code is meant to modify the behavior of the inspector on Brain Components.
[CanEditMultipleObjects]
public class AgentEditor : Editor
{

public override void OnInspectorGUI()
{
SerializedObject serializedAgent = serializedObject;
var serializedAgent = serializedObject;
serializedAgent.Update();

SerializedProperty brain = serializedAgent.FindProperty("brain");
SerializedProperty actionsPerDecision = serializedAgent.FindProperty(
var brain = serializedAgent.FindProperty("brain");
var actionsPerDecision = serializedAgent.FindProperty(
"agentParameters.numberOfActionsBetweenDecisions");
SerializedProperty maxSteps = serializedAgent.FindProperty(
var maxSteps = serializedAgent.FindProperty(
"agentParameters.maxStep");
SerializedProperty isResetOnDone = serializedAgent.FindProperty(
var isResetOnDone = serializedAgent.FindProperty(
"agentParameters.resetOnDone");
SerializedProperty isODD = serializedAgent.FindProperty(
var isOdd = serializedAgent.FindProperty(
"agentParameters.onDemandDecision");
SerializedProperty cameras = serializedAgent.FindProperty(
var cameras = serializedAgent.FindProperty(
"agentParameters.agentCameras");
SerializedProperty renderTextures = serializedAgent.FindProperty(
var renderTextures = serializedAgent.FindProperty(
"agentParameters.agentRenderTextures");

EditorGUILayout.PropertyField(brain);

if (cameras.arraySize > 0 && renderTextures.arraySize > 0)
{
EditorGUILayout.HelpBox("Brain visual observations created by first getting all cameras then all render textures.", MessageType.Info);
EditorGUILayout.HelpBox("Brain visual observations created by first getting all cameras then all render textures.", MessageType.Info);
}

EditorGUILayout.LabelField("Agent Cameras");
for (int i = 0; i < cameras.arraySize; i++)
for (var i = 0; i < cameras.arraySize; i++)
{
EditorGUILayout.PropertyField(
cameras.GetArrayElementAtIndex(i),
new GUIContent("Camera " + (i + 1).ToString() + ": "));
new GUIContent("Camera " + (i + 1) + ": "));
}

EditorGUILayout.BeginHorizontal();
Expand All @@ -58,13 +57,13 @@ public override void OnInspectorGUI()
}

EditorGUILayout.EndHorizontal();

EditorGUILayout.LabelField("Agent RenderTextures");
for (int i = 0; i < renderTextures.arraySize; i++)
for (var i = 0; i < renderTextures.arraySize; i++)
{
EditorGUILayout.PropertyField(
renderTextures.GetArrayElementAtIndex(i),
new GUIContent("RenderTexture " + (i + 1).ToString() + ": "));
new GUIContent("RenderTexture " + (i + 1) + ": "));
}

EditorGUILayout.BeginHorizontal();
Expand All @@ -91,11 +90,11 @@ public override void OnInspectorGUI()
"Reset On Done",
"If checked, the agent will reset on done. Else, AgentOnDone() will be called."));
EditorGUILayout.PropertyField(
isODD,
isOdd,
new GUIContent(
"On Demand Decisions",
"If checked, you must manually request decisions."));
if (!isODD.boolValue)
if (!isOdd.boolValue)
{
EditorGUILayout.PropertyField(
actionsPerDecision,
Expand Down
10 changes: 5 additions & 5 deletions UnitySDK/Assets/ML-Agents/Editor/BrainEditor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using UnityEditor;


Expand All @@ -11,10 +11,10 @@ namespace MLAgents
/// </summary>
[CustomEditor(typeof(Brain))]
public class BrainEditor : Editor
{
{
public override void OnInspectorGUI()
{
var brain = (Brain) target;
var brain = (Brain)target;
var brainToCopy = EditorGUILayout.ObjectField(
"Copy Brain Parameters from : ", null, typeof(Brain), false) as Brain;
if (brainToCopy != null)
Expand All @@ -25,10 +25,10 @@ public override void OnInspectorGUI()
return;
}
var serializedBrain = serializedObject;
serializedBrain.Update();
serializedBrain.Update();
EditorGUILayout.PropertyField(serializedBrain.FindProperty("brainParameters"), true);
serializedBrain.ApplyModifiedProperties();

// Draws a horizontal thick line
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
}
Expand Down
Loading