浏览代码

Merge remote-tracking branch 'origin/master' into r7-merge-to-master

/release_7_branch
Chris Elion 4 年前
当前提交
4460ba0c
共有 8 个文件被更改,包括 20 次插入82 次删除
  1. 13
      com.unity.ml-agents/CHANGELOG.md
  2. 36
      com.unity.ml-agents/Runtime/Communicator/GrpcExtensions.cs
  3. 4
      gym-unity/gym_unity/__init__.py
  4. 4
      ml-agents-envs/mlagents_envs/__init__.py
  5. 4
      ml-agents/mlagents/trainers/__init__.py
  6. 2
      protobuf-definitions/README.md
  7. 11
      com.unity.ml-agents/Runtime/Sensors/Observation.cs.meta
  8. 28
      com.unity.ml-agents/Runtime/Sensors/Observation.cs

13
com.unity.ml-agents/CHANGELOG.md


and this project adheres to
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Major Changes
#### com.unity.ml-agents (C#)
#### ml-agents / ml-agents-envs / gym-unity (Python)
### Minor Changes
#### com.unity.ml-agents (C#)
#### ml-agents / ml-agents-envs / gym-unity (Python)
### Bug Fixes
#### com.unity.ml-agents (C#)
#### ml-agents / ml-agents-envs / gym-unity (Python)
## [1.4.0-preview] - 2020-09-16
### Major Changes

36
com.unity.ml-agents/Runtime/Communicator/GrpcExtensions.cs


#endregion
#region Observations
public static ObservationProto ToProto(this Observation obs)
{
ObservationProto obsProto = null;
if (obs.CompressedData != null)
{
// Make sure that uncompressed data is empty
if (obs.FloatData.Count != 0)
{
Debug.LogWarning("Observation has both compressed and uncompressed data set. Using compressed.");
}
obsProto = new ObservationProto
{
CompressedData = ByteString.CopyFrom(obs.CompressedData),
CompressionType = (CompressionTypeProto)obs.CompressionType,
};
}
else
{
var floatDataProto = new ObservationProto.Types.FloatData
{
Data = { obs.FloatData },
};
obsProto = new ObservationProto
{
FloatData = floatDataProto,
CompressionType = (CompressionTypeProto)obs.CompressionType,
};
}
obsProto.Shape.AddRange(obs.Shape);
return obsProto;
}
/// <summary>
/// Static flag to make sure that we only fire the warning once.
/// </summary>

4
gym-unity/gym_unity/__init__.py


# Version of the library that will be used to upload to pypi
__version__ = "0.20.0"
__version__ = "0.21.0.dev0"
__release_tag__ = "release_7"
__release_tag__ = None

4
ml-agents-envs/mlagents_envs/__init__.py


# Version of the library that will be used to upload to pypi
__version__ = "0.20.0"
__version__ = "0.21.0.dev0"
__release_tag__ = "release_7"
__release_tag__ = None

4
ml-agents/mlagents/trainers/__init__.py


# Version of the library that will be used to upload to pypi
__version__ = "0.20.0"
__version__ = "0.21.0.dev0"
__release_tag__ = "release_7"
__release_tag__ = None

2
protobuf-definitions/README.md


`pip install grpcio-tools==1.11.1`
`pip install mypy-protobuf`
`pip install mypy-protobuf==1.16.0`
#### On Windows

11
com.unity.ml-agents/Runtime/Sensors/Observation.cs.meta


fileFormatVersion: 2
guid: e9292f3e3b1864e0fbe1e9bb9a29d4ed
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

28
com.unity.ml-agents/Runtime/Sensors/Observation.cs


using System;
namespace Unity.MLAgents.Sensors
{
internal struct Observation
{
/// <summary>
/// The compressed sensor data. Assumed to be non-null if CompressionType != CompressionType.None
/// </summary>
public byte[] CompressedData;
/// <summary>
/// Uncompressed sensor data. Assumed to be non-empty if CompressionType == CompressionType.None
/// </summary>
public ArraySegment<float> FloatData;
/// <summary>
/// The format of the compressed data
/// </summary>
public SensorCompressionType CompressionType;
/// <summary>
/// The uncompressed dimensions of the data.
/// E.g. for RGB visual observations, this will be {Height, Width, 3}
/// </summary>
public int[] Shape;
}
}
正在加载...
取消
保存