GitHub
4 年前
当前提交
d8835857
共有 38 个文件被更改,包括 2134 次插入 和 76 次删除
-
7com.unity.ml-agents/Runtime/Academy.cs
-
63com.unity.ml-agents/Runtime/Analytics/Events.cs
-
8com.unity.ml-agents/Runtime/Analytics/InferenceAnalytics.cs
-
52com.unity.ml-agents/Runtime/Communicator/GrpcExtensions.cs
-
5com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs
-
5com.unity.ml-agents/Runtime/Communicator/UnityRLCapabilities.cs
-
39com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/Capabilities.cs
-
14com.unity.ml-agents/Runtime/Policies/RemotePolicy.cs
-
18com.unity.ml-agents/Tests/Editor/Analytics/InferenceAnalyticsTests.cs
-
32com.unity.ml-agents/Tests/Editor/Communicator/GrpcExtensionsTests.cs
-
11ml-agents-envs/mlagents_envs/communicator_objects/capabilities_pb2.py
-
6ml-agents-envs/mlagents_envs/communicator_objects/capabilities_pb2.pyi
-
6ml-agents-envs/mlagents_envs/environment.py
-
2ml-agents-envs/mlagents_envs/side_channel/engine_configuration_channel.py
-
2ml-agents-envs/mlagents_envs/side_channel/environment_parameters_channel.py
-
12ml-agents/mlagents/trainers/env_manager.py
-
14ml-agents/mlagents/trainers/learn.py
-
72ml-agents/mlagents/trainers/subprocess_env_manager.py
-
2ml-agents/mlagents/trainers/tests/simple_test_envs.py
-
45ml-agents/mlagents/trainers/tests/test_subprocess_env_manager.py
-
3ml-agents/mlagents/trainers/trainer_controller.py
-
3protobuf-definitions/proto/mlagents_envs/communicator_objects/capabilities.proto
-
40com.unity.ml-agents/Runtime/Analytics/AnalyticsUtils.cs
-
3com.unity.ml-agents/Runtime/Analytics/AnalyticsUtils.cs.meta
-
246com.unity.ml-agents/Runtime/Analytics/TrainingAnalytics.cs
-
3com.unity.ml-agents/Runtime/Analytics/TrainingAnalytics.cs.meta
-
850com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/TrainingAnalytics.cs
-
11com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/TrainingAnalytics.cs.meta
-
50com.unity.ml-agents/Runtime/SideChannels/TrainingAnalyticsSideChannel.cs
-
3com.unity.ml-agents/Runtime/SideChannels/TrainingAnalyticsSideChannel.cs.meta
-
42com.unity.ml-agents/Tests/Editor/Analytics/TrainingAnalyticsTest.cs
-
3com.unity.ml-agents/Tests/Editor/Analytics/TrainingAnalyticsTest.cs.meta
-
65com.unity.ml-agents/Tests/Editor/TrainingAnalyticsSideChannelTests.cs
-
3com.unity.ml-agents/Tests/Editor/TrainingAnalyticsSideChannelTests.cs.meta
-
243ml-agents-envs/mlagents_envs/communicator_objects/training_analytics_pb2.py
-
97ml-agents-envs/mlagents_envs/communicator_objects/training_analytics_pb2.pyi
-
99ml-agents/mlagents/training_analytics_side_channel.py
-
31protobuf-definitions/proto/mlagents_envs/communicator_objects/training_analytics.proto
|
|||
using System; |
|||
using UnityEngine; |
|||
|
|||
namespace Unity.MLAgents.Analytics |
|||
{ |
|||
internal static class AnalyticsUtils |
|||
{ |
|||
/// <summary>
|
|||
/// Hash a string to remove PII or secret info before sending to analytics
|
|||
/// </summary>
|
|||
/// <param name="s"></param>
|
|||
/// <returns>A string containing the Hash128 of the input string.</returns>
|
|||
public static string Hash(string s) |
|||
{ |
|||
var behaviorNameHash = Hash128.Compute(s); |
|||
return behaviorNameHash.ToString(); |
|||
} |
|||
|
|||
internal static bool s_SendEditorAnalytics = true; |
|||
|
|||
/// <summary>
|
|||
/// Helper class to temporarily disable sending analytics from unit tests.
|
|||
/// </summary>
|
|||
internal class DisableAnalyticsSending : IDisposable |
|||
{ |
|||
private bool m_PreviousSendEditorAnalytics; |
|||
|
|||
public DisableAnalyticsSending() |
|||
{ |
|||
m_PreviousSendEditorAnalytics = s_SendEditorAnalytics; |
|||
s_SendEditorAnalytics = false; |
|||
} |
|||
|
|||
public void Dispose() |
|||
{ |
|||
s_SendEditorAnalytics = m_PreviousSendEditorAnalytics; |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: af1ef3e70f1242938d7b39284b1a892b |
|||
timeCreated: 1610575760 |
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using Unity.MLAgents.Actuators; |
|||
using Unity.MLAgents.Sensors; |
|||
using UnityEngine; |
|||
using UnityEngine.Analytics; |
|||
|
|||
#if UNITY_EDITOR
|
|||
using UnityEditor; |
|||
using UnityEditor.Analytics; |
|||
#endif
|
|||
|
|||
namespace Unity.MLAgents.Analytics |
|||
{ |
|||
internal class TrainingAnalytics |
|||
{ |
|||
const string k_VendorKey = "unity.ml-agents"; |
|||
const string k_TrainingEnvironmentInitializedEventName = "ml_agents_training_environment_initialized"; |
|||
const string k_TrainingBehaviorInitializedEventName = "ml_agents_training_behavior_initialized"; |
|||
const string k_RemotePolicyInitializedEventName = "ml_agents_remote_policy_initialized"; |
|||
|
|||
private static readonly string[] s_EventNames = |
|||
{ |
|||
k_TrainingEnvironmentInitializedEventName, |
|||
k_TrainingBehaviorInitializedEventName, |
|||
k_RemotePolicyInitializedEventName |
|||
}; |
|||
|
|||
/// <summary>
|
|||
/// Whether or not we've registered this particular event yet
|
|||
/// </summary>
|
|||
static bool s_EventsRegistered = false; |
|||
|
|||
/// <summary>
|
|||
/// Hourly limit for this event name
|
|||
/// </summary>
|
|||
const int k_MaxEventsPerHour = 1000; |
|||
|
|||
/// <summary>
|
|||
/// Maximum number of items in this event.
|
|||
/// </summary>
|
|||
const int k_MaxNumberOfElements = 1000; |
|||
|
|||
private static bool s_SentEnvironmentInitialized; |
|||
/// <summary>
|
|||
/// Behaviors that we've already sent events for.
|
|||
/// </summary>
|
|||
private static HashSet<string> s_SentRemotePolicyInitialized; |
|||
private static HashSet<string> s_SentTrainingBehaviorInitialized; |
|||
|
|||
private static Guid s_TrainingSessionGuid; |
|||
|
|||
// These are set when the RpcCommunicator connects
|
|||
private static string s_TrainerPackageVersion = ""; |
|||
private static string s_TrainerCommunicationVersion = ""; |
|||
|
|||
static bool EnableAnalytics() |
|||
{ |
|||
if (s_EventsRegistered) |
|||
{ |
|||
return true; |
|||
} |
|||
|
|||
foreach (var eventName in s_EventNames) |
|||
{ |
|||
#if UNITY_EDITOR
|
|||
AnalyticsResult result = EditorAnalytics.RegisterEventWithLimit(eventName, k_MaxEventsPerHour, k_MaxNumberOfElements, k_VendorKey); |
|||
#else
|
|||
AnalyticsResult result = AnalyticsResult.UnsupportedPlatform; |
|||
#endif
|
|||
if (result != AnalyticsResult.Ok) |
|||
{ |
|||
return false; |
|||
} |
|||
} |
|||
s_EventsRegistered = true; |
|||
|
|||
if (s_SentRemotePolicyInitialized == null) |
|||
{ |
|||
s_SentRemotePolicyInitialized = new HashSet<string>(); |
|||
s_SentTrainingBehaviorInitialized = new HashSet<string>(); |
|||
s_TrainingSessionGuid = Guid.NewGuid(); |
|||
} |
|||
|
|||
return s_EventsRegistered; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Cache information about the trainer when it becomes available in the RpcCommunicator.
|
|||
/// </summary>
|
|||
/// <param name="communicationVersion"></param>
|
|||
/// <param name="packageVersion"></param>
|
|||
public static void SetTrainerInformation(string packageVersion, string communicationVersion) |
|||
{ |
|||
s_TrainerPackageVersion = packageVersion; |
|||
s_TrainerCommunicationVersion = communicationVersion; |
|||
} |
|||
|
|||
public static bool IsAnalyticsEnabled() |
|||
{ |
|||
#if UNITY_EDITOR
|
|||
return EditorAnalytics.enabled; |
|||
#else
|
|||
return false; |
|||
#endif
|
|||
} |
|||
|
|||
public static void TrainingEnvironmentInitialized(TrainingEnvironmentInitializedEvent tbiEvent) |
|||
{ |
|||
if (!IsAnalyticsEnabled()) |
|||
return; |
|||
|
|||
if (!EnableAnalytics()) |
|||
return; |
|||
|
|||
if (s_SentEnvironmentInitialized) |
|||
{ |
|||
// We already sent an TrainingEnvironmentInitializedEvent. Exit so we don't resend.
|
|||
return; |
|||
} |
|||
|
|||
s_SentEnvironmentInitialized = true; |
|||
tbiEvent.TrainingSessionGuid = s_TrainingSessionGuid.ToString(); |
|||
|
|||
// Note - to debug, use JsonUtility.ToJson on the event.
|
|||
// Debug.Log(
|
|||
// $"Would send event {k_TrainingEnvironmentInitializedEventName} with body {JsonUtility.ToJson(tbiEvent, true)}"
|
|||
// );
|
|||
#if UNITY_EDITOR
|
|||
if (AnalyticsUtils.s_SendEditorAnalytics) |
|||
{ |
|||
EditorAnalytics.SendEventWithLimit(k_TrainingEnvironmentInitializedEventName, tbiEvent); |
|||
} |
|||
#else
|
|||
return; |
|||
#endif
|
|||
} |
|||
|
|||
public static void RemotePolicyInitialized( |
|||
string fullyQualifiedBehaviorName, |
|||
IList<ISensor> sensors, |
|||
ActionSpec actionSpec |
|||
) |
|||
{ |
|||
if (!IsAnalyticsEnabled()) |
|||
return; |
|||
|
|||
if (!EnableAnalytics()) |
|||
return; |
|||
|
|||
// Extract base behavior name (no team ID)
|
|||
var behaviorName = ParseBehaviorName(fullyQualifiedBehaviorName); |
|||
var added = s_SentRemotePolicyInitialized.Add(behaviorName); |
|||
|
|||
if (!added) |
|||
{ |
|||
// We previously added this model. Exit so we don't resend.
|
|||
return; |
|||
} |
|||
|
|||
var data = GetEventForRemotePolicy(behaviorName, sensors, actionSpec); |
|||
// Note - to debug, use JsonUtility.ToJson on the event.
|
|||
// Debug.Log(
|
|||
// $"Would send event {k_RemotePolicyInitializedEventName} with body {JsonUtility.ToJson(data, true)}"
|
|||
// );
|
|||
#if UNITY_EDITOR
|
|||
if (AnalyticsUtils.s_SendEditorAnalytics) |
|||
{ |
|||
EditorAnalytics.SendEventWithLimit(k_RemotePolicyInitializedEventName, data); |
|||
} |
|||
#else
|
|||
return; |
|||
#endif
|
|||
} |
|||
|
|||
internal static string ParseBehaviorName(string fullyQualifiedBehaviorName) |
|||
{ |
|||
var lastQuestionIndex = fullyQualifiedBehaviorName.LastIndexOf("?"); |
|||
if (lastQuestionIndex < 0) |
|||
{ |
|||
// Nothing to remove
|
|||
return fullyQualifiedBehaviorName; |
|||
} |
|||
|
|||
return fullyQualifiedBehaviorName.Substring(0, lastQuestionIndex); |
|||
} |
|||
|
|||
public static void TrainingBehaviorInitialized(TrainingBehaviorInitializedEvent tbiEvent) |
|||
{ |
|||
if (!IsAnalyticsEnabled()) |
|||
return; |
|||
|
|||
if (!EnableAnalytics()) |
|||
return; |
|||
|
|||
var behaviorName = tbiEvent.BehaviorName; |
|||
var added = s_SentTrainingBehaviorInitialized.Add(behaviorName); |
|||
|
|||
if (!added) |
|||
{ |
|||
// We previously added this model. Exit so we don't resend.
|
|||
return; |
|||
} |
|||
|
|||
// Hash the behavior name so that there's no concern about PII or "secret" data being leaked.
|
|||
tbiEvent.TrainingSessionGuid = s_TrainingSessionGuid.ToString(); |
|||
tbiEvent.BehaviorName = AnalyticsUtils.Hash(tbiEvent.BehaviorName); |
|||
|
|||
// Note - to debug, use JsonUtility.ToJson on the event.
|
|||
// Debug.Log(
|
|||
// $"Would send event {k_TrainingBehaviorInitializedEventName} with body {JsonUtility.ToJson(tbiEvent, true)}"
|
|||
// );
|
|||
#if UNITY_EDITOR
|
|||
if (AnalyticsUtils.s_SendEditorAnalytics) |
|||
{ |
|||
EditorAnalytics.SendEventWithLimit(k_TrainingBehaviorInitializedEventName, tbiEvent); |
|||
} |
|||
#else
|
|||
return; |
|||
#endif
|
|||
} |
|||
|
|||
static RemotePolicyInitializedEvent GetEventForRemotePolicy( |
|||
string behaviorName, |
|||
IList<ISensor> sensors, |
|||
ActionSpec actionSpec) |
|||
{ |
|||
var remotePolicyEvent = new RemotePolicyInitializedEvent(); |
|||
|
|||
// Hash the behavior name so that there's no concern about PII or "secret" data being leaked.
|
|||
remotePolicyEvent.BehaviorName = AnalyticsUtils.Hash(behaviorName); |
|||
|
|||
remotePolicyEvent.TrainingSessionGuid = s_TrainingSessionGuid.ToString(); |
|||
remotePolicyEvent.ActionSpec = EventActionSpec.FromActionSpec(actionSpec); |
|||
remotePolicyEvent.ObservationSpecs = new List<EventObservationSpec>(sensors.Count); |
|||
foreach (var sensor in sensors) |
|||
{ |
|||
remotePolicyEvent.ObservationSpecs.Add(EventObservationSpec.FromSensor(sensor)); |
|||
} |
|||
|
|||
remotePolicyEvent.MLAgentsEnvsVersion = s_TrainerPackageVersion; |
|||
remotePolicyEvent.TrainerCommunicationVersion = s_TrainerCommunicationVersion; |
|||
return remotePolicyEvent; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 5ad0bc6b45614bb7929d25dd59d5ac38 |
|||
timeCreated: 1608168600 |
|
|||
// <auto-generated>
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|||
// source: mlagents_envs/communicator_objects/training_analytics.proto
|
|||
// </auto-generated>
|
|||
#pragma warning disable 1591, 0612, 3021
|
|||
#region Designer generated code
|
|||
|
|||
using pb = global::Google.Protobuf; |
|||
using pbc = global::Google.Protobuf.Collections; |
|||
using pbr = global::Google.Protobuf.Reflection; |
|||
using scg = global::System.Collections.Generic; |
|||
namespace Unity.MLAgents.CommunicatorObjects { |
|||
|
|||
/// <summary>Holder for reflection information generated from mlagents_envs/communicator_objects/training_analytics.proto</summary>
|
|||
internal static partial class TrainingAnalyticsReflection { |
|||
|
|||
#region Descriptor
|
|||
/// <summary>File descriptor for mlagents_envs/communicator_objects/training_analytics.proto</summary>
|
|||
public static pbr::FileDescriptor Descriptor { |
|||
get { return descriptor; } |
|||
} |
|||
private static pbr::FileDescriptor descriptor; |
|||
|
|||
static TrainingAnalyticsReflection() { |
|||
byte[] descriptorData = global::System.Convert.FromBase64String( |
|||
string.Concat( |
|||
"CjttbGFnZW50c19lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL3RyYWluaW5n", |
|||
"X2FuYWx5dGljcy5wcm90bxIUY29tbXVuaWNhdG9yX29iamVjdHMi2QEKHlRy", |
|||
"YWluaW5nRW52aXJvbm1lbnRJbml0aWFsaXplZBIYChBtbGFnZW50c192ZXJz", |
|||
"aW9uGAEgASgJEh0KFW1sYWdlbnRzX2VudnNfdmVyc2lvbhgCIAEoCRIWCg5w", |
|||
"eXRob25fdmVyc2lvbhgDIAEoCRIVCg10b3JjaF92ZXJzaW9uGAQgASgJEhkK", |
|||
"EXRvcmNoX2RldmljZV90eXBlGAUgASgJEhAKCG51bV9lbnZzGAYgASgFEiIK", |
|||
"Gm51bV9lbnZpcm9ubWVudF9wYXJhbWV0ZXJzGAcgASgFIq0DChtUcmFpbmlu", |
|||
"Z0JlaGF2aW9ySW5pdGlhbGl6ZWQSFQoNYmVoYXZpb3JfbmFtZRgBIAEoCRIU", |
|||
"Cgx0cmFpbmVyX3R5cGUYAiABKAkSIAoYZXh0cmluc2ljX3Jld2FyZF9lbmFi", |
|||
"bGVkGAMgASgIEhsKE2dhaWxfcmV3YXJkX2VuYWJsZWQYBCABKAgSIAoYY3Vy", |
|||
"aW9zaXR5X3Jld2FyZF9lbmFibGVkGAUgASgIEhoKEnJuZF9yZXdhcmRfZW5h", |
|||
"YmxlZBgGIAEoCBIiChpiZWhhdmlvcmFsX2Nsb25pbmdfZW5hYmxlZBgHIAEo", |
|||
"CBIZChFyZWN1cnJlbnRfZW5hYmxlZBgIIAEoCBIWCg52aXN1YWxfZW5jb2Rl", |
|||
"chgJIAEoCRIaChJudW1fbmV0d29ya19sYXllcnMYCiABKAUSIAoYbnVtX25l", |
|||
"dHdvcmtfaGlkZGVuX3VuaXRzGAsgASgFEhgKEHRyYWluZXJfdGhyZWFkZWQY", |
|||
"DCABKAgSGQoRc2VsZl9wbGF5X2VuYWJsZWQYDSABKAgSGgoSY3VycmljdWx1", |
|||
"bV9lbmFibGVkGA4gASgIQiWqAiJVbml0eS5NTEFnZW50cy5Db21tdW5pY2F0", |
|||
"b3JPYmplY3RzYgZwcm90bzM=")); |
|||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
|||
new pbr::FileDescriptor[] { }, |
|||
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { |
|||
new pbr::GeneratedClrTypeInfo(typeof(global::Unity.MLAgents.CommunicatorObjects.TrainingEnvironmentInitialized), global::Unity.MLAgents.CommunicatorObjects.TrainingEnvironmentInitialized.Parser, new[]{ "MlagentsVersion", "MlagentsEnvsVersion", "PythonVersion", "TorchVersion", "TorchDeviceType", "NumEnvs", "NumEnvironmentParameters" }, null, null, null), |
|||
new pbr::GeneratedClrTypeInfo(typeof(global::Unity.MLAgents.CommunicatorObjects.TrainingBehaviorInitialized), global::Unity.MLAgents.CommunicatorObjects.TrainingBehaviorInitialized.Parser, new[]{ "BehaviorName", "TrainerType", "ExtrinsicRewardEnabled", "GailRewardEnabled", "CuriosityRewardEnabled", "RndRewardEnabled", "BehavioralCloningEnabled", "RecurrentEnabled", "VisualEncoder", "NumNetworkLayers", "NumNetworkHiddenUnits", "TrainerThreaded", "SelfPlayEnabled", "CurriculumEnabled" }, null, null, null) |
|||
})); |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
#region Messages
|
|||
internal sealed partial class TrainingEnvironmentInitialized : pb::IMessage<TrainingEnvironmentInitialized> { |
|||
private static readonly pb::MessageParser<TrainingEnvironmentInitialized> _parser = new pb::MessageParser<TrainingEnvironmentInitialized>(() => new TrainingEnvironmentInitialized()); |
|||
private pb::UnknownFieldSet _unknownFields; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public static pb::MessageParser<TrainingEnvironmentInitialized> Parser { get { return _parser; } } |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public static pbr::MessageDescriptor Descriptor { |
|||
get { return global::Unity.MLAgents.CommunicatorObjects.TrainingAnalyticsReflection.Descriptor.MessageTypes[0]; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
pbr::MessageDescriptor pb::IMessage.Descriptor { |
|||
get { return Descriptor; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public TrainingEnvironmentInitialized() { |
|||
OnConstruction(); |
|||
} |
|||
|
|||
partial void OnConstruction(); |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public TrainingEnvironmentInitialized(TrainingEnvironmentInitialized other) : this() { |
|||
mlagentsVersion_ = other.mlagentsVersion_; |
|||
mlagentsEnvsVersion_ = other.mlagentsEnvsVersion_; |
|||
pythonVersion_ = other.pythonVersion_; |
|||
torchVersion_ = other.torchVersion_; |
|||
torchDeviceType_ = other.torchDeviceType_; |
|||
numEnvs_ = other.numEnvs_; |
|||
numEnvironmentParameters_ = other.numEnvironmentParameters_; |
|||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public TrainingEnvironmentInitialized Clone() { |
|||
return new TrainingEnvironmentInitialized(this); |
|||
} |
|||
|
|||
/// <summary>Field number for the "mlagents_version" field.</summary>
|
|||
public const int MlagentsVersionFieldNumber = 1; |
|||
private string mlagentsVersion_ = ""; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public string MlagentsVersion { |
|||
get { return mlagentsVersion_; } |
|||
set { |
|||
mlagentsVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "mlagents_envs_version" field.</summary>
|
|||
public const int MlagentsEnvsVersionFieldNumber = 2; |
|||
private string mlagentsEnvsVersion_ = ""; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public string MlagentsEnvsVersion { |
|||
get { return mlagentsEnvsVersion_; } |
|||
set { |
|||
mlagentsEnvsVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "python_version" field.</summary>
|
|||
public const int PythonVersionFieldNumber = 3; |
|||
private string pythonVersion_ = ""; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public string PythonVersion { |
|||
get { return pythonVersion_; } |
|||
set { |
|||
pythonVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "torch_version" field.</summary>
|
|||
public const int TorchVersionFieldNumber = 4; |
|||
private string torchVersion_ = ""; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public string TorchVersion { |
|||
get { return torchVersion_; } |
|||
set { |
|||
torchVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "torch_device_type" field.</summary>
|
|||
public const int TorchDeviceTypeFieldNumber = 5; |
|||
private string torchDeviceType_ = ""; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public string TorchDeviceType { |
|||
get { return torchDeviceType_; } |
|||
set { |
|||
torchDeviceType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "num_envs" field.</summary>
|
|||
public const int NumEnvsFieldNumber = 6; |
|||
private int numEnvs_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int NumEnvs { |
|||
get { return numEnvs_; } |
|||
set { |
|||
numEnvs_ = value; |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "num_environment_parameters" field.</summary>
|
|||
public const int NumEnvironmentParametersFieldNumber = 7; |
|||
private int numEnvironmentParameters_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int NumEnvironmentParameters { |
|||
get { return numEnvironmentParameters_; } |
|||
set { |
|||
numEnvironmentParameters_ = value; |
|||
} |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override bool Equals(object other) { |
|||
return Equals(other as TrainingEnvironmentInitialized); |
|||
} |
|||
|
|||