Skip to content
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

Upgraded to pytorch 2.1.1, fixed some windows related test issues. Upgrade to Sentis 1.3.0-pre.2 #6013

Merged
merged 3 commits into from
Nov 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions DevProject/Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
},
"com.unity.burst": {
"version": "1.8.7",
"version": "1.8.10",
"depth": 2,
"source": "registry",
"dependencies": {
Expand Down Expand Up @@ -55,7 +55,7 @@
"depth": 0,
"source": "local",
"dependencies": {
"com.unity.sentis": "1.2.0-exp.2",
"com.unity.sentis": "1.3.0-pre.1",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.physics": "1.0.0"
Expand Down Expand Up @@ -105,11 +105,11 @@
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
},
"com.unity.sentis": {
"version": "1.2.0-exp.2",
"version": "1.3.0-pre.1",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.burst": "1.8.4",
"com.unity.burst": "1.8.10",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.imageconversion": "1.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion DevProject/ProjectSettings/EditorBuildSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ EditorBuildSettings:
path: Assets/ML-Agents/Scripts/Tests/Runtime/AcademyTest/AcademyStepperTestScene.unity
guid: 9bafc50b1e55b43b2b1ae9620f1f8311
m_configObjects:
com.unity.ml-agents.settings: {fileID: 11400000, guid: e4ad406c716274fdfb58baafffa12dcd,
com.unity.ml-agents.settings: {fileID: 11400000, guid: 87b8aebb5aefd4643821361876570855,
type: 2}
8 changes: 4 additions & 4 deletions Project/Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"url": "https://packages.unity.com"
},
"com.unity.burst": {
"version": "1.8.7",
"version": "1.8.10",
"depth": 2,
"source": "registry",
"dependencies": {
Expand Down Expand Up @@ -72,7 +72,7 @@
"depth": 0,
"source": "local",
"dependencies": {
"com.unity.sentis": "1.2.0-exp.2",
"com.unity.sentis": "1.3.0-pre.1",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.physics": "1.0.0"
Expand Down Expand Up @@ -104,11 +104,11 @@
"url": "https://packages.unity.com"
},
"com.unity.sentis": {
"version": "1.2.0-exp.2",
"version": "1.3.0-pre.1",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.burst": "1.8.4",
"com.unity.burst": "1.8.10",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.imageconversion": "1.0.0"
},
Expand Down
5 changes: 4 additions & 1 deletion com.unity.ml-agents/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@ and this project adheres to
## [Unreleased]
### Major Changes
#### com.unity.ml-agents / com.unity.ml-agents.extensions (C#)
- Upgraded to Sentis 1.3.0-exp.2 (#6013)

#### ml-agents / ml-agents-envs
- Upgraded to PyTorch 2.1.1 (#6013)

### Minor Changes
#### com.unity.ml-agents / com.unity.ml-agents.extensions (C#)
- Added no-graphics-monitor (#6014)

#### ml-agents / ml-agents-envs

### Bug Fixes
#### com.unity.ml-agents / com.unity.ml-agents.extensions (C#)

#### ml-agents / ml-agents-envs
- Bumped numpy version to >=1.21.2,<1.24.0 (#)
- Bumped numpy version to >=1.21.2,<1.24.0 (#5997)

## [3.0.0-exp.1] - 2023-10-09
### Major Changes
Expand Down
Binary file not shown.
33 changes: 33 additions & 0 deletions com.unity.ml-agents/Plugins/Google.Protobuf_Packed.dll.meta

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

Binary file not shown.
7 changes: 7 additions & 0 deletions com.unity.ml-agents/Plugins/Google.Protobuf_Packed.pdb.meta

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

4 changes: 2 additions & 2 deletions com.unity.ml-agents/Runtime/Timer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public long CurrentTicks
public double TotalSeconds
{
get { return CurrentTicks * s_TicksToSeconds; }
set { } // Serialization needs this, but unused.
set { } // Serialization needs this, but unused.
}

/// <summary>
Expand All @@ -102,7 +102,7 @@ public double SelfSeconds
var selfTicks = Mathf.Max(0, CurrentTicks - totalChildTicks);
return selfTicks * s_TicksToSeconds;
}
set { } // Serialization needs this, but unused.
set { } // Serialization needs this, but unused.
}

public IReadOnlyDictionary<string, TimerNode> Children
Expand Down
6 changes: 3 additions & 3 deletions com.unity.ml-agents/Runtime/Unity.ML-Agents.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"overrideReferences": true,
"precompiledReferences": [
"System.IO.Abstractions.dll",
"Google.Protobuf.dll",
"Grpc.Core.dll"
"Grpc.Core.dll",
"Google.Protobuf_Packed.dll"
],
"autoReferenced": true,
"defineConstraints": [],
Expand Down
2 changes: 1 addition & 1 deletion com.unity.ml-agents/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"unity": "2022.3",
"description": "Use state-of-the-art machine learning to create intelligent character behaviors in any Unity environment (games, robotics, film, etc.).",
"dependencies": {
"com.unity.sentis": "1.2.0-exp.2",
"com.unity.sentis": "1.3.0-pre.2",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.physics": "1.0.0"
Expand Down
9 changes: 7 additions & 2 deletions ml-agents-envs/tests/test_envs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
from unittest import mock
import pytest

Expand Down Expand Up @@ -53,11 +54,15 @@ def test_port_defaults(
def test_log_file_path_is_set(mock_communicator, mock_launcher):
mock_communicator.return_value = MockCommunicator()
env = UnityEnvironment(
file_name="myfile", worker_id=0, log_folder="./some-log-folder-path"
file_name="myfile",
worker_id=0,
log_folder=os.path.join(".", "some-log-folder-path"),
)
args = env._executable_args()
log_file_index = args.index("-logFile")
assert args[log_file_index + 1] == "./some-log-folder-path/Player-0.log"
assert args[log_file_index + 1] == os.path.join(
".", "some-log-folder-path", "Player-0.log"
)
env.close()


Expand Down
11 changes: 9 additions & 2 deletions ml-agents/mlagents/trainers/tests/test_trainer_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,20 @@ def test_setup_init_path(tmpdir, dir_exists):

:return:
"""
test_yaml = """
init_path = os.path.join(
"{}",
"test_setup_init_path_results",
"test_run_id",
"MediumWallJump",
"checkpoint.pt",
)
test_yaml = f"""
behaviors:
BigWallJump:
init_path: BigWallJump-6540981.pt #full path
trainer_type: ppo
MediumWallJump:
init_path: {}/test_setup_init_path_results/test_run_id/MediumWallJump/checkpoint.pt
init_path: {init_path}
trainer_type: ppo
SmallWallJump:
trainer_type: ppo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def test_var_len_obs_and_goal_poca(num_vis, num_vector, num_var_len, conditionin
POCA_TORCH_CONFIG,
hyperparameters=new_hyperparams,
network_settings=new_network,
max_steps=25000,
max_steps=5000,
)
check_environment_trains(env, {BRAIN_NAME: config})

Expand Down
2 changes: 1 addition & 1 deletion ml-agents/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def run(self):
"Pillow>=4.2.1",
"protobuf>=3.6,<3.20",
"pyyaml>=3.1.0",
"torch>=1.13.1",
"torch>=2.1.1",
"tensorboard>=2.14",
# adding six explicit dependency since tensorboard needs it but doesn't declare it as a dep
"six>=1.16",
Expand Down
2 changes: 1 addition & 1 deletion test_constraints_version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# pip constraints to use the *highest* versions allowed in ml-agents/setup.py
# For projects with upper bounds, we should periodically update this list to the latest
torch==1.13.1
torch==2.1.1
Loading