浏览代码

Fixing package validation errors. (#3808)

* Fixing package validation errors.

This impacts our API as two public variables have been made private.

TODO: fix our CI to catch these automatically, per commit.

* Changelog changes.
/develop/dockerfile
GitHub 5 年前
当前提交
576ebc67
共有 9 个文件被更改,包括 23 次插入12 次删除
  1. 5
      com.unity.ml-agents/CHANGELOG.md
  2. 3
      com.unity.ml-agents/Editor/EditorUtilities.cs
  3. 5
      com.unity.ml-agents/Runtime/Agent.cs
  4. 3
      com.unity.ml-agents/Runtime/Policies/BrainParameters.cs
  5. 2
      com.unity.ml-agents/Runtime/Sensors/CameraSensorComponent.cs
  6. 5
      com.unity.ml-agents/Runtime/Sensors/RenderTextureSensorComponent.cs
  7. 6
      com.unity.ml-agents/Runtime/SideChannels/FloatPropertiesChannel.cs
  8. 2
      com.unity.ml-agents/Runtime/SideChannels/SideChannel.cs
  9. 4
      com.unity.ml-agents/Runtime/SideChannels/SideChannelUtils.cs

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


communication between Unity and the Python process.
- The obsolete `Agent` methods `GiveModel`, `Done`, `InitializeAgent`,
`AgentAction` and `AgentReset` have been removed.
- The GhostTrainer has been extended to support asymmetric games and the asymmetric example environment Strikers Vs. Goalie has been added.
- The GhostTrainer has been extended to support asymmetric games and the
asymmetric example environment Strikers Vs. Goalie has been added.
- CameraSensorComponent.m_Grayscale and RenderTextureSensorComponent.m_Grayscale
were changed from `public` to `private` (#3808).
### Minor Changes

3
com.unity.ml-agents/Editor/EditorUtilities.cs


namespace MLAgents.Editor
{
/// <summary>
/// A static helper class for the Editor components of the ML-Agents SDK.
/// </summary>
public static class EditorUtilities
{
/// <summary>

5
com.unity.ml-agents/Runtime/Agent.cs


/// <summary>
/// When the Agent uses Heuristics, it will call this method every time it
/// needs an action. This can be used for debugging or controlling the agent
/// with keyboard.
/// with keyboard. This can also be useful to record demonstrations for imitation learning.
/// <returns> A float array corresponding to the next action of the Agent
/// </returns>
/// <param name="actionsOut">An array corresponding to the next action of the Agent</param>
public virtual void Heuristic(float[] actionsOut)
{
Debug.LogWarning("Heuristic method called but not implemented. Returning placeholder actions.");

3
com.unity.ml-agents/Runtime/Policies/BrainParameters.cs


/// </summary>
public SpaceType vectorActionSpaceType = SpaceType.Discrete;
/// <summary>
/// The number of actions specified by this Brain.
/// </summary>
public int numActions
{
get

2
com.unity.ml-agents/Runtime/Sensors/CameraSensorComponent.cs


}
[HideInInspector, SerializeField, FormerlySerializedAs("grayscale")]
public bool m_Grayscale;
bool m_Grayscale;
/// <summary>
/// Whether to generate grayscale images or color.

5
com.unity.ml-agents/Runtime/Sensors/RenderTextureSensorComponent.cs


[HideInInspector, SerializeField, FormerlySerializedAs("renderTexture")]
RenderTexture m_RenderTexture;
/// <summary>
/// Stores the <see cref="RenderTexture"/> associated with this sensor.
/// </summary>
public RenderTexture renderTexture
{
get { return m_RenderTexture; }

}
[HideInInspector, SerializeField, FormerlySerializedAs("grayscale")]
public bool m_Grayscale;
bool m_Grayscale;
/// <summary>
/// Whether the RenderTexture observation should be converted to grayscale or not.

6
com.unity.ml-agents/Runtime/SideChannels/FloatPropertiesChannel.cs


namespace MLAgents.SideChannels
{
/// <summary>
/// Side channel that is comprised of a collection of float variables, represented by
/// <see cref="IFloatProperties"/>
/// Side channel that is comprised of a collection of float variables.
/// </summary>
public class FloatPropertiesChannel : SideChannel
{

action?.Invoke(value);
}
/// <inheritdoc/>
public float GetPropertyWithDefault(string key, float defaultValue)
{
float valueOut;

/// <inheritdoc/>
/// <inheritdoc/>
public IList<string> ListProperties()
{
return new List<string>(m_FloatProperties.Keys);

2
com.unity.ml-agents/Runtime/SideChannels/SideChannel.cs


/// <summary>
/// Queues a message to be sent to Python during the next simulation step.
/// </summary>
/// <param name="data"> The byte array of data to be sent to Python.</param>
/// <param name="msg"> The byte array of data to be sent to Python.</param>
protected void QueueMessageToSend(OutgoingMessage msg)
{
MessageQueue.Add(msg.ToByteArray());

4
com.unity.ml-agents/Runtime/SideChannels/SideChannelUtils.cs


namespace MLAgents.SideChannels
{
/// <summary>
/// Collection of static utilities for managing the registering/unregistering of
/// <see cref="SideChannels"/> and the sending/receiving of messages for all the channels.
/// </summary>
public static class SideChannelUtils
{

正在加载...
取消
保存