Skip to content

Commit 3d7c4b8

Browse files
author
Jonathan Harper
authored
Merge pull request #2833 from Unity-Technologies/release-0.11.0
Release 0.11.0
2 parents 3643317 + a90477c commit 3d7c4b8

File tree

617 files changed

+12351
-30257
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

617 files changed

+12351
-30257
lines changed

.circleci/config.yml

Lines changed: 115 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ jobs:
3333
keys:
3434
# Parameterize the cache so that different python versions can get different versions of the packages
3535
- v1-dependencies-py<< parameters.pyversion >>-{{ checksum "python_deps.txt" }}
36-
# fallback to using the latest cache if no exact match is found
37-
- v1-dependencies-py<< parameters.pyversion >>-
3836

3937
- run:
4038
name: Install Dependencies
@@ -121,7 +119,97 @@ jobs:
121119
. venv/bin/activate
122120
pre-commit run --hook-stage manual markdown-link-check --all-files
123121
122+
protobuf_generation_check:
123+
docker:
124+
- image: circleci/python:3.7.3
125+
working_directory: ~/repo/
126+
127+
steps:
128+
- checkout
129+
- run:
130+
name: Combine proto files for caching
131+
command: cat protobuf-definitions/proto/mlagents/envs/communicator_objects/*.proto > /tmp/proto_deps.txt
132+
133+
- restore_cache:
134+
keys:
135+
- v1-protobuf-gen-dependencies-{{ checksum "/tmp/proto_deps.txt" }}
136+
- v1-protobuf-gen-dependencies-
137+
138+
- run:
139+
name: Install Dependencies
140+
command: |
141+
sudo apt-get install nuget
142+
nuget install Grpc.Tools -Version 1.14.1 -OutputDirectory protobuf-definitions/
143+
python3 -m venv venv
144+
. venv/bin/activate
145+
pip install --upgrade pip
146+
pip install grpcio-tools==1.13.0 --progress-bar=off
147+
pip install mypy-protobuf==1.16.0 --progress-bar=off
148+
- save_cache:
149+
paths:
150+
- ./venv
151+
key: v1-protobuf-gen-dependencies-{{ checksum "/tmp/proto_deps.txt" }}
152+
153+
- run:
154+
name: Generate protobufs
155+
command: |
156+
. venv/bin/activate
157+
cd protobuf-definitions
158+
chmod +x Grpc.Tools.1.14.1/tools/linux_x64/protoc
159+
chmod +x Grpc.Tools.1.14.1/tools/linux_x64/grpc_csharp_plugin
160+
COMPILER=Grpc.Tools.1.14.1/tools/linux_x64 ./make.sh
161+
CS_PROTO_PATH=UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects
162+
git diff --exit-code --quiet -- :/ ":(exclude,top)$CS_PROTO_PATH/*.meta" \
163+
|| { GIT_ERR=$?; echo "protobufs need to be regenerated, apply the patch uploaded to artifacts."; \
164+
echo "Apply the patch with the command: git apply proto.patch"; \
165+
git diff -- :/ ":(exclude,top)$CS_PROTO_PATH/*.meta" > /tmp/proto.patch; \
166+
exit $GIT_ERR; }
167+
- store_artifacts:
168+
path: /tmp/proto.patch
169+
destination: proto.patch
170+
171+
deploy:
172+
parameters:
173+
directory:
174+
type: string
175+
description: Local directory to use for publishing (e.g. ml-agents)
176+
docker:
177+
- image: circleci/python:3.6
178+
steps:
179+
- checkout
180+
- run:
181+
name: install python dependencies
182+
command: |
183+
python3 -m venv venv
184+
. venv/bin/activate
185+
pip install --upgrade pip
186+
pip install setuptools wheel twine
187+
- run:
188+
name: verify git tag vs. version
189+
command: |
190+
python3 -m venv venv
191+
. venv/bin/activate
192+
cd << parameters.directory >>
193+
python setup.py verify
194+
- run:
195+
name: create packages
196+
command: |
197+
. venv/bin/activate
198+
cd << parameters.directory >>
199+
python setup.py sdist
200+
python setup.py bdist_wheel
201+
- run:
202+
name: upload to pypi
203+
# To upload to test, just add the following flag to twine upload:
204+
# --repository-url https://test.pypi.org/legacy/
205+
# and change the username to "mlagents-test"
206+
command: |
207+
. venv/bin/activate
208+
cd << parameters.directory >>
209+
twine upload -u mlagents -p $PYPI_PASSWORD dist/*
210+
124211
workflows:
212+
version: 2
125213
workflow:
126214
jobs:
127215
- build_python:
@@ -137,3 +225,28 @@ workflows:
137225
# Test python 3.7 with the newest supported versions
138226
pip_constraints: test_constraints_max_version.txt
139227
- markdown_link_check
228+
- protobuf_generation_check
229+
- deploy:
230+
name: deploy ml-agents-envs
231+
directory: ml-agents-envs
232+
filters:
233+
tags:
234+
only: /[0-9]+(\.[0-9]+)*(\.dev[0-9]+)*/
235+
branches:
236+
ignore: /.*/
237+
- deploy:
238+
name: deploy ml-agents
239+
directory: ml-agents
240+
filters:
241+
tags:
242+
only: /[0-9]+(\.[0-9]+)*(\.dev[0-9]+)*/
243+
branches:
244+
ignore: /.*/
245+
- deploy:
246+
name: deploy gym-unity
247+
directory: gym-unity
248+
filters:
249+
tags:
250+
only: /[0-9]+(\.[0-9]+)*(\.dev[0-9]+)*/
251+
branches:
252+
ignore: /.*/

.pre-commit-config.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ repos:
33
rev: 19.3b0
44
hooks:
55
- id: black
6+
exclude: >
7+
(?x)^(
8+
.*_pb2.py|
9+
.*_pb2_grpc.py
10+
)$
11+
612
- repo: https://github.com/pre-commit/mirrors-mypy
713
rev: v0.720
814
hooks:
@@ -20,14 +26,16 @@ repos:
2026
name: mypy-gym-unity
2127
files: "gym-unity/.*"
2228
args: [--ignore-missing-imports, --disallow-incomplete-defs]
29+
2330
- repo: https://github.com/pre-commit/pre-commit-hooks
2431
rev: v2.2.3
2532
hooks:
2633
- id: mixed-line-ending
2734
exclude: >
2835
(?x)^(
2936
.*cs.meta|
30-
.*.css
37+
.*.css|
38+
.*.meta
3139
)$
3240
args: [--fix=lf]
3341
- id: flake8
@@ -36,6 +44,16 @@ repos:
3644
.*_pb2.py|
3745
.*_pb2_grpc.py
3846
)$
47+
additional_dependencies: [flake8-comprehensions]
48+
- id: trailing-whitespace
49+
name: trailing-whitespace-markdown
50+
types: [markdown]
51+
52+
- repo: https://github.com/pre-commit/pygrep-hooks
53+
rev: v1.4.1 # Use the ref you want to point at
54+
hooks:
55+
- id: python-check-mock-methods
56+
3957
# "Local" hooks, see https://pre-commit.com/#repository-local-hooks
4058
- repo: local
4159
hooks:
@@ -51,3 +69,8 @@ repos:
5169
exclude: ".*localized.*"
5270
# Only run manually, e.g. pre-commit run --hook-stage manual markdown-link-check
5371
stages: [manual]
72+
- id: validate-versions
73+
name: validate library versions
74+
language: script
75+
entry: utils/validate_versions.py
76+
files: ".*/setup.py"

.yamato/csharp-tests.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
test_editors:
2+
- version: 2017.4
3+
- version: 2018.4
4+
- version: 2019.3
5+
---
6+
{% for editor in test_editors %}
7+
test_mac_editmode_{{ editor.version }}:
8+
name: Test Mac EditMode {{ editor.version }}
9+
agent:
10+
type: Unity::VM::osx
11+
image: ml-agents/ml-agents-bokken-mac:release
12+
flavor: i1.small
13+
variables:
14+
UNITY_VERSION: {{ editor.version }}
15+
commands:
16+
- ./run-tests-editmode-osx-editor.sh
17+
triggers:
18+
branches:
19+
only:
20+
- "/develop-.*/"
21+
targets:
22+
only:
23+
- "develop"
24+
pull_requests:
25+
- targets:
26+
only:
27+
- "master"
28+
- "/release-.*/"
29+
- "/hotfix-.*/"
30+
{% endfor %}

.yamato/standalone-build-test.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
test_editors:
2+
- version: 2017.4
3+
- version: 2018.4
4+
- version: 2019.3
5+
---
6+
{% for editor in test_editors %}
7+
test_mac_standalone_{{ editor.version }}:
8+
name: Test Mac Standalone {{ editor.version }}
9+
agent:
10+
type: Unity::VM::osx
11+
image: ml-agents/ml-agents-bokken-mac:release
12+
flavor: i1.small
13+
variables:
14+
UNITY_VERSION: {{ editor.version }}
15+
commands:
16+
- ./run-standalone-build-osx.sh
17+
triggers:
18+
branches:
19+
only:
20+
- "/develop-.*/"
21+
targets:
22+
only:
23+
- "develop"
24+
pull_requests:
25+
- targets:
26+
only:
27+
- "master"
28+
- "/release-.*/"
29+
- "/hotfix-.*/"
30+
{% endfor %}

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ developer communities.
2929
* Support for multiple environment configurations and training scenarios
3030
* Train memory-enhanced agents using deep reinforcement learning
3131
* Easily definable Curriculum Learning and Generalization scenarios
32-
* Broadcasting of agent behavior for supervised learning
3332
* Built-in support for Imitation Learning
3433
* Flexible agent control with On Demand Decision Making
3534
* Visualizing network outputs within the environment

SURVEY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Unity ML-Agents Toolkit Survey
22

3-
Your opinion matters a great deal to us. Only by hearing your thoughts on the Unity ML-Agents Toolkit can we continue to improve and grow. Please take a few minutes to let us know about it.
3+
Your opinion matters a great deal to us. Only by hearing your thoughts on the Unity ML-Agents Toolkit can we continue to improve and grow. Please take a few minutes to let us know about it.
44

5-
[Fill out the survey](https://goo.gl/forms/qFMYSYr5TlINvG6f1)
5+
[Fill out the survey](https://goo.gl/forms/qFMYSYr5TlINvG6f1)
-4.85 KB
Binary file not shown.

UnitySDK/Assets/Gizmos/HeuristicBrain Icon.png.meta

Lines changed: 0 additions & 76 deletions
This file was deleted.
-4.81 KB
Binary file not shown.

0 commit comments

Comments
 (0)