Skip to content

Commit

Permalink
Bumped versions. (#6155)
Browse files Browse the repository at this point in the history
* Bumped versions.

* Bumped versions.

* Updated unity projects.

* Updated version validation.

* Fixed failing GPU test.
  • Loading branch information
miguelalonsojr authored Oct 5, 2024
1 parent 057e264 commit 36b312a
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion DevProject/Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"depth": 0,
"source": "local",
"dependencies": {
"com.unity.ml-agents": "3.0.0-exp.1",
"com.unity.ml-agents": "3.0.0",
"com.unity.modules.physics": "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,6 +9,6 @@ EditorBuildSettings:
path: Assets/ML-Agents/Scripts/Tests/Runtime/AcademyTest/AcademyStepperTestScene.unity
guid: 9bafc50b1e55b43b2b1ae9620f1f8311
m_configObjects:
com.unity.ml-agents.settings: {fileID: 11400000, guid: b176c44294f5e434bb5109ddfc43274e,
com.unity.ml-agents.settings: {fileID: 11400000, guid: b9540ad82945942dd852207c48989240,
type: 2}
m_UseUCBPForAssetBundles: 0
2 changes: 1 addition & 1 deletion Project/Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"depth": 0,
"source": "local",
"dependencies": {
"com.unity.ml-agents": "3.0.0-exp.1",
"com.unity.ml-agents": "3.0.0",
"com.unity.modules.physics": "1.0.0"
}
},
Expand Down
2 changes: 1 addition & 1 deletion com.unity.ml-agents.extensions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"unity": "2023.2",
"description": "A source-only package for new features based on ML-Agents",
"dependencies": {
"com.unity.ml-agents": "3.0.0-exp.1",
"com.unity.ml-agents": "3.0.0",
"com.unity.modules.physics": "1.0.0"
}
}
4 changes: 2 additions & 2 deletions com.unity.ml-agents/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"samples": [
{
"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.",
"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.",
"path": "Samples~/3DBall"
}
]
Expand Down
2 changes: 1 addition & 1 deletion ml-agents-envs/mlagents_envs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Version of the library that will be used to upload to pypi
__version__ = "1.1.0.dev0"
__version__ = "1.2.0.dev0"

# Git tag that will be checked to determine whether to trigger upload to pypi
__release_tag__ = None
2 changes: 1 addition & 1 deletion ml-agents/mlagents/torch_utils/torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def set_torch_config(torch_settings: TorchSettings) -> None:

if _device.type == "cuda":
torch.set_default_device(_device.type)
torch.set_default_dtype(torch.cuda.FloatTensor)
torch.set_default_dtype(torch.float32)
else:
torch.set_default_dtype(torch.float32)
logger.debug(f"default Torch device: {_device}")
Expand Down
2 changes: 1 addition & 1 deletion ml-agents/mlagents/trainers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Version of the library that will be used to upload to pypi
__version__ = "1.1.0.dev0"
__version__ = "1.2.0.dev0"

# Git tag that will be checked to determine whether to trigger upload to pypi
__release_tag__ = None
4 changes: 2 additions & 2 deletions ml-agents/mlagents/trainers/tests/test_torch_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"device_str, expected_type, expected_index, expected_tensor_type",
[
("cpu", "cpu", None, torch.float32),
("cuda", "cuda", None, torch.cuda.FloatTensor),
("cuda:42", "cuda", 42, torch.cuda.FloatTensor),
("cuda", "cuda", None, torch.float32),
("cuda:42", "cuda", 42, torch.float32),
("opengl", "opengl", None, torch.float32),
],
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from mlagents.torch_utils import torch
from mlagents.torch_utils import torch, default_device
import numpy as np

from mlagents.trainers.torch_entities.utils import ModelUtils
Expand Down Expand Up @@ -217,7 +217,7 @@ def test_predict_minimum_training():
argmin = argmin.squeeze()
argmin = argmin.detach()
sliced_oh = onehots[:, : num + 1]
inp = torch.cat([inp, sliced_oh], dim=2)
inp = torch.cat([inp, sliced_oh.to(default_device())], dim=2)

embeddings = entity_embedding(inp, inp)
masks = get_zero_entities_mask([inp])
Expand Down
11 changes: 7 additions & 4 deletions utils/validate_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@

def _escape_non_none(s: Optional[str]) -> str:
"""
Returns s escaped in quotes if it is non-None, else "None"
Returns s escaped in quotes if it is non-None, els e "None"
Returns s escaped in quotes if it is non-None, els e "None"
:param s:
:return:
"""
Expand Down Expand Up @@ -81,11 +82,13 @@ def set_version(
f.write(new_contents)

if csharp_version is not None:
package_version = f"{csharp_version}-exp.1"
# removed exp.1 tag from version strings since MLA package is a supported package again
# package_version = f"{csharp_version}-exp.1"
package_version = f"{csharp_version}"
if csharp_extensions_version is not None:
# since this has never been promoted we need to keep
# it in preview forever or CI will fail
extension_version = f"{csharp_extensions_version}-exp.1"
extension_version = f"{csharp_extensions_version}-preview"
print(
f"Setting package version to {package_version} in {MLAGENTS_PACKAGE_JSON_PATH}"
f" and {MLAGENTS_EXTENSIONS_PACKAGE_JSON_PATH}"
Expand Down Expand Up @@ -178,7 +181,7 @@ def print_release_tag_commands(
print(f"Updating C# package to version {args.csharp_version}")
if args.csharp_extensions_version:
print(
f"Updating C# extensions package to version {args.csharp_extensions_version}"
f"Updating C# extensions package to version {args.csharp_extensions_version}-exp.1"
)
set_version(
args.python_version,
Expand Down

0 comments on commit 36b312a

Please sign in to comment.