浏览代码
Rename protobuf objects to be suffixed with 'Proto' in python and C#. (#2646)
/develop-gpu-test
Rename protobuf objects to be suffixed with 'Proto' in python and C#. (#2646)
/develop-gpu-test
GitHub
5 年前
当前提交
2f74b3cc
共有 143 个文件被更改,包括 1921 次插入 和 933 次删除
-
4UnitySDK/Assets/ML-Agents/Scripts/Academy.cs
-
10UnitySDK/Assets/ML-Agents/Scripts/Agent.cs
-
20UnitySDK/Assets/ML-Agents/Scripts/Batcher.cs
-
27UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/CustomAction.cs
-
28UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/CustomObservation.cs
-
28UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/CustomResetParameters.cs
-
28UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/Header.cs
-
49UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/UnityInput.cs
-
58UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/UnityMessage.cs
-
50UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/UnityOutput.cs
-
27UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/UnityRlInitializationInput.cs
-
44UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/UnityRlInitializationOutput.cs
-
68UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/UnityRlInput.cs
-
56UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/UnityRlOutput.cs
-
8UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/UnityToExternal.cs
-
48UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/UnityToExternalGrpc.cs
-
2UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/AgentAction.cs.meta
-
44UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/AgentInfo.cs
-
2UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/AgentInfo.cs.meta
-
2UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/BrainParameters.cs.meta
-
2UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/Command.cs.meta
-
25UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/DemonstrationMeta.cs
-
2UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/DemonstrationMeta.cs.meta
-
26UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/EngineConfiguration.cs
-
2UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/EngineConfiguration.cs.meta
-
2UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/EnvironmentParameters.cs.meta
-
22UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/Resolution.cs
-
2UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/SpaceType.cs.meta
-
19UnitySDK/Assets/ML-Agents/Scripts/Grpc/RpcCommunicator.cs
-
6UnitySDK/Assets/ML-Agents/Scripts/ICommunicator.cs
-
18UnitySDK/Assets/ML-Agents/Scripts/SocketCommunicator.cs
-
6ml-agents-envs/mlagents/envs/brain.py
-
8ml-agents-envs/mlagents/envs/communicator.py
-
20ml-agents-envs/mlagents/envs/communicator_objects/custom_action_pb2.py
-
4ml-agents-envs/mlagents/envs/communicator_objects/custom_action_pb2.pyi
-
20ml-agents-envs/mlagents/envs/communicator_objects/custom_observation_pb2.py
-
4ml-agents-envs/mlagents/envs/communicator_objects/custom_observation_pb2.pyi
-
20ml-agents-envs/mlagents/envs/communicator_objects/custom_reset_parameters_pb2.py
-
4ml-agents-envs/mlagents/envs/communicator_objects/custom_reset_parameters_pb2.pyi
-
24ml-agents-envs/mlagents/envs/communicator_objects/header_pb2.py
-
4ml-agents-envs/mlagents/envs/communicator_objects/header_pb2.pyi
-
28ml-agents-envs/mlagents/envs/communicator_objects/unity_input_pb2.py
-
16ml-agents-envs/mlagents/envs/communicator_objects/unity_input_pb2.pyi
-
32ml-agents-envs/mlagents/envs/communicator_objects/unity_message_pb2.py
-
22ml-agents-envs/mlagents/envs/communicator_objects/unity_message_pb2.pyi
-
28ml-agents-envs/mlagents/envs/communicator_objects/unity_output_pb2.py
-
16ml-agents-envs/mlagents/envs/communicator_objects/unity_output_pb2.pyi
-
22ml-agents-envs/mlagents/envs/communicator_objects/unity_rl_initialization_input_pb2.py
-
4ml-agents-envs/mlagents/envs/communicator_objects/unity_rl_initialization_input_pb2.pyi
-
42ml-agents-envs/mlagents/envs/communicator_objects/unity_rl_initialization_output_pb2.py
-
20ml-agents-envs/mlagents/envs/communicator_objects/unity_rl_initialization_output_pb2.pyi
-
92ml-agents-envs/mlagents/envs/communicator_objects/unity_rl_input_pb2.py
-
40ml-agents-envs/mlagents/envs/communicator_objects/unity_rl_input_pb2.pyi
-
78ml-agents-envs/mlagents/envs/communicator_objects/unity_rl_output_pb2.py
-
24ml-agents-envs/mlagents/envs/communicator_objects/unity_rl_output_pb2.pyi
-
20ml-agents-envs/mlagents/envs/communicator_objects/unity_to_external_pb2.py
-
18ml-agents-envs/mlagents/envs/communicator_objects/unity_to_external_pb2_grpc.py
-
14ml-agents-envs/mlagents/envs/communicator_objects/agent_action_pb2.py
-
6ml-agents-envs/mlagents/envs/communicator_objects/agent_action_pb2.pyi
-
14ml-agents-envs/mlagents/envs/communicator_objects/agent_info_pb2.py
-
6ml-agents-envs/mlagents/envs/communicator_objects/agent_info_pb2.pyi
-
22ml-agents-envs/mlagents/envs/communicator_objects/brain_parameters_pb2.py
-
10ml-agents-envs/mlagents/envs/communicator_objects/command_pb2.py
-
12ml-agents-envs/mlagents/envs/communicator_objects/demonstration_meta_pb2.py
-
12ml-agents-envs/mlagents/envs/communicator_objects/engine_configuration_pb2.py
-
20ml-agents-envs/mlagents/envs/communicator_objects/environment_parameters_pb2.py
-
6ml-agents-envs/mlagents/envs/communicator_objects/environment_parameters_pb2.pyi
-
12ml-agents-envs/mlagents/envs/communicator_objects/resolution_pb2.py
-
42ml-agents-envs/mlagents/envs/environment.py
-
30ml-agents-envs/mlagents/envs/mock_communicator.py
-
26ml-agents-envs/mlagents/envs/rpc_communicator.py
-
20ml-agents-envs/mlagents/envs/socket_communicator.py
-
8ml-agents/mlagents/trainers/demo_loader.py
-
2ml-agents/mlagents/trainers/tests/test_simple_rl.py
-
2protobuf-definitions/proto/mlagents/envs/communicator_objects/custom_action.proto
-
2protobuf-definitions/proto/mlagents/envs/communicator_objects/custom_observation.proto
-
2protobuf-definitions/proto/mlagents/envs/communicator_objects/custom_reset_parameters.proto
-
2protobuf-definitions/proto/mlagents/envs/communicator_objects/header.proto
-
6protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_input.proto
-
8protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_message.proto
-
6protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_output.proto
-
2protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_rl_initialization_input.proto
-
6protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_rl_initialization_output.proto
-
8protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_rl_input.proto
-
4protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_rl_output.proto
-
4protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_to_external.proto
-
2protobuf-definitions/proto/mlagents/envs/communicator_objects/agent_action.proto
-
2protobuf-definitions/proto/mlagents/envs/communicator_objects/agent_info.proto
-
2protobuf-definitions/proto/mlagents/envs/communicator_objects/environment_parameters.proto
-
2protobuf-definitions/proto/mlagents/envs/communicator_objects/space_type.proto
-
282UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/AgentAction.cs
-
356UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/BrainParameters.cs
-
49UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/Command.cs
-
207UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/EnvironmentParameters.cs
-
49UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/SpaceType.cs
-
66ml-agents-envs/mlagents/envs/communicator_objects/brain_parameters_pb2.pyi
-
61ml-agents-envs/mlagents/envs/communicator_objects/space_type_pb2.py
-
18protobuf-definitions/proto/mlagents/envs/communicator_objects/brain_parameters.proto
-
50UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/SpaceTypeProto.cs
-
49UnitySDK/Assets/ML-Agents/Scripts/Grpc/CommunicatorObjects/CommandProto.cs
|
|||
// <auto-generated>
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|||
// source: mlagents/envs/communicator_objects/agent_action.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 MLAgents.CommunicatorObjects { |
|||
|
|||
/// <summary>Holder for reflection information generated from mlagents/envs/communicator_objects/agent_action.proto</summary>
|
|||
public static partial class AgentActionReflection { |
|||
|
|||
#region Descriptor
|
|||
/// <summary>File descriptor for mlagents/envs/communicator_objects/agent_action.proto</summary>
|
|||
public static pbr::FileDescriptor Descriptor { |
|||
get { return descriptor; } |
|||
} |
|||
private static pbr::FileDescriptor descriptor; |
|||
|
|||
static AgentActionReflection() { |
|||
byte[] descriptorData = global::System.Convert.FromBase64String( |
|||
string.Concat( |
|||
"CjVtbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL2FnZW50X2Fj", |
|||
"dGlvbi5wcm90bxIUY29tbXVuaWNhdG9yX29iamVjdHMaNm1sYWdlbnRzL2Vu", |
|||
"dnMvY29tbXVuaWNhdG9yX29iamVjdHMvY3VzdG9tX2FjdGlvbi5wcm90byKh", |
|||
"AQoQQWdlbnRBY3Rpb25Qcm90bxIWCg52ZWN0b3JfYWN0aW9ucxgBIAMoAhIU", |
|||
"Cgx0ZXh0X2FjdGlvbnMYAiABKAkSEAoIbWVtb3JpZXMYAyADKAISDQoFdmFs", |
|||
"dWUYBCABKAISPgoNY3VzdG9tX2FjdGlvbhgFIAEoCzInLmNvbW11bmljYXRv", |
|||
"cl9vYmplY3RzLkN1c3RvbUFjdGlvblByb3RvQh+qAhxNTEFnZW50cy5Db21t", |
|||
"dW5pY2F0b3JPYmplY3RzYgZwcm90bzM=")); |
|||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
|||
new pbr::FileDescriptor[] { global::MLAgents.CommunicatorObjects.CustomActionReflection.Descriptor, }, |
|||
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { |
|||
new pbr::GeneratedClrTypeInfo(typeof(global::MLAgents.CommunicatorObjects.AgentActionProto), global::MLAgents.CommunicatorObjects.AgentActionProto.Parser, new[]{ "VectorActions", "TextActions", "Memories", "Value", "CustomAction" }, null, null, null) |
|||
})); |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
#region Messages
|
|||
public sealed partial class AgentActionProto : pb::IMessage<AgentActionProto> { |
|||
private static readonly pb::MessageParser<AgentActionProto> _parser = new pb::MessageParser<AgentActionProto>(() => new AgentActionProto()); |
|||
private pb::UnknownFieldSet _unknownFields; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public static pb::MessageParser<AgentActionProto> Parser { get { return _parser; } } |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public static pbr::MessageDescriptor Descriptor { |
|||
get { return global::MLAgents.CommunicatorObjects.AgentActionReflection.Descriptor.MessageTypes[0]; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
pbr::MessageDescriptor pb::IMessage.Descriptor { |
|||
get { return Descriptor; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public AgentActionProto() { |
|||
OnConstruction(); |
|||
} |
|||
|
|||
partial void OnConstruction(); |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public AgentActionProto(AgentActionProto other) : this() { |
|||
vectorActions_ = other.vectorActions_.Clone(); |
|||
textActions_ = other.textActions_; |
|||
memories_ = other.memories_.Clone(); |
|||
value_ = other.value_; |
|||
CustomAction = other.customAction_ != null ? other.CustomAction.Clone() : null; |
|||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public AgentActionProto Clone() { |
|||
return new AgentActionProto(this); |
|||
} |
|||
|
|||
/// <summary>Field number for the "vector_actions" field.</summary>
|
|||
public const int VectorActionsFieldNumber = 1; |
|||
private static readonly pb::FieldCodec<float> _repeated_vectorActions_codec |
|||
= pb::FieldCodec.ForFloat(10); |
|||
private readonly pbc::RepeatedField<float> vectorActions_ = new pbc::RepeatedField<float>(); |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public pbc::RepeatedField<float> VectorActions { |
|||
get { return vectorActions_; } |
|||
} |
|||
|
|||
/// <summary>Field number for the "text_actions" field.</summary>
|
|||
public const int TextActionsFieldNumber = 2; |
|||
private string textActions_ = ""; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public string TextActions { |
|||
get { return textActions_; } |
|||
set { |
|||
textActions_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "memories" field.</summary>
|
|||
public const int MemoriesFieldNumber = 3; |
|||
private static readonly pb::FieldCodec<float> _repeated_memories_codec |
|||
= pb::FieldCodec.ForFloat(26); |
|||
private readonly pbc::RepeatedField<float> memories_ = new pbc::RepeatedField<float>(); |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public pbc::RepeatedField<float> Memories { |
|||
get { return memories_; } |
|||
} |
|||
|
|||
/// <summary>Field number for the "value" field.</summary>
|
|||
public const int ValueFieldNumber = 4; |
|||
private float value_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public float Value { |
|||
get { return value_; } |
|||
set { |
|||
value_ = value; |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "custom_action" field.</summary>
|
|||
public const int CustomActionFieldNumber = 5; |
|||
private global::MLAgents.CommunicatorObjects.CustomActionProto customAction_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public global::MLAgents.CommunicatorObjects.CustomActionProto CustomAction { |
|||
get { return customAction_; } |
|||
set { |
|||
customAction_ = value; |
|||
} |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override bool Equals(object other) { |
|||
return Equals(other as AgentActionProto); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public bool Equals(AgentActionProto other) { |
|||
if (ReferenceEquals(other, null)) { |
|||
return false; |
|||
} |
|||
if (ReferenceEquals(other, this)) { |
|||
return true; |
|||
} |
|||
if(!vectorActions_.Equals(other.vectorActions_)) return false; |
|||
if (TextActions != other.TextActions) return false; |
|||
if(!memories_.Equals(other.memories_)) return false; |
|||
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Value, other.Value)) return false; |
|||
if (!object.Equals(CustomAction, other.CustomAction)) return false; |
|||
return Equals(_unknownFields, other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override int GetHashCode() { |
|||
int hash = 1; |
|||
hash ^= vectorActions_.GetHashCode(); |
|||
if (TextActions.Length != 0) hash ^= TextActions.GetHashCode(); |
|||
hash ^= memories_.GetHashCode(); |
|||
if (Value != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Value); |
|||
if (customAction_ != null) hash ^= CustomAction.GetHashCode(); |
|||
if (_unknownFields != null) { |
|||
hash ^= _unknownFields.GetHashCode(); |
|||
} |
|||
return hash; |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override string ToString() { |
|||
return pb::JsonFormatter.ToDiagnosticString(this); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void WriteTo(pb::CodedOutputStream output) { |
|||
vectorActions_.WriteTo(output, _repeated_vectorActions_codec); |
|||
if (TextActions.Length != 0) { |
|||
output.WriteRawTag(18); |
|||
output.WriteString(TextActions); |
|||
} |
|||
memories_.WriteTo(output, _repeated_memories_codec); |
|||
if (Value != 0F) { |
|||
output.WriteRawTag(37); |
|||
output.WriteFloat(Value); |
|||
} |
|||
if (customAction_ != null) { |
|||
output.WriteRawTag(42); |
|||
output.WriteMessage(CustomAction); |
|||
} |
|||
if (_unknownFields != null) { |
|||
_unknownFields.WriteTo(output); |
|||
} |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int CalculateSize() { |
|||
int size = 0; |
|||
size += vectorActions_.CalculateSize(_repeated_vectorActions_codec); |
|||
if (TextActions.Length != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeStringSize(TextActions); |
|||
} |
|||
size += memories_.CalculateSize(_repeated_memories_codec); |
|||
if (Value != 0F) { |
|||
size += 1 + 4; |
|||
} |
|||
if (customAction_ != null) { |
|||
size += 1 + pb::CodedOutputStream.ComputeMessageSize(CustomAction); |
|||
} |
|||
if (_unknownFields != null) { |
|||
size += _unknownFields.CalculateSize(); |
|||
} |
|||
return size; |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void MergeFrom(AgentActionProto other) { |
|||
if (other == null) { |
|||
return; |
|||
} |
|||
vectorActions_.Add(other.vectorActions_); |
|||
if (other.TextActions.Length != 0) { |
|||
TextActions = other.TextActions; |
|||
} |
|||
memories_.Add(other.memories_); |
|||
if (other.Value != 0F) { |
|||
Value = other.Value; |
|||
} |
|||
if (other.customAction_ != null) { |
|||
if (customAction_ == null) { |
|||
customAction_ = new global::MLAgents.CommunicatorObjects.CustomActionProto(); |
|||
} |
|||
CustomAction.MergeFrom(other.CustomAction); |
|||
} |
|||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void MergeFrom(pb::CodedInputStream input) { |
|||
uint tag; |
|||
while ((tag = input.ReadTag()) != 0) { |
|||
switch(tag) { |
|||
default: |
|||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
|||
break; |
|||
case 10: |
|||
case 13: { |
|||
vectorActions_.AddEntriesFrom(input, _repeated_vectorActions_codec); |
|||
break; |
|||
} |
|||
case 18: { |
|||
TextActions = input.ReadString(); |
|||
break; |
|||
} |
|||
case 26: |
|||
case 29: { |
|||
memories_.AddEntriesFrom(input, _repeated_memories_codec); |
|||
break; |
|||
} |
|||
case 37: { |
|||
Value = input.ReadFloat(); |
|||
break; |
|||
} |
|||
case 42: { |
|||
if (customAction_ == null) { |
|||
customAction_ = new global::MLAgents.CommunicatorObjects.CustomActionProto(); |
|||
} |
|||
input.ReadMessage(customAction_); |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
} |
|||
|
|||
#endregion Designer generated code
|
|
|||
// <auto-generated>
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|||
// source: mlagents/envs/communicator_objects/brain_parameters.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 MLAgents.CommunicatorObjects { |
|||
|
|||
/// <summary>Holder for reflection information generated from mlagents/envs/communicator_objects/brain_parameters.proto</summary>
|
|||
public static partial class BrainParametersReflection { |
|||
|
|||
#region Descriptor
|
|||
/// <summary>File descriptor for mlagents/envs/communicator_objects/brain_parameters.proto</summary>
|
|||
public static pbr::FileDescriptor Descriptor { |
|||
get { return descriptor; } |
|||
} |
|||
private static pbr::FileDescriptor descriptor; |
|||
|
|||
static BrainParametersReflection() { |
|||
byte[] descriptorData = global::System.Convert.FromBase64String( |
|||
string.Concat( |
|||
"CjltbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL2JyYWluX3Bh", |
|||
"cmFtZXRlcnMucHJvdG8SFGNvbW11bmljYXRvcl9vYmplY3RzGjNtbGFnZW50", |
|||
"cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL3Jlc29sdXRpb24ucHJvdG8a", |
|||
"M21sYWdlbnRzL2VudnMvY29tbXVuaWNhdG9yX29iamVjdHMvc3BhY2VfdHlw", |
|||
"ZS5wcm90byLUAgoUQnJhaW5QYXJhbWV0ZXJzUHJvdG8SHwoXdmVjdG9yX29i", |
|||
"c2VydmF0aW9uX3NpemUYASABKAUSJwofbnVtX3N0YWNrZWRfdmVjdG9yX29i", |
|||
"c2VydmF0aW9ucxgCIAEoBRIaChJ2ZWN0b3JfYWN0aW9uX3NpemUYAyADKAUS", |
|||
"QQoSY2FtZXJhX3Jlc29sdXRpb25zGAQgAygLMiUuY29tbXVuaWNhdG9yX29i", |
|||
"amVjdHMuUmVzb2x1dGlvblByb3RvEiIKGnZlY3Rvcl9hY3Rpb25fZGVzY3Jp", |
|||
"cHRpb25zGAUgAygJEkYKGHZlY3Rvcl9hY3Rpb25fc3BhY2VfdHlwZRgGIAEo", |
|||
"DjIkLmNvbW11bmljYXRvcl9vYmplY3RzLlNwYWNlVHlwZVByb3RvEhIKCmJy", |
|||
"YWluX25hbWUYByABKAkSEwoLaXNfdHJhaW5pbmcYCCABKAhCH6oCHE1MQWdl", |
|||
"bnRzLkNvbW11bmljYXRvck9iamVjdHNiBnByb3RvMw==")); |
|||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
|||
new pbr::FileDescriptor[] { global::MLAgents.CommunicatorObjects.ResolutionReflection.Descriptor, global::MLAgents.CommunicatorObjects.SpaceTypeReflection.Descriptor, }, |
|||
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { |
|||
new pbr::GeneratedClrTypeInfo(typeof(global::MLAgents.CommunicatorObjects.BrainParametersProto), global::MLAgents.CommunicatorObjects.BrainParametersProto.Parser, new[]{ "VectorObservationSize", "NumStackedVectorObservations", "VectorActionSize", "CameraResolutions", "VectorActionDescriptions", "VectorActionSpaceType", "BrainName", "IsTraining" }, null, null, null) |
|||
})); |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
#region Messages
|
|||
public sealed partial class BrainParametersProto : pb::IMessage<BrainParametersProto> { |
|||
private static readonly pb::MessageParser<BrainParametersProto> _parser = new pb::MessageParser<BrainParametersProto>(() => new BrainParametersProto()); |
|||
private pb::UnknownFieldSet _unknownFields; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public static pb::MessageParser<BrainParametersProto> Parser { get { return _parser; } } |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public static pbr::MessageDescriptor Descriptor { |
|||
get { return global::MLAgents.CommunicatorObjects.BrainParametersReflection.Descriptor.MessageTypes[0]; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
pbr::MessageDescriptor pb::IMessage.Descriptor { |
|||
get { return Descriptor; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public BrainParametersProto() { |
|||
OnConstruction(); |
|||
} |
|||
|
|||
partial void OnConstruction(); |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public BrainParametersProto(BrainParametersProto other) : this() { |
|||
vectorObservationSize_ = other.vectorObservationSize_; |
|||
numStackedVectorObservations_ = other.numStackedVectorObservations_; |
|||
vectorActionSize_ = other.vectorActionSize_.Clone(); |
|||
cameraResolutions_ = other.cameraResolutions_.Clone(); |
|||
vectorActionDescriptions_ = other.vectorActionDescriptions_.Clone(); |
|||
vectorActionSpaceType_ = other.vectorActionSpaceType_; |
|||
brainName_ = other.brainName_; |
|||
isTraining_ = other.isTraining_; |
|||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public BrainParametersProto Clone() { |
|||
return new BrainParametersProto(this); |
|||
} |
|||
|
|||
/// <summary>Field number for the "vector_observation_size" field.</summary>
|
|||
public const int VectorObservationSizeFieldNumber = 1; |
|||
private int vectorObservationSize_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int VectorObservationSize { |
|||
get { return vectorObservationSize_; } |
|||
set { |
|||
vectorObservationSize_ = value; |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "num_stacked_vector_observations" field.</summary>
|
|||
public const int NumStackedVectorObservationsFieldNumber = 2; |
|||
private int numStackedVectorObservations_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int NumStackedVectorObservations { |
|||
get { return numStackedVectorObservations_; } |
|||
set { |
|||
numStackedVectorObservations_ = value; |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "vector_action_size" field.</summary>
|
|||
public const int VectorActionSizeFieldNumber = 3; |
|||
private static readonly pb::FieldCodec<int> _repeated_vectorActionSize_codec |
|||
= pb::FieldCodec.ForInt32(26); |
|||
private readonly pbc::RepeatedField<int> vectorActionSize_ = new pbc::RepeatedField<int>(); |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public pbc::RepeatedField<int> VectorActionSize { |
|||
get { return vectorActionSize_; } |
|||
} |
|||
|
|||
/// <summary>Field number for the "camera_resolutions" field.</summary>
|
|||
public const int CameraResolutionsFieldNumber = 4; |
|||
private static readonly pb::FieldCodec<global::MLAgents.CommunicatorObjects.ResolutionProto> _repeated_cameraResolutions_codec |
|||
= pb::FieldCodec.ForMessage(34, global::MLAgents.CommunicatorObjects.ResolutionProto.Parser); |
|||
private readonly pbc::RepeatedField<global::MLAgents.CommunicatorObjects.ResolutionProto> cameraResolutions_ = new pbc::RepeatedField<global::MLAgents.CommunicatorObjects.ResolutionProto>(); |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public pbc::RepeatedField<global::MLAgents.CommunicatorObjects.ResolutionProto> CameraResolutions { |
|||
get { return cameraResolutions_; } |
|||
} |
|||
|
|||
/// <summary>Field number for the "vector_action_descriptions" field.</summary>
|
|||
public const int VectorActionDescriptionsFieldNumber = 5; |
|||
private static readonly pb::FieldCodec<string> _repeated_vectorActionDescriptions_codec |
|||
= pb::FieldCodec.ForString(42); |
|||
private readonly pbc::RepeatedField<string> vectorActionDescriptions_ = new pbc::RepeatedField<string>(); |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public pbc::RepeatedField<string> VectorActionDescriptions { |
|||
get { return vectorActionDescriptions_; } |
|||
} |
|||
|
|||
/// <summary>Field number for the "vector_action_space_type" field.</summary>
|
|||
public const int VectorActionSpaceTypeFieldNumber = 6; |
|||
private global::MLAgents.CommunicatorObjects.SpaceTypeProto vectorActionSpaceType_ = 0; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public global::MLAgents.CommunicatorObjects.SpaceTypeProto VectorActionSpaceType { |
|||
get { return vectorActionSpaceType_; } |
|||
set { |
|||
vectorActionSpaceType_ = value; |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "brain_name" field.</summary>
|
|||
public const int BrainNameFieldNumber = 7; |
|||
private string brainName_ = ""; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public string BrainName { |
|||
get { return brainName_; } |
|||
set { |
|||
brainName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "is_training" field.</summary>
|
|||
public const int IsTrainingFieldNumber = 8; |
|||
private bool isTraining_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public bool IsTraining { |
|||
get { return isTraining_; } |
|||
set { |
|||
isTraining_ = value; |
|||
} |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override bool Equals(object other) { |
|||
return Equals(other as BrainParametersProto); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public bool Equals(BrainParametersProto other) { |
|||
if (ReferenceEquals(other, null)) { |
|||
return false; |
|||
} |
|||
if (ReferenceEquals(other, this)) { |
|||
return true; |
|||
} |
|||
if (VectorObservationSize != other.VectorObservationSize) return false; |
|||
if (NumStackedVectorObservations != other.NumStackedVectorObservations) return false; |
|||
if(!vectorActionSize_.Equals(other.vectorActionSize_)) return false; |
|||
if(!cameraResolutions_.Equals(other.cameraResolutions_)) return false; |
|||
if(!vectorActionDescriptions_.Equals(other.vectorActionDescriptions_)) return false; |
|||
if (VectorActionSpaceType != other.VectorActionSpaceType) return false; |
|||
if (BrainName != other.BrainName) return false; |
|||
if (IsTraining != other.IsTraining) return false; |
|||
return Equals(_unknownFields, other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override int GetHashCode() { |
|||
int hash = 1; |
|||
if (VectorObservationSize != 0) hash ^= VectorObservationSize.GetHashCode(); |
|||
if (NumStackedVectorObservations != 0) hash ^= NumStackedVectorObservations.GetHashCode(); |
|||
hash ^= vectorActionSize_.GetHashCode(); |
|||
hash ^= cameraResolutions_.GetHashCode(); |
|||
hash ^= vectorActionDescriptions_.GetHashCode(); |
|||
if (VectorActionSpaceType != 0) hash ^= VectorActionSpaceType.GetHashCode(); |
|||
if (BrainName.Length != 0) hash ^= BrainName.GetHashCode(); |
|||
if (IsTraining != false) hash ^= IsTraining.GetHashCode(); |
|||
if (_unknownFields != null) { |
|||
hash ^= _unknownFields.GetHashCode(); |
|||
} |
|||
return hash; |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override string ToString() { |
|||
return pb::JsonFormatter.ToDiagnosticString(this); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void WriteTo(pb::CodedOutputStream output) { |
|||
if (VectorObservationSize != 0) { |
|||
output.WriteRawTag(8); |
|||
output.WriteInt32(VectorObservationSize); |
|||
} |
|||
if (NumStackedVectorObservations != 0) { |
|||
output.WriteRawTag(16); |
|||
output.WriteInt32(NumStackedVectorObservations); |
|||
} |
|||
vectorActionSize_.WriteTo(output, _repeated_vectorActionSize_codec); |
|||
cameraResolutions_.WriteTo(output, _repeated_cameraResolutions_codec); |
|||
vectorActionDescriptions_.WriteTo(output, _repeated_vectorActionDescriptions_codec); |
|||
if (VectorActionSpaceType != 0) { |
|||
output.WriteRawTag(48); |
|||
output.WriteEnum((int) VectorActionSpaceType); |
|||
} |
|||
if (BrainName.Length != 0) { |
|||
output.WriteRawTag(58); |
|||
output.WriteString(BrainName); |
|||
} |
|||
if (IsTraining != false) { |
|||
output.WriteRawTag(64); |
|||
output.WriteBool(IsTraining); |
|||
} |
|||
if (_unknownFields != null) { |
|||
_unknownFields.WriteTo(output); |
|||
} |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int CalculateSize() { |
|||
int size = 0; |
|||
if (VectorObservationSize != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeInt32Size(VectorObservationSize); |
|||
} |
|||
if (NumStackedVectorObservations != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumStackedVectorObservations); |
|||
} |
|||
size += vectorActionSize_.CalculateSize(_repeated_vectorActionSize_codec); |
|||
size += cameraResolutions_.CalculateSize(_repeated_cameraResolutions_codec); |
|||
size += vectorActionDescriptions_.CalculateSize(_repeated_vectorActionDescriptions_codec); |
|||
if (VectorActionSpaceType != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) VectorActionSpaceType); |
|||
} |
|||
if (BrainName.Length != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeStringSize(BrainName); |
|||
} |
|||
if (IsTraining != false) { |
|||
size += 1 + 1; |
|||
} |
|||
if (_unknownFields != null) { |
|||
size += _unknownFields.CalculateSize(); |
|||
} |
|||
return size; |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void MergeFrom(BrainParametersProto other) { |
|||
if (other == null) { |
|||
return; |
|||
} |
|||
if (other.VectorObservationSize != 0) { |
|||
VectorObservationSize = other.VectorObservationSize; |
|||
} |
|||
if (other.NumStackedVectorObservations != 0) { |
|||
NumStackedVectorObservations = other.NumStackedVectorObservations; |
|||
} |
|||
vectorActionSize_.Add(other.vectorActionSize_); |
|||
cameraResolutions_.Add(other.cameraResolutions_); |
|||
vectorActionDescriptions_.Add(other.vectorActionDescriptions_); |
|||
if (other.VectorActionSpaceType != 0) { |
|||
VectorActionSpaceType = other.VectorActionSpaceType; |
|||
} |
|||
if (other.BrainName.Length != 0) { |
|||
BrainName = other.BrainName; |
|||
} |
|||
if (other.IsTraining != false) { |
|||
IsTraining = other.IsTraining; |
|||
} |
|||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void MergeFrom(pb::CodedInputStream input) { |
|||
uint tag; |
|||
while ((tag = input.ReadTag()) != 0) { |
|||
switch(tag) { |
|||
default: |
|||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
|||
break; |
|||
case 8: { |
|||
VectorObservationSize = input.ReadInt32(); |
|||
break; |
|||
} |
|||
case 16: { |
|||
NumStackedVectorObservations = input.ReadInt32(); |
|||
break; |
|||
} |
|||
case 26: |
|||
case 24: { |
|||
vectorActionSize_.AddEntriesFrom(input, _repeated_vectorActionSize_codec); |
|||
break; |
|||
} |
|||
case 34: { |
|||
cameraResolutions_.AddEntriesFrom(input, _repeated_cameraResolutions_codec); |
|||
break; |
|||
} |
|||
case 42: { |
|||
vectorActionDescriptions_.AddEntriesFrom(input, _repeated_vectorActionDescriptions_codec); |
|||
break; |
|||
} |
|||
case 48: { |
|||
vectorActionSpaceType_ = (global::MLAgents.CommunicatorObjects.SpaceTypeProto) input.ReadEnum(); |
|||
break; |
|||
} |
|||
case 58: { |
|||
BrainName = input.ReadString(); |
|||
break; |
|||
} |
|||
case 64: { |
|||
IsTraining = input.ReadBool(); |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
} |
|||
|
|||
#endregion Designer generated code
|
|
|||
// <auto-generated>
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|||
// source: mlagents/envs/communicator_objects/command.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 MLAgents.CommunicatorObjects { |
|||
|
|||
/// <summary>Holder for reflection information generated from mlagents/envs/communicator_objects/command.proto</summary>
|
|||
public static partial class CommandReflection { |
|||
|
|||
#region Descriptor
|
|||
/// <summary>File descriptor for mlagents/envs/communicator_objects/command.proto</summary>
|
|||
public static pbr::FileDescriptor Descriptor { |
|||
get { return descriptor; } |
|||
} |
|||
private static pbr::FileDescriptor descriptor; |
|||
|
|||
static CommandReflection() { |
|||
byte[] descriptorData = global::System.Convert.FromBase64String( |
|||
string.Concat( |
|||
"CjBtbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL2NvbW1hbmQu", |
|||
"cHJvdG8SFGNvbW11bmljYXRvcl9vYmplY3RzKi0KDENvbW1hbmRQcm90bxII", |
|||
"CgRTVEVQEAASCQoFUkVTRVQQARIICgRRVUlUEAJCH6oCHE1MQWdlbnRzLkNv", |
|||
"bW11bmljYXRvck9iamVjdHNiBnByb3RvMw==")); |
|||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
|||
new pbr::FileDescriptor[] { }, |
|||
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::MLAgents.CommunicatorObjects.CommandProto), }, null)); |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
#region Enums
|
|||
public enum CommandProto { |
|||
[pbr::OriginalName("STEP")] Step = 0, |
|||
[pbr::OriginalName("RESET")] Reset = 1, |
|||
[pbr::OriginalName("QUIT")] Quit = 2, |
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
} |
|||
|
|||
#endregion Designer generated code
|
|
|||
// <auto-generated>
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|||
// source: mlagents/envs/communicator_objects/environment_parameters.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 MLAgents.CommunicatorObjects { |
|||
|
|||
/// <summary>Holder for reflection information generated from mlagents/envs/communicator_objects/environment_parameters.proto</summary>
|
|||
public static partial class EnvironmentParametersReflection { |
|||
|
|||
#region Descriptor
|
|||
/// <summary>File descriptor for mlagents/envs/communicator_objects/environment_parameters.proto</summary>
|
|||
public static pbr::FileDescriptor Descriptor { |
|||
get { return descriptor; } |
|||
} |
|||
private static pbr::FileDescriptor descriptor; |
|||
|
|||
static EnvironmentParametersReflection() { |
|||
byte[] descriptorData = global::System.Convert.FromBase64String( |
|||
string.Concat( |
|||
"Cj9tbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL2Vudmlyb25t", |
|||
"ZW50X3BhcmFtZXRlcnMucHJvdG8SFGNvbW11bmljYXRvcl9vYmplY3RzGkBt", |
|||
"bGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL2N1c3RvbV9yZXNl", |
|||
"dF9wYXJhbWV0ZXJzLnByb3RvIogCChpFbnZpcm9ubWVudFBhcmFtZXRlcnNQ", |
|||
"cm90bxJfChBmbG9hdF9wYXJhbWV0ZXJzGAEgAygLMkUuY29tbXVuaWNhdG9y", |
|||
"X29iamVjdHMuRW52aXJvbm1lbnRQYXJhbWV0ZXJzUHJvdG8uRmxvYXRQYXJh", |
|||
"bWV0ZXJzRW50cnkSUQoXY3VzdG9tX3Jlc2V0X3BhcmFtZXRlcnMYAiABKAsy", |
|||
"MC5jb21tdW5pY2F0b3Jfb2JqZWN0cy5DdXN0b21SZXNldFBhcmFtZXRlcnNQ", |
|||
"cm90bxo2ChRGbG9hdFBhcmFtZXRlcnNFbnRyeRILCgNrZXkYASABKAkSDQoF", |
|||
"dmFsdWUYAiABKAI6AjgBQh+qAhxNTEFnZW50cy5Db21tdW5pY2F0b3JPYmpl", |
|||
"Y3RzYgZwcm90bzM=")); |
|||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
|||
new pbr::FileDescriptor[] { global::MLAgents.CommunicatorObjects.CustomResetParametersReflection.Descriptor, }, |
|||
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { |
|||
new pbr::GeneratedClrTypeInfo(typeof(global::MLAgents.CommunicatorObjects.EnvironmentParametersProto), global::MLAgents.CommunicatorObjects.EnvironmentParametersProto.Parser, new[]{ "FloatParameters", "CustomResetParameters" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, }) |
|||
})); |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
#region Messages
|
|||
public sealed partial class EnvironmentParametersProto : pb::IMessage<EnvironmentParametersProto> { |
|||
private static readonly pb::MessageParser<EnvironmentParametersProto> _parser = new pb::MessageParser<EnvironmentParametersProto>(() => new EnvironmentParametersProto()); |
|||
private pb::UnknownFieldSet _unknownFields; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public static pb::MessageParser<EnvironmentParametersProto> Parser { get { return _parser; } } |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public static pbr::MessageDescriptor Descriptor { |
|||
get { return global::MLAgents.CommunicatorObjects.EnvironmentParametersReflection.Descriptor.MessageTypes[0]; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
pbr::MessageDescriptor pb::IMessage.Descriptor { |
|||
get { return Descriptor; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public EnvironmentParametersProto() { |
|||
OnConstruction(); |
|||
} |
|||
|
|||
partial void OnConstruction(); |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public EnvironmentParametersProto(EnvironmentParametersProto other) : this() { |
|||
floatParameters_ = other.floatParameters_.Clone(); |
|||
CustomResetParameters = other.customResetParameters_ != null ? other.CustomResetParameters.Clone() : null; |
|||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public EnvironmentParametersProto Clone() { |
|||
return new EnvironmentParametersProto(this); |
|||
} |
|||
|
|||
/// <summary>Field number for the "float_parameters" field.</summary>
|
|||
public const int FloatParametersFieldNumber = 1; |
|||
private static readonly pbc::MapField<string, float>.Codec _map_floatParameters_codec |
|||
= new pbc::MapField<string, float>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForFloat(21), 10); |
|||
private readonly pbc::MapField<string, float> floatParameters_ = new pbc::MapField<string, float>(); |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public pbc::MapField<string, float> FloatParameters { |
|||
get { return floatParameters_; } |
|||
} |
|||
|
|||
/// <summary>Field number for the "custom_reset_parameters" field.</summary>
|
|||
public const int CustomResetParametersFieldNumber = 2; |
|||
private global::MLAgents.CommunicatorObjects.CustomResetParametersProto customResetParameters_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public global::MLAgents.CommunicatorObjects.CustomResetParametersProto CustomResetParameters { |
|||
get { return customResetParameters_; } |
|||
set { |
|||
customResetParameters_ = value; |
|||
} |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override bool Equals(object other) { |
|||
return Equals(other as EnvironmentParametersProto); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public bool Equals(EnvironmentParametersProto other) { |
|||
if (ReferenceEquals(other, null)) { |
|||
return false; |
|||
} |
|||
if (ReferenceEquals(other, this)) { |
|||
return true; |
|||
} |
|||
if (!FloatParameters.Equals(other.FloatParameters)) return false; |
|||
if (!object.Equals(CustomResetParameters, other.CustomResetParameters)) return false; |
|||
return Equals(_unknownFields, other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override int GetHashCode() { |
|||
int hash = 1; |
|||
hash ^= FloatParameters.GetHashCode(); |
|||
if (customResetParameters_ != null) hash ^= CustomResetParameters.GetHashCode(); |
|||
if (_unknownFields != null) { |
|||
hash ^= _unknownFields.GetHashCode(); |
|||
} |
|||
return hash; |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override string ToString() { |
|||
return pb::JsonFormatter.ToDiagnosticString(this); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void WriteTo(pb::CodedOutputStream output) { |
|||
floatParameters_.WriteTo(output, _map_floatParameters_codec); |
|||
if (customResetParameters_ != null) { |
|||
output.WriteRawTag(18); |
|||
output.WriteMessage(CustomResetParameters); |
|||
} |
|||
if (_unknownFields != null) { |
|||
_unknownFields.WriteTo(output); |
|||
} |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int CalculateSize() { |
|||
int size = 0; |
|||
size += floatParameters_.CalculateSize(_map_floatParameters_codec); |
|||
if (customResetParameters_ != null) { |
|||
size += 1 + pb::CodedOutputStream.ComputeMessageSize(CustomResetParameters); |
|||
} |
|||
if (_unknownFields != null) { |
|||
size += _unknownFields.CalculateSize(); |
|||
} |
|||
return size; |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void MergeFrom(EnvironmentParametersProto other) { |
|||
if (other == null) { |
|||
return; |
|||
} |
|||
floatParameters_.Add(other.floatParameters_); |
|||
if (other.customResetParameters_ != null) { |
|||
if (customResetParameters_ == null) { |
|||
customResetParameters_ = new global::MLAgents.CommunicatorObjects.CustomResetParametersProto(); |
|||
} |
|||
CustomResetParameters.MergeFrom(other.CustomResetParameters); |
|||
} |
|||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void MergeFrom(pb::CodedInputStream input) { |
|||
uint tag; |
|||
while ((tag = input.ReadTag()) != 0) { |
|||
switch(tag) { |
|||
default: |
|||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
|||
break; |
|||
case 10: { |
|||
floatParameters_.AddEntriesFrom(input, _map_floatParameters_codec); |
|||
break; |
|||
} |
|||
case 18: { |
|||
if (customResetParameters_ == null) { |
|||
customResetParameters_ = new global::MLAgents.CommunicatorObjects.CustomResetParametersProto(); |
|||
} |
|||
input.ReadMessage(customResetParameters_); |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
} |
|||
|
|||
#endregion Designer generated code
|
|
|||
// <auto-generated>
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|||
// source: mlagents/envs/communicator_objects/space_type.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 MLAgents.CommunicatorObjects { |
|||
|
|||
/// <summary>Holder for reflection information generated from mlagents/envs/communicator_objects/space_type.proto</summary>
|
|||
public static partial class SpaceTypeReflection { |
|||
|
|||
#region Descriptor
|
|||
/// <summary>File descriptor for mlagents/envs/communicator_objects/space_type.proto</summary>
|
|||
public static pbr::FileDescriptor Descriptor { |
|||
get { return descriptor; } |
|||
} |
|||
private static pbr::FileDescriptor descriptor; |
|||
|
|||
static SpaceTypeReflection() { |
|||
byte[] descriptorData = global::System.Convert.FromBase64String( |
|||
string.Concat( |
|||
"CjNtbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL3NwYWNlX3R5", |
|||
"cGUucHJvdG8SFGNvbW11bmljYXRvcl9vYmplY3RzGjNtbGFnZW50cy9lbnZz", |
|||
"L2NvbW11bmljYXRvcl9vYmplY3RzL3Jlc29sdXRpb24ucHJvdG8qLgoOU3Bh", |
|||
"Y2VUeXBlUHJvdG8SDAoIZGlzY3JldGUQABIOCgpjb250aW51b3VzEAFCH6oC", |
|||
"HE1MQWdlbnRzLkNvbW11bmljYXRvck9iamVjdHNiBnByb3RvMw==")); |
|||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
|||
new pbr::FileDescriptor[] { global::MLAgents.CommunicatorObjects.ResolutionReflection.Descriptor, }, |
|||
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::MLAgents.CommunicatorObjects.SpaceTypeProto), }, null)); |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
#region Enums
|
|||
public enum SpaceTypeProto { |
|||
[pbr::OriginalName("discrete")] Discrete = 0, |
|||
[pbr::OriginalName("continuous")] Continuous = 1, |
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
} |
|||
|
|||
#endregion Designer generated code
|
|
|||
# @generated by generate_proto_mypy_stubs.py. Do not edit! |
|||
import sys |
|||
from google.protobuf.descriptor import ( |
|||
Descriptor as google___protobuf___descriptor___Descriptor, |
|||
) |
|||
|
|||
from google.protobuf.internal.containers import ( |
|||
RepeatedCompositeFieldContainer as google___protobuf___internal___containers___RepeatedCompositeFieldContainer, |
|||
RepeatedScalarFieldContainer as google___protobuf___internal___containers___RepeatedScalarFieldContainer, |
|||
) |
|||
|
|||
from google.protobuf.message import ( |
|||
Message as google___protobuf___message___Message, |
|||
) |
|||
|
|||
from mlagents.envs.communicator_objects.resolution_pb2 import ( |
|||
ResolutionProto as mlagents___envs___communicator_objects___resolution_pb2___ResolutionProto, |
|||
) |
|||
|
|||
from mlagents.envs.communicator_objects.space_type_pb2 import ( |
|||
SpaceTypeProto as mlagents___envs___communicator_objects___space_type_pb2___SpaceTypeProto, |
|||
) |
|||
|
|||
from typing import ( |
|||
Iterable as typing___Iterable, |
|||
Optional as typing___Optional, |
|||
Text as typing___Text, |
|||
) |
|||
|
|||
from typing_extensions import ( |
|||
Literal as typing_extensions___Literal, |
|||
) |
|||
|
|||
|
|||
class BrainParametersProto(google___protobuf___message___Message): |
|||
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... |
|||
vector_observation_size = ... # type: int |
|||
num_stacked_vector_observations = ... # type: int |
|||
vector_action_size = ... # type: google___protobuf___internal___containers___RepeatedScalarFieldContainer[int] |
|||
vector_action_descriptions = ... # type: google___protobuf___internal___containers___RepeatedScalarFieldContainer[typing___Text] |
|||
vector_action_space_type = ... # type: mlagents___envs___communicator_objects___space_type_pb2___SpaceTypeProto |
|||
brain_name = ... # type: typing___Text |
|||
is_training = ... # type: bool |
|||
|
|||
@property |
|||
def camera_resolutions(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[mlagents___envs___communicator_objects___resolution_pb2___ResolutionProto]: ... |
|||
|
|||
def __init__(self, |
|||
*, |
|||
vector_observation_size : typing___Optional[int] = None, |
|||
num_stacked_vector_observations : typing___Optional[int] = None, |
|||
vector_action_size : typing___Optional[typing___Iterable[int]] = None, |
|||
camera_resolutions : typing___Optional[typing___Iterable[mlagents___envs___communicator_objects___resolution_pb2___ResolutionProto]] = None, |
|||
vector_action_descriptions : typing___Optional[typing___Iterable[typing___Text]] = None, |
|||
vector_action_space_type : typing___Optional[mlagents___envs___communicator_objects___space_type_pb2___SpaceTypeProto] = None, |
|||
brain_name : typing___Optional[typing___Text] = None, |
|||
is_training : typing___Optional[bool] = None, |
|||
) -> None: ... |
|||
@classmethod |
|||
def FromString(cls, s: bytes) -> BrainParametersProto: ... |
|||
def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... |
|||
def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... |
|||
if sys.version_info >= (3,): |
|||
def ClearField(self, field_name: typing_extensions___Literal[u"brain_name",u"camera_resolutions",u"is_training",u"num_stacked_vector_observations",u"vector_action_descriptions",u"vector_action_size",u"vector_action_space_type",u"vector_observation_size"]) -> None: ... |
|||
else: |
|||
def ClearField(self, field_name: typing_extensions___Literal[u"brain_name",b"brain_name",u"camera_resolutions",b"camera_resolutions",u"is_training",b"is_training",u"num_stacked_vector_observations",b"num_stacked_vector_observations",u"vector_action_descriptions",b"vector_action_descriptions",u"vector_action_size",b"vector_action_size",u"vector_action_space_type",b"vector_action_space_type",u"vector_observation_size",b"vector_observation_size"]) -> None: ... |
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
|||
# source: mlagents/envs/communicator_objects/space_type.proto |
|||
|
|||
import sys |
|||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) |
|||
from google.protobuf.internal import enum_type_wrapper |
|||
from google.protobuf import descriptor as _descriptor |
|||
from google.protobuf import message as _message |
|||
from google.protobuf import reflection as _reflection |
|||
from google.protobuf import symbol_database as _symbol_database |
|||
from google.protobuf import descriptor_pb2 |
|||
# @@protoc_insertion_point(imports) |
|||
|
|||
_sym_db = _symbol_database.Default() |
|||
|
|||
|
|||
from mlagents.envs.communicator_objects import resolution_pb2 as mlagents_dot_envs_dot_communicator__objects_dot_resolution__pb2 |
|||
|
|||
|
|||
DESCRIPTOR = _descriptor.FileDescriptor( |
|||
name='mlagents/envs/communicator_objects/space_type.proto', |
|||
package='communicator_objects', |
|||
syntax='proto3', |
|||
serialized_pb=_b('\n3mlagents/envs/communicator_objects/space_type.proto\x12\x14\x63ommunicator_objects\x1a\x33mlagents/envs/communicator_objects/resolution.proto*.\n\x0eSpaceTypeProto\x12\x0c\n\x08\x64iscrete\x10\x00\x12\x0e\n\ncontinuous\x10\x01\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') |
|||
, |
|||
dependencies=[mlagents_dot_envs_dot_communicator__objects_dot_resolution__pb2.DESCRIPTOR,]) |
|||
|
|||
_SPACETYPEPROTO = _descriptor.EnumDescriptor( |
|||
name='SpaceTypeProto', |
|||
full_name='communicator_objects.SpaceTypeProto', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
values=[ |
|||
_descriptor.EnumValueDescriptor( |
|||
name='discrete', index=0, number=0, |
|||
options=None, |
|||
type=None), |
|||
_descriptor.EnumValueDescriptor( |
|||
name='continuous', index=1, number=1, |
|||
options=None, |
|||
type=None), |
|||
], |
|||
containing_type=None, |
|||
options=None, |
|||
serialized_start=130, |
|||
serialized_end=176, |
|||
) |
|||
_sym_db.RegisterEnumDescriptor(_SPACETYPEPROTO) |
|||
|
|||
SpaceTypeProto = enum_type_wrapper.EnumTypeWrapper(_SPACETYPEPROTO) |
|||
discrete = 0 |
|||
continuous = 1 |
|||
|
|||
|
|||
DESCRIPTOR.enum_types_by_name['SpaceTypeProto'] = _SPACETYPEPROTO |
|||
_sym_db.RegisterFileDescriptor(DESCRIPTOR) |
|||
|
|||
|
|||
DESCRIPTOR.has_options = True |
|||
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) |
|||
# @@protoc_insertion_point(module_scope) |
|
|||
syntax = "proto3"; |
|||
|
|||
import "mlagents/envs/communicator_objects/resolution.proto"; |
|||
import "mlagents/envs/communicator_objects/space_type.proto"; |
|||
|
|||
option csharp_namespace = "MLAgents.CommunicatorObjects"; |
|||
package communicator_objects; |
|||
|
|||
message BrainParametersProto { |
|||
int32 vector_observation_size = 1; |
|||
int32 num_stacked_vector_observations = 2; |
|||
repeated int32 vector_action_size = 3; |
|||
repeated ResolutionProto camera_resolutions = 4; |
|||
repeated string vector_action_descriptions = 5; |
|||
SpaceTypeProto vector_action_space_type = 6; |
|||
string brain_name = 7; |
|||
bool is_training = 8; |
|||
} |
|
|||
// <auto-generated>
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|||
// source: mlagents/envs/communicator_objects/space_type_proto.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 MLAgents.CommunicatorObjects { |
|||
|
|||
/// <summary>Holder for reflection information generated from mlagents/envs/communicator_objects/space_type_proto.proto</summary>
|
|||
public static partial class SpaceTypeProtoReflection { |
|||
|
|||
#region Descriptor
|
|||
/// <summary>File descriptor for mlagents/envs/communicator_objects/space_type_proto.proto</summary>
|
|||
public static pbr::FileDescriptor Descriptor { |
|||
get { return descriptor; } |
|||
} |
|||
private static pbr::FileDescriptor descriptor; |
|||
|
|||
static SpaceTypeProtoReflection() { |
|||
byte[] descriptorData = global::System.Convert.FromBase64String( |
|||
string.Concat( |
|||
"CjltbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL3NwYWNlX3R5", |
|||
"cGVfcHJvdG8ucHJvdG8SFGNvbW11bmljYXRvcl9vYmplY3RzGjltbGFnZW50", |
|||
"cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL3Jlc29sdXRpb25fcHJvdG8u", |
|||
"cHJvdG8qLgoOU3BhY2VUeXBlUHJvdG8SDAoIZGlzY3JldGUQABIOCgpjb250", |
|||
"aW51b3VzEAFCH6oCHE1MQWdlbnRzLkNvbW11bmljYXRvck9iamVjdHNiBnBy", |
|||
"b3RvMw==")); |
|||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
|||
new pbr::FileDescriptor[] { global::MLAgents.CommunicatorObjects.ResolutionProtoReflection.Descriptor, }, |
|||
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::MLAgents.CommunicatorObjects.SpaceTypeProto), }, null)); |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
#region Enums
|
|||
public enum SpaceTypeProto { |
|||
[pbr::OriginalName("discrete")] Discrete = 0, |
|||
[pbr::OriginalName("continuous")] Continuous = 1, |
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
} |
|||
|
|||
#endregion Designer generated code
|
|
|||
// <auto-generated>
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|||
// source: mlagents/envs/communicator_objects/command_proto.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 MLAgents.CommunicatorObjects { |
|||
|
|||
/// <summary>Holder for reflection information generated from mlagents/envs/communicator_objects/command_proto.proto</summary>
|
|||
public static partial class CommandProtoReflection { |
|||
|
|||
#region Descriptor
|
|||
/// <summary>File descriptor for mlagents/envs/communicator_objects/command_proto.proto</summary>
|
|||
public static pbr::FileDescriptor Descriptor { |
|||
get { return descriptor; } |
|||
} |
|||
private static pbr::FileDescriptor descriptor; |
|||
|
|||
static CommandProtoReflection() { |
|||
byte[] descriptorData = global::System.Convert.FromBase64String( |
|||
string.Concat( |
|||
"CjZtbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL2NvbW1hbmRf", |
|||
"cHJvdG8ucHJvdG8SFGNvbW11bmljYXRvcl9vYmplY3RzKi0KDENvbW1hbmRQ", |
|||
"cm90bxIICgRTVEVQEAASCQoFUkVTRVQQARIICgRRVUlUEAJCH6oCHE1MQWdl", |
|||
"bnRzLkNvbW11bmljYXRvck9iamVjdHNiBnByb3RvMw==")); |
|||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
|||
new pbr::FileDescriptor[] { }, |
|||
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::MLAgents.CommunicatorObjects.CommandProto), }, null)); |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
#region Enums
|
|||
public enum CommandProto { |
|||
[pbr::OriginalName("STEP")] Step = 0, |
|||
[pbr::OriginalName("RESET")] Reset = 1, |
|||
[pbr::OriginalName("QUIT")] Quit = 2, |
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
} |
|||
|
|||
#endregion Designer generated code
|
部分文件因为文件数量过多而无法显示
撰写
预览
正在加载...
取消
保存
Reference in new issue