浏览代码

make some more classes and methods internal (#3353)

* WIP public->internal

* DemoStore back to public, internal on Timers
/asymm-envs
GitHub 5 年前
当前提交
3efcefe3
共有 7 个文件被更改,包括 15 次插入15 次删除
  1. 2
      com.unity.ml-agents/Runtime/ActionMasker.cs
  2. 12
      com.unity.ml-agents/Runtime/ICommunicator.cs
  3. 2
      com.unity.ml-agents/Runtime/Policy/RemotePolicy.cs
  4. 2
      com.unity.ml-agents/Runtime/Sensor/Observation.cs
  5. 2
      com.unity.ml-agents/Runtime/Sensor/SensorShapeValidator.cs
  6. 2
      com.unity.ml-agents/Runtime/Sensor/StackingSensor.cs
  7. 8
      com.unity.ml-agents/Runtime/Timer.cs

2
com.unity.ml-agents/Runtime/ActionMasker.cs


readonly BrainParameters m_BrainParameters;
public ActionMasker(BrainParameters brainParameters)
internal ActionMasker(BrainParameters brainParameters)
{
m_BrainParameters = brainParameters;
}

12
com.unity.ml-agents/Runtime/ICommunicator.cs


namespace MLAgents
{
public struct CommunicatorInitParameters
internal struct CommunicatorInitParameters
{
/// <summary>
/// Port to listen for connections on.

/// </summary>
public string version;
}
public struct UnityRLInitParameters
internal struct UnityRLInitParameters
{
/// <summary>
/// An RNG seed sent from the python process to Unity.

public struct UnityRLInputParameters
internal struct UnityRLInputParameters
{
/// <summary>
/// Boolean sent back from python to indicate whether or not training is happening.

/// <summary>
/// Delegate for handling quite events sent back from the communicator.
/// </summary>
public delegate void QuitCommandHandler();
internal delegate void QuitCommandHandler();
public delegate void ResetCommandHandler();
internal delegate void ResetCommandHandler();
public delegate void RLInputReceivedHandler(UnityRLInputParameters inputParams);
internal delegate void RLInputReceivedHandler(UnityRLInputParameters inputParams);
/**
This is the interface of the Communicators.

2
com.unity.ml-agents/Runtime/Policy/RemotePolicy.cs


int m_AgentId;
string m_FullyQualifiedBehaviorName;
protected ICommunicator m_Communicator;
internal ICommunicator m_Communicator;
/// <inheritdoc />
public RemotePolicy(

2
com.unity.ml-agents/Runtime/Sensor/Observation.cs


namespace MLAgents.Sensor
{
public struct Observation
internal struct Observation
{
/// <summary>
/// The compressed sensor data. Assumed to be non-null if CompressionType != CompressionType.None

2
com.unity.ml-agents/Runtime/Sensor/SensorShapeValidator.cs


namespace MLAgents.Sensor
{
public class SensorShapeValidator
internal class SensorShapeValidator
{
private List<int[]> m_SensorShapes;

2
com.unity.ml-agents/Runtime/Sensor/StackingSensor.cs


/// | t = now - 3 | t = now -3 | t = now - 2 | t = now |
/// Internally, a circular buffer of arrays is used. The m_CurrentIndex represents the most recent observation.
/// </summary>
public class StackingSensor : ISensor
internal class StackingSensor : ISensor
{
/// <summary>
/// The wrapped sensor.

8
com.unity.ml-agents/Runtime/Timer.cs


namespace MLAgents
{
[DataContract]
public class TimerNode
internal class TimerNode
{
static string s_Separator = ".";
static double s_TicksToSeconds = 1e-7; // 100 ns per tick

/// Tracks the most recent value of a metric. This is analogous to gauges in statsd.
/// </summary>
[DataContract]
public class GaugeNode
internal class GaugeNode
{
const float k_SmoothingFactor = .25f; // weight for exponential moving average.

get { return k_Instance; }
}
public TimerNode RootNode
internal TimerNode RootNode
{
get { return m_RootNode; }
}

/// Potentially slow so call sparingly.
/// </summary>
/// <returns></returns>
public string DebugGetTimerString()
internal string DebugGetTimerString()
{
return m_RootNode.DebugGetTimerString();
}

正在加载...
取消
保存