Skip to content

Commit

Permalink
add metric version tag (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
Miro001 authored Oct 28, 2024
1 parent 128ea17 commit a6bd47f
Show file tree
Hide file tree
Showing 10 changed files with 354 additions and 120 deletions.
84 changes: 61 additions & 23 deletions gen/csharp/Asgt/Modelregistry/V1/ModelRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static ModelRegistryReflection() {
"dHlwZS9tb2RlbC5wcm90bxoaYXNndC90eXBlL3ByZWRpY3Rpb24ucHJvdG8a",
"GGFzZ3QvdHlwZS9yZXZpc2lvbi5wcm90bxoeYXNndC90eXBlL3RhcmdldF9t",
"ZXRyaWNzLnByb3RvGiBhc2d0L3R5cGUvdHJhaW5fc3RhdGlzdGljcy5wcm90",
"bxobZ29vZ2xlL3Byb3RvYnVmL2VtcHR5LnByb3RvIskGChRSZWdpc3Rlck1v",
"bxobZ29vZ2xlL3Byb3RvYnVmL2VtcHR5LnByb3RvIvAGChRSZWdpc3Rlck1v",
"ZGVsUmVxdWVzdBIsCgdkYXRhc2V0GAEgASgLMhIuYXNndC50eXBlLkRhdGFz",
"ZXRSB2RhdGFzZXQSLwoIcmV2aXNpb24YAiABKAsyEy5hc2d0LnR5cGUuUmV2",
"aXNpb25SCHJldmlzaW9uEiMKDW1vZGVsX3ZlcnNpb24YAyABKANSDG1vZGVs",
Expand All @@ -45,31 +45,32 @@ static ModelRegistryReflection() {
"aWNzEpQBCh90YXJnZXRfdG9fY29uZmlkZW5jZV90aHJlc2hvbGRzGAogAygL",
"Mk0uYXNndC5tb2RlbHJlZ2lzdHJ5LnYxLlJlZ2lzdGVyTW9kZWxSZXF1ZXN0",
"LlRhcmdldFRvQ29uZmlkZW5jZVRocmVzaG9sZHNFbnRyeVIcdGFyZ2V0VG9D",
"b25maWRlbmNlVGhyZXNob2xkcxo6CgxNZXRyaWNzRW50cnkSEAoDa2V5GAEg",
"ASgJUgNrZXkSFAoFdmFsdWUYAiABKAVSBX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rl",
"bHJlZ2lzdHJ5LnYxLkdldEN1cnJlbnRNb2RlbFJlcXVlc3QaLi5hc2d0Lm1v",
"ZGVscmVnaXN0cnkudjEuR2V0Q3VycmVudE1vZGVsUmVzcG9uc2VC8wEKHmFp",
"LnZpc21hLmFzZ3QubW9kZWxyZWdpc3RyeS52MUISTW9kZWxSZWdpc3RyeVBy",
"b3RvUAFaR2dpdGh1Yi5jb20vZS1jb25vbWljL3ZtbGFwaXMvZ2VuL2dvL2Fz",
"Z3QvbW9kZWxyZWdpc3RyeS92MTttb2RlbHJlZ2lzdHJ5ogIDQU1YqgIVQXNn",
"dC5Nb2RlbHJlZ2lzdHJ5LlYxygIVQXNndFxNb2RlbHJlZ2lzdHJ5XFYx4gIh",
"QXNndFxNb2RlbHJlZ2lzdHJ5XFYxXEdQQk1ldGFkYXRh6gIXQXNndDo6TW9k",
"ZWxyZWdpc3RyeTo6VjFiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Asgt.Type.DatasetReflection.Descriptor, global::Asgt.Type.DatasetStatisticsReflection.Descriptor, global::Asgt.Type.ModelReflection.Descriptor, global::Asgt.Type.PredictionReflection.Descriptor, global::Asgt.Type.RevisionReflection.Descriptor, global::Asgt.Type.TargetMetricsReflection.Descriptor, global::Asgt.Type.TrainStatisticsReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Asgt.Modelregistry.V1.RegisterModelRequest), global::Asgt.Modelregistry.V1.RegisterModelRequest.Parser, new[]{ "Dataset", "Revision", "ModelVersion", "Metrics", "TargetMetrics", "InputType", "TrainStatistics", "DatasetStatistics", "TargetToConfidenceThresholds" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, }),
new pbr::GeneratedClrTypeInfo(typeof(global::Asgt.Modelregistry.V1.RegisterModelRequest), global::Asgt.Modelregistry.V1.RegisterModelRequest.Parser, new[]{ "Dataset", "Revision", "ModelVersion", "Metrics", "TargetMetrics", "InputType", "TrainStatistics", "DatasetStatistics", "TargetToConfidenceThresholds", "MetricVersion" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, }),
new pbr::GeneratedClrTypeInfo(typeof(global::Asgt.Modelregistry.V1.GetCurrentModelRequest), global::Asgt.Modelregistry.V1.GetCurrentModelRequest.Parser, new[]{ "Dataset" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Asgt.Modelregistry.V1.GetCurrentModelResponse), global::Asgt.Modelregistry.V1.GetCurrentModelResponse.Parser, new[]{ "Model" }, null, null, null, null)
}));
Expand Down Expand Up @@ -121,6 +122,7 @@ public RegisterModelRequest(RegisterModelRequest other) : this() {
trainStatistics_ = other.trainStatistics_ != null ? other.trainStatistics_.Clone() : null;
datasetStatistics_ = other.datasetStatistics_ != null ? other.datasetStatistics_.Clone() : null;
targetToConfidenceThresholds_ = other.targetToConfidenceThresholds_.Clone();
metricVersion_ = other.metricVersion_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}

Expand Down Expand Up @@ -235,6 +237,18 @@ public long ModelVersion {
get { return targetToConfidenceThresholds_; }
}

/// <summary>Field number for the "metric_version" field.</summary>
public const int MetricVersionFieldNumber = 11;
private string metricVersion_ = "";
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public string MetricVersion {
get { return metricVersion_; }
set {
metricVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
Expand All @@ -259,6 +273,7 @@ public bool Equals(RegisterModelRequest other) {
if (!object.Equals(TrainStatistics, other.TrainStatistics)) return false;
if (!object.Equals(DatasetStatistics, other.DatasetStatistics)) return false;
if (!TargetToConfidenceThresholds.Equals(other.TargetToConfidenceThresholds)) return false;
if (MetricVersion != other.MetricVersion) return false;
return Equals(_unknownFields, other._unknownFields);
}

Expand All @@ -275,6 +290,7 @@ public override int GetHashCode() {
if (trainStatistics_ != null) hash ^= TrainStatistics.GetHashCode();
if (datasetStatistics_ != null) hash ^= DatasetStatistics.GetHashCode();
hash ^= TargetToConfidenceThresholds.GetHashCode();
if (MetricVersion.Length != 0) hash ^= MetricVersion.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
Expand Down Expand Up @@ -320,6 +336,10 @@ public void WriteTo(pb::CodedOutputStream output) {
output.WriteMessage(DatasetStatistics);
}
targetToConfidenceThresholds_.WriteTo(output, _map_targetToConfidenceThresholds_codec);
if (MetricVersion.Length != 0) {
output.WriteRawTag(90);
output.WriteString(MetricVersion);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
Expand Down Expand Up @@ -357,6 +377,10 @@ public void WriteTo(pb::CodedOutputStream output) {
output.WriteMessage(DatasetStatistics);
}
targetToConfidenceThresholds_.WriteTo(ref output, _map_targetToConfidenceThresholds_codec);
if (MetricVersion.Length != 0) {
output.WriteRawTag(90);
output.WriteString(MetricVersion);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
Expand Down Expand Up @@ -388,6 +412,9 @@ public int CalculateSize() {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(DatasetStatistics);
}
size += targetToConfidenceThresholds_.CalculateSize(_map_targetToConfidenceThresholds_codec);
if (MetricVersion.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(MetricVersion);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
Expand Down Expand Up @@ -433,6 +460,9 @@ public void MergeFrom(RegisterModelRequest other) {
DatasetStatistics.MergeFrom(other.DatasetStatistics);
}
targetToConfidenceThresholds_.MergeFrom(other.targetToConfidenceThresholds_);
if (other.MetricVersion.Length != 0) {
MetricVersion = other.MetricVersion;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}

Expand Down Expand Up @@ -496,6 +526,10 @@ public void MergeFrom(pb::CodedInputStream input) {
targetToConfidenceThresholds_.AddEntriesFrom(input, _map_targetToConfidenceThresholds_codec);
break;
}
case 90: {
MetricVersion = input.ReadString();
break;
}
}
}
#endif
Expand Down Expand Up @@ -559,6 +593,10 @@ public void MergeFrom(pb::CodedInputStream input) {
targetToConfidenceThresholds_.AddEntriesFrom(ref input, _map_targetToConfidenceThresholds_codec);
break;
}
case 90: {
MetricVersion = input.ReadString();
break;
}
}
}
}
Expand Down
Loading

0 comments on commit a6bd47f

Please sign in to comment.