Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
a5b324a
Update cattrs dependencies to support python3.9 (#4821)
Mar 3, 2021
2a26887
Python Dataflow for Group Manager (#4926)
Mar 4, 2021
cedc75c
Removing some scenes (#4997)
vincentpierre Mar 5, 2021
3fb97b4
Fix issue with queuing input events that stomp on others. (#5034)
surfnerd Mar 5, 2021
541916c
Update cattrs dependencies to support python3.9 (#4821)
Mar 3, 2021
b6e8469
Fix issue with queuing input events that stomp on others. (#5034)
surfnerd Mar 5, 2021
686518f
renaming of behavior name for imitation crawler (#5039)
vincentpierre Mar 5, 2021
967d917
[Fix][Documentation] Replace vis_encodeR_type with vis_encode_type (#…
vincentpierre Mar 5, 2021
2c1acd4
Update readme. (#5042)
surfnerd Mar 5, 2021
eac07df
Update versions for release 14 hotfix. (#5040)
surfnerd Mar 5, 2021
9dd0203
[Fix][Documentation] Replace vis_encodeR_type with vis_encode_type (#…
surfnerd Mar 5, 2021
9e3cd91
[bug-fix] Fix typo (#5035)
Mar 5, 2021
40c34a9
master -> main. (#5010) (#5044)
surfnerd Mar 5, 2021
35e7a27
Update changelog. (#5045)
surfnerd Mar 5, 2021
5e87e2c
[bug-fix] Fix padding for List entries in buffer (#5046)
Mar 5, 2021
347852b
[bug-fix] Fix memory leak when using LSTMs (#5048)
Mar 8, 2021
d37a2af
[MLA-1809] catch mismatched observation sizes (#5030)
Mar 8, 2021
edcf2df
Enable the exporting of unitypackage files from a list of curated sce…
surfnerd Mar 8, 2021
7862a29
Update changelog. (#5055)
surfnerd Mar 8, 2021
5b8cbd2
Fix xml docs. (#5057)
surfnerd Mar 9, 2021
a0265be
Merge branch 'main' into release_14_branch-to-main
surfnerd Mar 9, 2021
768b7c3
Update readme table for 1.0.7 verified release (#5059)
Mar 9, 2021
6add502
Merge branch 'main' into release_14_branch-to-main
surfnerd Mar 9, 2021
d0b3e99
Merge pull request #5061 from Unity-Technologies/release_14_branch-to…
surfnerd Mar 9, 2021
60497c5
add release tag to git packman command (#5063)
Mar 9, 2021
4b91f48
Adding model overrider to match3 prefabs (#5067)
vincentpierre Mar 9, 2021
dd6575d
pass sensor name through to ObservationSpec (#5036)
Mar 10, 2021
78cb833
[bug-fix] Fix save/restore critic, add test (#5062)
Mar 10, 2021
22a45cc
Remove unused allocation (#5068)
Mar 10, 2021
d18d5ff
[MLA-1731] update pip instructions (#5074)
Mar 10, 2021
eced65c
Updated incomplete sentence in installation docs. (#5078)
Musubee Mar 11, 2021
1158df0
Automatically generate samples based on placement of mlagents-sample.…
surfnerd Mar 11, 2021
65d1983
Upgrade PyTorch version for python 3.9 (#5028)
Mar 11, 2021
df9ecde
Update barracuda to 1.3.2-preview. (#5084)
surfnerd Mar 11, 2021
1369b76
disable dotnet format temporarily (#5088)
Mar 11, 2021
65971da
Update install docs to mention samples and link to the forum for feed…
surfnerd Mar 12, 2021
d63a9d7
POCA trainer (#5005)
andrewcoh Mar 12, 2021
847d723
[docs] Documentation for POCA and cooperative behaviors (#5056)
Mar 12, 2021
07997d0
[environment] Push Block Collaborative (#5090)
Mar 12, 2021
f67ed30
[docs] Update changelog (#5095)
Mar 12, 2021
192b5e6
Add multiAgentGroup capabilities flag (#5096)
Mar 12, 2021
8545a0d
Move PushBlockCollab config to poca directory (#5097)
andrewcoh Mar 12, 2021
f200b90
Fix ghost curriculum and make steps private (#5098)
andrewcoh Mar 12, 2021
12afe95
Update changelog for samples. (#5103)
surfnerd Mar 12, 2021
dae6195
Update versions on main (#5102)
Mar 12, 2021
2073807
Fix for validate release links (#5100)
Mar 15, 2021
450e522
Integrate Group Manager to soccer/retrain with POCA (#5115)
andrewcoh Mar 15, 2021
02c5b9a
Pragma warnings into the void. (#5117)
surfnerd Mar 15, 2021
1b0577e
Make analytics module an optional dependency. (#5109)
surfnerd Mar 15, 2021
f7d6dc3
Fix end episode for POCA, add warning for group reward if not POCA (#…
Mar 15, 2021
ff3d608
Redo dotnet format (#5119)
Mar 16, 2021
c7b5812
Merge remote-tracking branch 'origin/main' into v2s-update-main
Mar 16, 2021
5affb3c
Resolving conflicts between vs-staging and main (#5125)
vincentpierre Mar 16, 2021
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
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- run: dotnet tool install -g dotnet-format --version 4.1.131201
- uses: pre-commit/action@v2.0.0

markdown-link-check:
Expand Down
23 changes: 16 additions & 7 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,16 @@ jobs:
TEST_ENFORCE_BUFFER_KEY_TYPES: 1
strategy:
matrix:
python-version: [3.6.x, 3.7.x, 3.8.x]
python-version: [3.6.x, 3.7.x, 3.8.x, 3.9.x]
include:
- python-version: 3.6.x
pip_constraints: test_constraints_min_version.txt
- python-version: 3.7.x
pip_constraints: test_constraints_mid_version.txt
- python-version: 3.8.x
pip_constraints: test_constraints_mid_version.txt
- python-version: 3.9.x
pip_constraints: test_constraints_max_version.txt
steps:
- uses: actions/checkout@v2
- name: Set up Python
Expand All @@ -32,7 +41,7 @@ jobs:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('ml-agents/setup.py', 'ml-agents-envs/setup.py', 'gym-unity/setup.py', 'test_requirements.txt') }}
key: ${{ runner.os }}-pip-${{ hashFiles('ml-agents/setup.py', 'ml-agents-envs/setup.py', 'gym-unity/setup.py', 'test_requirements.txt', matrix.pip_constraints) }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
Expand All @@ -42,11 +51,11 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install --progress-bar=off -e ./ml-agents-envs
python -m pip install --progress-bar=off -e ./ml-agents
python -m pip install --progress-bar=off -r test_requirements.txt
python -m pip install --progress-bar=off -e ./gym-unity
python -m pip install --progress-bar=off -e ./ml-agents-plugin-examples
python -m pip install --progress-bar=off -e ./ml-agents-envs -c ${{ matrix.pip_constraints }}
python -m pip install --progress-bar=off -e ./ml-agents -c ${{ matrix.pip_constraints }}
python -m pip install --progress-bar=off -r test_requirements.txt -c ${{ matrix.pip_constraints }}
python -m pip install --progress-bar=off -e ./gym-unity -c ${{ matrix.pip_constraints }}
python -m pip install --progress-bar=off -e ./ml-agents-plugin-examples -c ${{ matrix.pip_constraints }}
- name: Save python dependencies
run: |
pip freeze > pip_versions-${{ matrix.python-version }}.txt
Expand Down
7 changes: 6 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ repos:
types: [markdown]
exclude: ".*localized.*"

- repo: https://github.com/dotnet/format
rev: "7e343070a0355c86f72bdee226b5e19ffcbac931" # TODO - update to a tagged version when one that includes the hook is ready.
hooks:
- id: dotnet-format
args: [--folder, --include]

# "Local" hooks, see https://pre-commit.com/#repository-local-hooks
- repo: local
hooks:
Expand Down Expand Up @@ -119,4 +125,3 @@ repos:
name: validate release links
language: script
entry: utils/validate_release_links.py

37 changes: 37 additions & 0 deletions .yamato/com.unity.ml-agents-optional-dep-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
OptionalDependencyTestsLinux:
name : LinuxOptionalDependenciesTests
agent:
type: Unity::VM
image: package-ci/ubuntu:stable
flavor: b1.medium
commands:
- |
curl -L https://artifactory.prd.it.unity3d.com/artifactory/api/gpg/key/public | sudo apt-key add -
sudo sh -c "echo 'deb https://artifactory.prd.it.unity3d.com/artifactory/unity-apt-local bionic main' > /etc/apt/sources.list.d/unity.list"
sudo apt update
sudo apt install -y unity-config
npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
unity-config settings editor-path ./.Editor
unity-config project create opt-deps-test
unity-config project add dependency com.unity.ml-agents/
unity-config project add testable com.unity.ml-agents
unity-config project add dependency com.unity.modules.imageconversion@1.0.0
unity-config project add dependency com.unity.modules.jsonserialize@1.0.0
unity-config project add dependency com.unity.modules.physics@1.0.0
unity-config project add dependency com.unity.modules.physics2d@1.0.0
upm-ci project test -u 2019.4 --type project-tests --project-path opt-deps-test --package-filter com.unity.ml-agents
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
dependencies:
- .yamato/com.unity.ml-agents-pack.yml#pack
triggers:
cancel_old_ci: true
expression: |
(pull_request.target eq "main" OR
pull_request.target match "release.+") AND
NOT pull_request.draft AND
(pull_request.changes.any match "com.unity.ml-agents/**" OR
pull_request.changes.any match ".yamato/com.unity.ml-agents-test.yml")

8 changes: 6 additions & 2 deletions .yamato/com.unity.ml-agents-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ pack:
image: package-ci/ubuntu:stable
flavor: b1.small
commands:
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci project pack --project-path Project
- |
python3 -m pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
unity-downloader-cli -u 2018.4 -c editor --wait --fast
./.Editor/Unity -projectPath Project -batchMode -executeMethod Unity.MLAgents.SampleExporter.ExportCuratedSamples -logFile -
npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
upm-ci project pack --project-path Project
artifacts:
packages:
paths:
Expand Down
1 change: 1 addition & 0 deletions .yamato/com.unity.ml-agents-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,4 @@ test_{{ package.name }}_{{ platform.name }}_trunk:
{% endfor %}
{% endfor %}
{% endfor %}

2 changes: 1 addition & 1 deletion .yamato/python-ll-api-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test_linux_ll_api_{{ editor.version }}:
python ml-agents/tests/yamato/scripts/run_llapi.py
python ml-agents/tests/yamato/scripts/run_llapi.py --env=artifacts/testPlayer-Basic
python ml-agents/tests/yamato/scripts/run_llapi.py --env=artifacts/testPlayer-WallJump
python ml-agents/tests/yamato/scripts/run_llapi.py --env=artifacts/testPlayer-Bouncer
python ml-agents/tests/yamato/scripts/run_llapi.py --env=artifacts/testPlayer-Match3
dependencies:
- .yamato/standalone-build-test.yml#test_linux_standalone_{{ editor.version }}
triggers:
Expand Down
2 changes: 1 addition & 1 deletion .yamato/standalone-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test_linux_standalone_{{ editor.version }}:
- unity-downloader-cli -u {{ editor.version }} -c editor --wait --fast
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --build-target=linux
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --build-target=linux --scene=Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --build-target=linux --scene=Assets/ML-Agents/Examples/Bouncer/Scenes/Bouncer.unity
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --build-target=linux --scene=Assets/ML-Agents/Examples/Match3/Scenes/Match3.unity
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --build-target=linux --scene=Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --build-target=linux --scene=Assets/ML-Agents/TestScenes/TestCompressedGrid/TestGridCompressed.unity
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --build-target=linux --scene=Assets/ML-Agents/TestScenes/TestCompressedTexture/TestTextureCompressed.unity
Expand Down
6 changes: 3 additions & 3 deletions DevProject/Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
},
"com.unity.barracuda": {
"version": "1.3.0-preview",
"version": "1.3.1-preview",
"depth": 1,
"source": "registry",
"dependencies": {
Expand Down Expand Up @@ -108,7 +108,7 @@
"depth": 0,
"source": "local",
"dependencies": {
"com.unity.barracuda": "1.3.0-preview",
"com.unity.barracuda": "1.3.1-preview",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.physics": "1.0.0",
Expand All @@ -121,7 +121,7 @@
"depth": 0,
"source": "local",
"dependencies": {
"com.unity.ml-agents": "1.7.2-preview"
"com.unity.ml-agents": "1.8.0-preview"
}
},
"com.unity.multiplayer-hlapi": {
Expand Down
125 changes: 125 additions & 0 deletions Project/Assets/ML-Agents/Editor/Tests/SampleExporter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
using System;
using System.Collections.Generic;
using System.IO;
using Newtonsoft.Json;
using UnityEditor;
using UnityEngine;

namespace Unity.MLAgents
{
public class SampleExporter
{
const string k_MLAgentsSampleFile = "mlagents-sample.json";
const string k_PackageSampleFile = ".sample.json";
const string k_MLAgentsDir = "ML-Agents";
const string k_MLAgentsExamplesDir = "Examples";
const string k_MLAgentsPackageName = "com.unity.ml-agents";
const string k_MLAgentsSamplesDirName = "Samples";
const string k_MLAgentsScriptsDirName = "Scripts";

struct MLAgentsSampleJson
{
#pragma warning disable 649
public string displayName;
public string description;
// ReSharper disable once CollectionNeverUpdated.Local
public List<string> scenes;
#pragma warning restore 649
}

struct PackageSampleJson
{
public string displayName;
public string description;
}

public static void ExportCuratedSamples()
{
var oldBurst = EditorPrefs.GetBool("BurstCompilation");
EditorPrefs.SetBool("BurstCompilation", false);
try
{
// Path to Project/Assets
var assetsDir = Application.dataPath;
var repoRoot = Directory.GetParent(Directory.GetParent(assetsDir).FullName).FullName;

// Top level of where to store the samples
var samplesDir = Path.Combine(
repoRoot,
k_MLAgentsPackageName,
k_MLAgentsSamplesDirName);

if (!Directory.Exists(samplesDir))
{
Directory.CreateDirectory(samplesDir);
}

// Path to the examples dir in the project
var examplesDir = Path.Combine(Application.dataPath, k_MLAgentsDir, k_MLAgentsExamplesDir);
foreach (var exampleDirectory in Directory.GetDirectories(examplesDir))
{
var mlAgentsSamplePath = Path.Combine(exampleDirectory, k_MLAgentsSampleFile);
if (File.Exists(mlAgentsSamplePath))
{
var sampleJson = JsonConvert.DeserializeObject<MLAgentsSampleJson>(File.ReadAllText(mlAgentsSamplePath));
Debug.Log(JsonConvert.SerializeObject(sampleJson));
foreach (var scene in sampleJson.scenes)
{
var scenePath = Path.Combine(exampleDirectory, scene);
if (File.Exists(scenePath))
{
// Create a Sample Directory
var currentSampleDir = Directory.CreateDirectory(Path.Combine(samplesDir,
Path.GetFileNameWithoutExtension(scenePath)));


var scriptsPath = Path.Combine(exampleDirectory, k_MLAgentsScriptsDirName);
Debug.Log($"Scene Path: {scenePath}");
var assets = new List<string> { scenePath.Substring(scenePath.IndexOf("Assets")) };
if (!Directory.Exists(Path.Combine(scriptsPath)))
{
scriptsPath = exampleDirectory;
}

scriptsPath = scriptsPath.Substring(scriptsPath.IndexOf("Assets"));
foreach (var guid in AssetDatabase.FindAssets("t:Script", new[] { scriptsPath }))
{
var path = AssetDatabase.GUIDToAssetPath(guid);
assets.Add(path);
Debug.Log($"Adding Asset: {path}");
}

var packageFilePath = Path.GetFileNameWithoutExtension(scenePath) + ".unitypackage";
AssetDatabase.ExportPackage(assets.ToArray(),
Path.Combine(Application.dataPath, packageFilePath),
ExportPackageOptions.IncludeDependencies | ExportPackageOptions.Recurse);

// Move the .unitypackage into the samples folder.
var packageFileFullPath = Path.Combine(Application.dataPath, packageFilePath);

var packageInSamplePath = Path.Combine(currentSampleDir.FullName, packageFilePath);
Debug.Log($"Moving {packageFileFullPath} to {packageInSamplePath}");
File.Move(packageFileFullPath, packageInSamplePath);

// write the .sample.json file to the sample directory
File.WriteAllText(Path.Combine(currentSampleDir.FullName, k_PackageSampleFile),
JsonConvert.SerializeObject(new PackageSampleJson
{
description = sampleJson.description,
displayName = sampleJson.displayName
}));
}
}
}
}
}
catch (Exception e)
{
Debug.Log(e);
EditorApplication.Exit(1);
}
EditorPrefs.SetBool("BurstCompilation", oldBurst);
EditorApplication.Exit(0);
}
}
}
3 changes: 3 additions & 0 deletions Project/Assets/ML-Agents/Editor/Tests/SampleExporter.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Project/Assets/ML-Agents/Examples/3DBall/mlagents-sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"displayName": "3D Ball",
"description": "The 3D Ball sample is a simple environment that is a great for jumping into Ml-Agents to see how things work.",
"scenes": [
"Scenes/3DBall.unity"
]
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions Project/Assets/ML-Agents/Examples/Bouncer.meta

This file was deleted.

8 changes: 0 additions & 8 deletions Project/Assets/ML-Agents/Examples/Bouncer/Demos.meta

This file was deleted.

Binary file not shown.

This file was deleted.

10 changes: 0 additions & 10 deletions Project/Assets/ML-Agents/Examples/Bouncer/Prefabs.meta

This file was deleted.

Loading