org.tensorflow.metadata.v0.MetaOptimizationTarget Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow_metadata/proto/v0/problem_statement.proto
// Protobuf Java Version: 3.25.4
package org.tensorflow.metadata.v0;
/**
*
* The high-level objectives described by this problem statement. These
* objectives provide a basis for ranking models and can be optimized by a meta
* optimizer (e.g. a grid search over hyperparameters). A solution provider may
* also directly use the meta optimization targets to heuristically select
* losses, etc without any meta-optimization process. If not specified, the
* high-level meta optimization target is inferred from the task. These
* objectives do not need to be differentiable, as the solution provider may use
* proxy function to optimize model weights. Target definitions include tasks,
* metrics, and any weighted combination of them.
*
*
* Protobuf type {@code tensorflow.metadata.v0.MetaOptimizationTarget}
*/
public final class MetaOptimizationTarget extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.metadata.v0.MetaOptimizationTarget)
MetaOptimizationTargetOrBuilder {
private static final long serialVersionUID = 0L;
// Use MetaOptimizationTarget.newBuilder() to construct.
private MetaOptimizationTarget(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private MetaOptimizationTarget() {
taskName_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MetaOptimizationTarget();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_MetaOptimizationTarget_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_MetaOptimizationTarget_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.metadata.v0.MetaOptimizationTarget.class, org.tensorflow.metadata.v0.MetaOptimizationTarget.Builder.class);
}
public interface ThresholdConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
* If specified, indicates a threshold that the user wishes the metric to
* stay under (for MINIMIZE type), or above (for MAXIMIZE type). The
* optimization process need not prefer models that are higher (or lower)
* on the thresholded metric so long as the threshold is respected.
* E.g., if `threshold` for a MAXIMIZE type metric X is .9, the
* optimization process will prefer a solution with X = .92 over a
* solution with X = .88, but may not prefer a solution with X = .95 over
* a solution with X = .92. Unless otherwise specified by the
* PerformanceMetric, threshold is best effort. It does not provide a hard
* guarantee about the properties of the final model, but rather serves as
* a "target" to guide the optimization process. The user is responsible
* for validating that final model metrics are in an acceptable range for
* the application. A problem statement may, however, be rejected if the
* specified target is impossible to achieve. Keep this in mind if running
* the optimization on a recurring basis, as shifts in the data could push
* a previously achievable target to being unachievable (and thus yield no
* solution). The units and range for the threshold will be the same as
* the valid output range of the associated performance_metric.
*
*
* double threshold = 1;
* @return Whether the threshold field is set.
*/
boolean hasThreshold();
/**
*
* If specified, indicates a threshold that the user wishes the metric to
* stay under (for MINIMIZE type), or above (for MAXIMIZE type). The
* optimization process need not prefer models that are higher (or lower)
* on the thresholded metric so long as the threshold is respected.
* E.g., if `threshold` for a MAXIMIZE type metric X is .9, the
* optimization process will prefer a solution with X = .92 over a
* solution with X = .88, but may not prefer a solution with X = .95 over
* a solution with X = .92. Unless otherwise specified by the
* PerformanceMetric, threshold is best effort. It does not provide a hard
* guarantee about the properties of the final model, but rather serves as
* a "target" to guide the optimization process. The user is responsible
* for validating that final model metrics are in an acceptable range for
* the application. A problem statement may, however, be rejected if the
* specified target is impossible to achieve. Keep this in mind if running
* the optimization on a recurring basis, as shifts in the data could push
* a previously achievable target to being unachievable (and thus yield no
* solution). The units and range for the threshold will be the same as
* the valid output range of the associated performance_metric.
*
*
* double threshold = 1;
* @return The threshold.
*/
double getThreshold();
org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig.TypeCase getTypeCase();
}
/**
*
* Configuration for thresholded meta-optimization targets.
*
*
* Protobuf type {@code tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig}
*/
public static final class ThresholdConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig)
ThresholdConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use ThresholdConfig.newBuilder() to construct.
private ThresholdConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ThresholdConfig() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ThresholdConfig();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_MetaOptimizationTarget_ThresholdConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_MetaOptimizationTarget_ThresholdConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig.class, org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig.Builder.class);
}
private int typeCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object type_;
public enum TypeCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
THRESHOLD(1),
TYPE_NOT_SET(0);
private final int value;
private TypeCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TypeCase valueOf(int value) {
return forNumber(value);
}
public static TypeCase forNumber(int value) {
switch (value) {
case 1: return THRESHOLD;
case 0: return TYPE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public TypeCase
getTypeCase() {
return TypeCase.forNumber(
typeCase_);
}
public static final int THRESHOLD_FIELD_NUMBER = 1;
/**
*
* If specified, indicates a threshold that the user wishes the metric to
* stay under (for MINIMIZE type), or above (for MAXIMIZE type). The
* optimization process need not prefer models that are higher (or lower)
* on the thresholded metric so long as the threshold is respected.
* E.g., if `threshold` for a MAXIMIZE type metric X is .9, the
* optimization process will prefer a solution with X = .92 over a
* solution with X = .88, but may not prefer a solution with X = .95 over
* a solution with X = .92. Unless otherwise specified by the
* PerformanceMetric, threshold is best effort. It does not provide a hard
* guarantee about the properties of the final model, but rather serves as
* a "target" to guide the optimization process. The user is responsible
* for validating that final model metrics are in an acceptable range for
* the application. A problem statement may, however, be rejected if the
* specified target is impossible to achieve. Keep this in mind if running
* the optimization on a recurring basis, as shifts in the data could push
* a previously achievable target to being unachievable (and thus yield no
* solution). The units and range for the threshold will be the same as
* the valid output range of the associated performance_metric.
*
*
* double threshold = 1;
* @return Whether the threshold field is set.
*/
@java.lang.Override
public boolean hasThreshold() {
return typeCase_ == 1;
}
/**
*
* If specified, indicates a threshold that the user wishes the metric to
* stay under (for MINIMIZE type), or above (for MAXIMIZE type). The
* optimization process need not prefer models that are higher (or lower)
* on the thresholded metric so long as the threshold is respected.
* E.g., if `threshold` for a MAXIMIZE type metric X is .9, the
* optimization process will prefer a solution with X = .92 over a
* solution with X = .88, but may not prefer a solution with X = .95 over
* a solution with X = .92. Unless otherwise specified by the
* PerformanceMetric, threshold is best effort. It does not provide a hard
* guarantee about the properties of the final model, but rather serves as
* a "target" to guide the optimization process. The user is responsible
* for validating that final model metrics are in an acceptable range for
* the application. A problem statement may, however, be rejected if the
* specified target is impossible to achieve. Keep this in mind if running
* the optimization on a recurring basis, as shifts in the data could push
* a previously achievable target to being unachievable (and thus yield no
* solution). The units and range for the threshold will be the same as
* the valid output range of the associated performance_metric.
*
*
* double threshold = 1;
* @return The threshold.
*/
@java.lang.Override
public double getThreshold() {
if (typeCase_ == 1) {
return (java.lang.Double) type_;
}
return 0D;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (typeCase_ == 1) {
output.writeDouble(
1, (double)((java.lang.Double) type_));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (typeCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(
1, (double)((java.lang.Double) type_));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig)) {
return super.equals(obj);
}
org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig other = (org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig) obj;
if (!getTypeCase().equals(other.getTypeCase())) return false;
switch (typeCase_) {
case 1:
if (java.lang.Double.doubleToLongBits(getThreshold())
!= java.lang.Double.doubleToLongBits(
other.getThreshold())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
switch (typeCase_) {
case 1:
hash = (37 * hash) + THRESHOLD_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getThreshold()));
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Configuration for thresholded meta-optimization targets.
*
*
* Protobuf type {@code tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig)
org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_MetaOptimizationTarget_ThresholdConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_MetaOptimizationTarget_ThresholdConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig.class, org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig.Builder.class);
}
// Construct using org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
typeCase_ = 0;
type_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_MetaOptimizationTarget_ThresholdConfig_descriptor;
}
@java.lang.Override
public org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig getDefaultInstanceForType() {
return org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig build() {
org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig buildPartial() {
org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig result = new org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig result) {
int from_bitField0_ = bitField0_;
}
private void buildPartialOneofs(org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig result) {
result.typeCase_ = typeCase_;
result.type_ = this.type_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig) {
return mergeFrom((org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig other) {
if (other == org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig.getDefaultInstance()) return this;
switch (other.getTypeCase()) {
case THRESHOLD: {
setThreshold(other.getThreshold());
break;
}
case TYPE_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 9: {
type_ = input.readDouble();
typeCase_ = 1;
break;
} // case 9
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int typeCase_ = 0;
private java.lang.Object type_;
public TypeCase
getTypeCase() {
return TypeCase.forNumber(
typeCase_);
}
public Builder clearType() {
typeCase_ = 0;
type_ = null;
onChanged();
return this;
}
private int bitField0_;
/**
*
* If specified, indicates a threshold that the user wishes the metric to
* stay under (for MINIMIZE type), or above (for MAXIMIZE type). The
* optimization process need not prefer models that are higher (or lower)
* on the thresholded metric so long as the threshold is respected.
* E.g., if `threshold` for a MAXIMIZE type metric X is .9, the
* optimization process will prefer a solution with X = .92 over a
* solution with X = .88, but may not prefer a solution with X = .95 over
* a solution with X = .92. Unless otherwise specified by the
* PerformanceMetric, threshold is best effort. It does not provide a hard
* guarantee about the properties of the final model, but rather serves as
* a "target" to guide the optimization process. The user is responsible
* for validating that final model metrics are in an acceptable range for
* the application. A problem statement may, however, be rejected if the
* specified target is impossible to achieve. Keep this in mind if running
* the optimization on a recurring basis, as shifts in the data could push
* a previously achievable target to being unachievable (and thus yield no
* solution). The units and range for the threshold will be the same as
* the valid output range of the associated performance_metric.
*
*
* double threshold = 1;
* @return Whether the threshold field is set.
*/
public boolean hasThreshold() {
return typeCase_ == 1;
}
/**
*
* If specified, indicates a threshold that the user wishes the metric to
* stay under (for MINIMIZE type), or above (for MAXIMIZE type). The
* optimization process need not prefer models that are higher (or lower)
* on the thresholded metric so long as the threshold is respected.
* E.g., if `threshold` for a MAXIMIZE type metric X is .9, the
* optimization process will prefer a solution with X = .92 over a
* solution with X = .88, but may not prefer a solution with X = .95 over
* a solution with X = .92. Unless otherwise specified by the
* PerformanceMetric, threshold is best effort. It does not provide a hard
* guarantee about the properties of the final model, but rather serves as
* a "target" to guide the optimization process. The user is responsible
* for validating that final model metrics are in an acceptable range for
* the application. A problem statement may, however, be rejected if the
* specified target is impossible to achieve. Keep this in mind if running
* the optimization on a recurring basis, as shifts in the data could push
* a previously achievable target to being unachievable (and thus yield no
* solution). The units and range for the threshold will be the same as
* the valid output range of the associated performance_metric.
*
*
* double threshold = 1;
* @return The threshold.
*/
public double getThreshold() {
if (typeCase_ == 1) {
return (java.lang.Double) type_;
}
return 0D;
}
/**
*
* If specified, indicates a threshold that the user wishes the metric to
* stay under (for MINIMIZE type), or above (for MAXIMIZE type). The
* optimization process need not prefer models that are higher (or lower)
* on the thresholded metric so long as the threshold is respected.
* E.g., if `threshold` for a MAXIMIZE type metric X is .9, the
* optimization process will prefer a solution with X = .92 over a
* solution with X = .88, but may not prefer a solution with X = .95 over
* a solution with X = .92. Unless otherwise specified by the
* PerformanceMetric, threshold is best effort. It does not provide a hard
* guarantee about the properties of the final model, but rather serves as
* a "target" to guide the optimization process. The user is responsible
* for validating that final model metrics are in an acceptable range for
* the application. A problem statement may, however, be rejected if the
* specified target is impossible to achieve. Keep this in mind if running
* the optimization on a recurring basis, as shifts in the data could push
* a previously achievable target to being unachievable (and thus yield no
* solution). The units and range for the threshold will be the same as
* the valid output range of the associated performance_metric.
*
*
* double threshold = 1;
* @param value The threshold to set.
* @return This builder for chaining.
*/
public Builder setThreshold(double value) {
typeCase_ = 1;
type_ = value;
onChanged();
return this;
}
/**
*
* If specified, indicates a threshold that the user wishes the metric to
* stay under (for MINIMIZE type), or above (for MAXIMIZE type). The
* optimization process need not prefer models that are higher (or lower)
* on the thresholded metric so long as the threshold is respected.
* E.g., if `threshold` for a MAXIMIZE type metric X is .9, the
* optimization process will prefer a solution with X = .92 over a
* solution with X = .88, but may not prefer a solution with X = .95 over
* a solution with X = .92. Unless otherwise specified by the
* PerformanceMetric, threshold is best effort. It does not provide a hard
* guarantee about the properties of the final model, but rather serves as
* a "target" to guide the optimization process. The user is responsible
* for validating that final model metrics are in an acceptable range for
* the application. A problem statement may, however, be rejected if the
* specified target is impossible to achieve. Keep this in mind if running
* the optimization on a recurring basis, as shifts in the data could push
* a previously achievable target to being unachievable (and thus yield no
* solution). The units and range for the threshold will be the same as
* the valid output range of the associated performance_metric.
*
*
* double threshold = 1;
* @return This builder for chaining.
*/
public Builder clearThreshold() {
if (typeCase_ == 1) {
typeCase_ = 0;
type_ = null;
onChanged();
}
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig)
}
// @@protoc_insertion_point(class_scope:tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig)
private static final org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig();
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ThresholdConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
private int objectiveCombinationCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object objectiveCombination_;
public enum ObjectiveCombinationCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
@java.lang.Deprecated WEIGHT(4),
THRESHOLD_CONFIG(5),
OBJECTIVECOMBINATION_NOT_SET(0);
private final int value;
private ObjectiveCombinationCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ObjectiveCombinationCase valueOf(int value) {
return forNumber(value);
}
public static ObjectiveCombinationCase forNumber(int value) {
switch (value) {
case 4: return WEIGHT;
case 5: return THRESHOLD_CONFIG;
case 0: return OBJECTIVECOMBINATION_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ObjectiveCombinationCase
getObjectiveCombinationCase() {
return ObjectiveCombinationCase.forNumber(
objectiveCombinationCase_);
}
public static final int TASK_NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object taskName_ = "";
/**
*
* The name of a task in this problem statement producing the
* prediction or classification for the metric.
*
*
* string task_name = 1;
* @return The taskName.
*/
@java.lang.Override
public java.lang.String getTaskName() {
java.lang.Object ref = taskName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
taskName_ = s;
return s;
}
}
/**
*
* The name of a task in this problem statement producing the
* prediction or classification for the metric.
*
*
* string task_name = 1;
* @return The bytes for taskName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTaskNameBytes() {
java.lang.Object ref = taskName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
taskName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PERFORMANCE_METRIC_FIELD_NUMBER = 3;
private org.tensorflow.metadata.v0.PerformanceMetric performanceMetric_;
/**
*
* The performance metric to be evaluated.
* The prediction or classification is based upon the task.
* The label is from the type of the task, or from the override_task.
*
*
* .tensorflow.metadata.v0.PerformanceMetric performance_metric = 3;
* @return Whether the performanceMetric field is set.
*/
@java.lang.Override
public boolean hasPerformanceMetric() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The performance metric to be evaluated.
* The prediction or classification is based upon the task.
* The label is from the type of the task, or from the override_task.
*
*
* .tensorflow.metadata.v0.PerformanceMetric performance_metric = 3;
* @return The performanceMetric.
*/
@java.lang.Override
public org.tensorflow.metadata.v0.PerformanceMetric getPerformanceMetric() {
return performanceMetric_ == null ? org.tensorflow.metadata.v0.PerformanceMetric.getDefaultInstance() : performanceMetric_;
}
/**
*
* The performance metric to be evaluated.
* The prediction or classification is based upon the task.
* The label is from the type of the task, or from the override_task.
*
*
* .tensorflow.metadata.v0.PerformanceMetric performance_metric = 3;
*/
@java.lang.Override
public org.tensorflow.metadata.v0.PerformanceMetricOrBuilder getPerformanceMetricOrBuilder() {
return performanceMetric_ == null ? org.tensorflow.metadata.v0.PerformanceMetric.getDefaultInstance() : performanceMetric_;
}
public static final int WEIGHT_FIELD_NUMBER = 4;
/**
*
* If a model spec has multiple meta optimization targets, the weight
* of each can be specified. The final objective is then a weighted
* combination of the multiple objectives. If not specified, value is 1.
*
*
* double weight = 4 [deprecated = true];
* @deprecated tensorflow.metadata.v0.MetaOptimizationTarget.weight is deprecated.
* See tensorflow_metadata/proto/v0/problem_statement.proto;l=328
* @return Whether the weight field is set.
*/
@java.lang.Override
@java.lang.Deprecated public boolean hasWeight() {
return objectiveCombinationCase_ == 4;
}
/**
*
* If a model spec has multiple meta optimization targets, the weight
* of each can be specified. The final objective is then a weighted
* combination of the multiple objectives. If not specified, value is 1.
*
*
* double weight = 4 [deprecated = true];
* @deprecated tensorflow.metadata.v0.MetaOptimizationTarget.weight is deprecated.
* See tensorflow_metadata/proto/v0/problem_statement.proto;l=328
* @return The weight.
*/
@java.lang.Override
@java.lang.Deprecated public double getWeight() {
if (objectiveCombinationCase_ == 4) {
return (java.lang.Double) objectiveCombination_;
}
return 0D;
}
public static final int THRESHOLD_CONFIG_FIELD_NUMBER = 5;
/**
*
* Secondary meta optimization targets can be thresholded, meaning that the
* optimization process prefers solutions above (or below) the threshold,
* but need not prefer solutions higher (or lower) on the metric if the
* threshold is met.
*
*
* .tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig threshold_config = 5;
* @return Whether the thresholdConfig field is set.
*/
@java.lang.Override
public boolean hasThresholdConfig() {
return objectiveCombinationCase_ == 5;
}
/**
*
* Secondary meta optimization targets can be thresholded, meaning that the
* optimization process prefers solutions above (or below) the threshold,
* but need not prefer solutions higher (or lower) on the metric if the
* threshold is met.
*
*
* .tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig threshold_config = 5;
* @return The thresholdConfig.
*/
@java.lang.Override
public org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig getThresholdConfig() {
if (objectiveCombinationCase_ == 5) {
return (org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig) objectiveCombination_;
}
return org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig.getDefaultInstance();
}
/**
*
* Secondary meta optimization targets can be thresholded, meaning that the
* optimization process prefers solutions above (or below) the threshold,
* but need not prefer solutions higher (or lower) on the metric if the
* threshold is met.
*
*
* .tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig threshold_config = 5;
*/
@java.lang.Override
public org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfigOrBuilder getThresholdConfigOrBuilder() {
if (objectiveCombinationCase_ == 5) {
return (org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig) objectiveCombination_;
}
return org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(taskName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, taskName_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(3, getPerformanceMetric());
}
if (objectiveCombinationCase_ == 4) {
output.writeDouble(
4, (double)((java.lang.Double) objectiveCombination_));
}
if (objectiveCombinationCase_ == 5) {
output.writeMessage(5, (org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig) objectiveCombination_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(taskName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, taskName_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getPerformanceMetric());
}
if (objectiveCombinationCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(
4, (double)((java.lang.Double) objectiveCombination_));
}
if (objectiveCombinationCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, (org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig) objectiveCombination_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.tensorflow.metadata.v0.MetaOptimizationTarget)) {
return super.equals(obj);
}
org.tensorflow.metadata.v0.MetaOptimizationTarget other = (org.tensorflow.metadata.v0.MetaOptimizationTarget) obj;
if (!getTaskName()
.equals(other.getTaskName())) return false;
if (hasPerformanceMetric() != other.hasPerformanceMetric()) return false;
if (hasPerformanceMetric()) {
if (!getPerformanceMetric()
.equals(other.getPerformanceMetric())) return false;
}
if (!getObjectiveCombinationCase().equals(other.getObjectiveCombinationCase())) return false;
switch (objectiveCombinationCase_) {
case 4:
if (java.lang.Double.doubleToLongBits(getWeight())
!= java.lang.Double.doubleToLongBits(
other.getWeight())) return false;
break;
case 5:
if (!getThresholdConfig()
.equals(other.getThresholdConfig())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TASK_NAME_FIELD_NUMBER;
hash = (53 * hash) + getTaskName().hashCode();
if (hasPerformanceMetric()) {
hash = (37 * hash) + PERFORMANCE_METRIC_FIELD_NUMBER;
hash = (53 * hash) + getPerformanceMetric().hashCode();
}
switch (objectiveCombinationCase_) {
case 4:
hash = (37 * hash) + WEIGHT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getWeight()));
break;
case 5:
hash = (37 * hash) + THRESHOLD_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getThresholdConfig().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.tensorflow.metadata.v0.MetaOptimizationTarget prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* The high-level objectives described by this problem statement. These
* objectives provide a basis for ranking models and can be optimized by a meta
* optimizer (e.g. a grid search over hyperparameters). A solution provider may
* also directly use the meta optimization targets to heuristically select
* losses, etc without any meta-optimization process. If not specified, the
* high-level meta optimization target is inferred from the task. These
* objectives do not need to be differentiable, as the solution provider may use
* proxy function to optimize model weights. Target definitions include tasks,
* metrics, and any weighted combination of them.
*
*
* Protobuf type {@code tensorflow.metadata.v0.MetaOptimizationTarget}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.metadata.v0.MetaOptimizationTarget)
org.tensorflow.metadata.v0.MetaOptimizationTargetOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_MetaOptimizationTarget_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_MetaOptimizationTarget_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.metadata.v0.MetaOptimizationTarget.class, org.tensorflow.metadata.v0.MetaOptimizationTarget.Builder.class);
}
// Construct using org.tensorflow.metadata.v0.MetaOptimizationTarget.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getPerformanceMetricFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
taskName_ = "";
performanceMetric_ = null;
if (performanceMetricBuilder_ != null) {
performanceMetricBuilder_.dispose();
performanceMetricBuilder_ = null;
}
if (thresholdConfigBuilder_ != null) {
thresholdConfigBuilder_.clear();
}
objectiveCombinationCase_ = 0;
objectiveCombination_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_MetaOptimizationTarget_descriptor;
}
@java.lang.Override
public org.tensorflow.metadata.v0.MetaOptimizationTarget getDefaultInstanceForType() {
return org.tensorflow.metadata.v0.MetaOptimizationTarget.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.metadata.v0.MetaOptimizationTarget build() {
org.tensorflow.metadata.v0.MetaOptimizationTarget result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.tensorflow.metadata.v0.MetaOptimizationTarget buildPartial() {
org.tensorflow.metadata.v0.MetaOptimizationTarget result = new org.tensorflow.metadata.v0.MetaOptimizationTarget(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(org.tensorflow.metadata.v0.MetaOptimizationTarget result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.taskName_ = taskName_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.performanceMetric_ = performanceMetricBuilder_ == null
? performanceMetric_
: performanceMetricBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(org.tensorflow.metadata.v0.MetaOptimizationTarget result) {
result.objectiveCombinationCase_ = objectiveCombinationCase_;
result.objectiveCombination_ = this.objectiveCombination_;
if (objectiveCombinationCase_ == 5 &&
thresholdConfigBuilder_ != null) {
result.objectiveCombination_ = thresholdConfigBuilder_.build();
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.tensorflow.metadata.v0.MetaOptimizationTarget) {
return mergeFrom((org.tensorflow.metadata.v0.MetaOptimizationTarget)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.metadata.v0.MetaOptimizationTarget other) {
if (other == org.tensorflow.metadata.v0.MetaOptimizationTarget.getDefaultInstance()) return this;
if (!other.getTaskName().isEmpty()) {
taskName_ = other.taskName_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasPerformanceMetric()) {
mergePerformanceMetric(other.getPerformanceMetric());
}
switch (other.getObjectiveCombinationCase()) {
case WEIGHT: {
setWeight(other.getWeight());
break;
}
case THRESHOLD_CONFIG: {
mergeThresholdConfig(other.getThresholdConfig());
break;
}
case OBJECTIVECOMBINATION_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
taskName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 26: {
input.readMessage(
getPerformanceMetricFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 26
case 33: {
objectiveCombination_ = input.readDouble();
objectiveCombinationCase_ = 4;
break;
} // case 33
case 42: {
input.readMessage(
getThresholdConfigFieldBuilder().getBuilder(),
extensionRegistry);
objectiveCombinationCase_ = 5;
break;
} // case 42
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int objectiveCombinationCase_ = 0;
private java.lang.Object objectiveCombination_;
public ObjectiveCombinationCase
getObjectiveCombinationCase() {
return ObjectiveCombinationCase.forNumber(
objectiveCombinationCase_);
}
public Builder clearObjectiveCombination() {
objectiveCombinationCase_ = 0;
objectiveCombination_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object taskName_ = "";
/**
*
* The name of a task in this problem statement producing the
* prediction or classification for the metric.
*
*
* string task_name = 1;
* @return The taskName.
*/
public java.lang.String getTaskName() {
java.lang.Object ref = taskName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
taskName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The name of a task in this problem statement producing the
* prediction or classification for the metric.
*
*
* string task_name = 1;
* @return The bytes for taskName.
*/
public com.google.protobuf.ByteString
getTaskNameBytes() {
java.lang.Object ref = taskName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
taskName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The name of a task in this problem statement producing the
* prediction or classification for the metric.
*
*
* string task_name = 1;
* @param value The taskName to set.
* @return This builder for chaining.
*/
public Builder setTaskName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
taskName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The name of a task in this problem statement producing the
* prediction or classification for the metric.
*
*
* string task_name = 1;
* @return This builder for chaining.
*/
public Builder clearTaskName() {
taskName_ = getDefaultInstance().getTaskName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* The name of a task in this problem statement producing the
* prediction or classification for the metric.
*
*
* string task_name = 1;
* @param value The bytes for taskName to set.
* @return This builder for chaining.
*/
public Builder setTaskNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
taskName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private org.tensorflow.metadata.v0.PerformanceMetric performanceMetric_;
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.PerformanceMetric, org.tensorflow.metadata.v0.PerformanceMetric.Builder, org.tensorflow.metadata.v0.PerformanceMetricOrBuilder> performanceMetricBuilder_;
/**
*
* The performance metric to be evaluated.
* The prediction or classification is based upon the task.
* The label is from the type of the task, or from the override_task.
*
*
* .tensorflow.metadata.v0.PerformanceMetric performance_metric = 3;
* @return Whether the performanceMetric field is set.
*/
public boolean hasPerformanceMetric() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The performance metric to be evaluated.
* The prediction or classification is based upon the task.
* The label is from the type of the task, or from the override_task.
*
*
* .tensorflow.metadata.v0.PerformanceMetric performance_metric = 3;
* @return The performanceMetric.
*/
public org.tensorflow.metadata.v0.PerformanceMetric getPerformanceMetric() {
if (performanceMetricBuilder_ == null) {
return performanceMetric_ == null ? org.tensorflow.metadata.v0.PerformanceMetric.getDefaultInstance() : performanceMetric_;
} else {
return performanceMetricBuilder_.getMessage();
}
}
/**
*
* The performance metric to be evaluated.
* The prediction or classification is based upon the task.
* The label is from the type of the task, or from the override_task.
*
*
* .tensorflow.metadata.v0.PerformanceMetric performance_metric = 3;
*/
public Builder setPerformanceMetric(org.tensorflow.metadata.v0.PerformanceMetric value) {
if (performanceMetricBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
performanceMetric_ = value;
} else {
performanceMetricBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The performance metric to be evaluated.
* The prediction or classification is based upon the task.
* The label is from the type of the task, or from the override_task.
*
*
* .tensorflow.metadata.v0.PerformanceMetric performance_metric = 3;
*/
public Builder setPerformanceMetric(
org.tensorflow.metadata.v0.PerformanceMetric.Builder builderForValue) {
if (performanceMetricBuilder_ == null) {
performanceMetric_ = builderForValue.build();
} else {
performanceMetricBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The performance metric to be evaluated.
* The prediction or classification is based upon the task.
* The label is from the type of the task, or from the override_task.
*
*
* .tensorflow.metadata.v0.PerformanceMetric performance_metric = 3;
*/
public Builder mergePerformanceMetric(org.tensorflow.metadata.v0.PerformanceMetric value) {
if (performanceMetricBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
performanceMetric_ != null &&
performanceMetric_ != org.tensorflow.metadata.v0.PerformanceMetric.getDefaultInstance()) {
getPerformanceMetricBuilder().mergeFrom(value);
} else {
performanceMetric_ = value;
}
} else {
performanceMetricBuilder_.mergeFrom(value);
}
if (performanceMetric_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
* The performance metric to be evaluated.
* The prediction or classification is based upon the task.
* The label is from the type of the task, or from the override_task.
*
*
* .tensorflow.metadata.v0.PerformanceMetric performance_metric = 3;
*/
public Builder clearPerformanceMetric() {
bitField0_ = (bitField0_ & ~0x00000002);
performanceMetric_ = null;
if (performanceMetricBuilder_ != null) {
performanceMetricBuilder_.dispose();
performanceMetricBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The performance metric to be evaluated.
* The prediction or classification is based upon the task.
* The label is from the type of the task, or from the override_task.
*
*
* .tensorflow.metadata.v0.PerformanceMetric performance_metric = 3;
*/
public org.tensorflow.metadata.v0.PerformanceMetric.Builder getPerformanceMetricBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getPerformanceMetricFieldBuilder().getBuilder();
}
/**
*
* The performance metric to be evaluated.
* The prediction or classification is based upon the task.
* The label is from the type of the task, or from the override_task.
*
*
* .tensorflow.metadata.v0.PerformanceMetric performance_metric = 3;
*/
public org.tensorflow.metadata.v0.PerformanceMetricOrBuilder getPerformanceMetricOrBuilder() {
if (performanceMetricBuilder_ != null) {
return performanceMetricBuilder_.getMessageOrBuilder();
} else {
return performanceMetric_ == null ?
org.tensorflow.metadata.v0.PerformanceMetric.getDefaultInstance() : performanceMetric_;
}
}
/**
*
* The performance metric to be evaluated.
* The prediction or classification is based upon the task.
* The label is from the type of the task, or from the override_task.
*
*
* .tensorflow.metadata.v0.PerformanceMetric performance_metric = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.PerformanceMetric, org.tensorflow.metadata.v0.PerformanceMetric.Builder, org.tensorflow.metadata.v0.PerformanceMetricOrBuilder>
getPerformanceMetricFieldBuilder() {
if (performanceMetricBuilder_ == null) {
performanceMetricBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.PerformanceMetric, org.tensorflow.metadata.v0.PerformanceMetric.Builder, org.tensorflow.metadata.v0.PerformanceMetricOrBuilder>(
getPerformanceMetric(),
getParentForChildren(),
isClean());
performanceMetric_ = null;
}
return performanceMetricBuilder_;
}
/**
*
* If a model spec has multiple meta optimization targets, the weight
* of each can be specified. The final objective is then a weighted
* combination of the multiple objectives. If not specified, value is 1.
*
*
* double weight = 4 [deprecated = true];
* @deprecated tensorflow.metadata.v0.MetaOptimizationTarget.weight is deprecated.
* See tensorflow_metadata/proto/v0/problem_statement.proto;l=328
* @return Whether the weight field is set.
*/
@java.lang.Deprecated public boolean hasWeight() {
return objectiveCombinationCase_ == 4;
}
/**
*
* If a model spec has multiple meta optimization targets, the weight
* of each can be specified. The final objective is then a weighted
* combination of the multiple objectives. If not specified, value is 1.
*
*
* double weight = 4 [deprecated = true];
* @deprecated tensorflow.metadata.v0.MetaOptimizationTarget.weight is deprecated.
* See tensorflow_metadata/proto/v0/problem_statement.proto;l=328
* @return The weight.
*/
@java.lang.Deprecated public double getWeight() {
if (objectiveCombinationCase_ == 4) {
return (java.lang.Double) objectiveCombination_;
}
return 0D;
}
/**
*
* If a model spec has multiple meta optimization targets, the weight
* of each can be specified. The final objective is then a weighted
* combination of the multiple objectives. If not specified, value is 1.
*
*
* double weight = 4 [deprecated = true];
* @deprecated tensorflow.metadata.v0.MetaOptimizationTarget.weight is deprecated.
* See tensorflow_metadata/proto/v0/problem_statement.proto;l=328
* @param value The weight to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setWeight(double value) {
objectiveCombinationCase_ = 4;
objectiveCombination_ = value;
onChanged();
return this;
}
/**
*
* If a model spec has multiple meta optimization targets, the weight
* of each can be specified. The final objective is then a weighted
* combination of the multiple objectives. If not specified, value is 1.
*
*
* double weight = 4 [deprecated = true];
* @deprecated tensorflow.metadata.v0.MetaOptimizationTarget.weight is deprecated.
* See tensorflow_metadata/proto/v0/problem_statement.proto;l=328
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearWeight() {
if (objectiveCombinationCase_ == 4) {
objectiveCombinationCase_ = 0;
objectiveCombination_ = null;
onChanged();
}
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig, org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig.Builder, org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfigOrBuilder> thresholdConfigBuilder_;
/**
*
* Secondary meta optimization targets can be thresholded, meaning that the
* optimization process prefers solutions above (or below) the threshold,
* but need not prefer solutions higher (or lower) on the metric if the
* threshold is met.
*
*
* .tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig threshold_config = 5;
* @return Whether the thresholdConfig field is set.
*/
@java.lang.Override
public boolean hasThresholdConfig() {
return objectiveCombinationCase_ == 5;
}
/**
*
* Secondary meta optimization targets can be thresholded, meaning that the
* optimization process prefers solutions above (or below) the threshold,
* but need not prefer solutions higher (or lower) on the metric if the
* threshold is met.
*
*
* .tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig threshold_config = 5;
* @return The thresholdConfig.
*/
@java.lang.Override
public org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig getThresholdConfig() {
if (thresholdConfigBuilder_ == null) {
if (objectiveCombinationCase_ == 5) {
return (org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig) objectiveCombination_;
}
return org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig.getDefaultInstance();
} else {
if (objectiveCombinationCase_ == 5) {
return thresholdConfigBuilder_.getMessage();
}
return org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig.getDefaultInstance();
}
}
/**
*
* Secondary meta optimization targets can be thresholded, meaning that the
* optimization process prefers solutions above (or below) the threshold,
* but need not prefer solutions higher (or lower) on the metric if the
* threshold is met.
*
*
* .tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig threshold_config = 5;
*/
public Builder setThresholdConfig(org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig value) {
if (thresholdConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
objectiveCombination_ = value;
onChanged();
} else {
thresholdConfigBuilder_.setMessage(value);
}
objectiveCombinationCase_ = 5;
return this;
}
/**
*
* Secondary meta optimization targets can be thresholded, meaning that the
* optimization process prefers solutions above (or below) the threshold,
* but need not prefer solutions higher (or lower) on the metric if the
* threshold is met.
*
*
* .tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig threshold_config = 5;
*/
public Builder setThresholdConfig(
org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig.Builder builderForValue) {
if (thresholdConfigBuilder_ == null) {
objectiveCombination_ = builderForValue.build();
onChanged();
} else {
thresholdConfigBuilder_.setMessage(builderForValue.build());
}
objectiveCombinationCase_ = 5;
return this;
}
/**
*
* Secondary meta optimization targets can be thresholded, meaning that the
* optimization process prefers solutions above (or below) the threshold,
* but need not prefer solutions higher (or lower) on the metric if the
* threshold is met.
*
*
* .tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig threshold_config = 5;
*/
public Builder mergeThresholdConfig(org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig value) {
if (thresholdConfigBuilder_ == null) {
if (objectiveCombinationCase_ == 5 &&
objectiveCombination_ != org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig.getDefaultInstance()) {
objectiveCombination_ = org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig.newBuilder((org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig) objectiveCombination_)
.mergeFrom(value).buildPartial();
} else {
objectiveCombination_ = value;
}
onChanged();
} else {
if (objectiveCombinationCase_ == 5) {
thresholdConfigBuilder_.mergeFrom(value);
} else {
thresholdConfigBuilder_.setMessage(value);
}
}
objectiveCombinationCase_ = 5;
return this;
}
/**
*
* Secondary meta optimization targets can be thresholded, meaning that the
* optimization process prefers solutions above (or below) the threshold,
* but need not prefer solutions higher (or lower) on the metric if the
* threshold is met.
*
*
* .tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig threshold_config = 5;
*/
public Builder clearThresholdConfig() {
if (thresholdConfigBuilder_ == null) {
if (objectiveCombinationCase_ == 5) {
objectiveCombinationCase_ = 0;
objectiveCombination_ = null;
onChanged();
}
} else {
if (objectiveCombinationCase_ == 5) {
objectiveCombinationCase_ = 0;
objectiveCombination_ = null;
}
thresholdConfigBuilder_.clear();
}
return this;
}
/**
*
* Secondary meta optimization targets can be thresholded, meaning that the
* optimization process prefers solutions above (or below) the threshold,
* but need not prefer solutions higher (or lower) on the metric if the
* threshold is met.
*
*
* .tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig threshold_config = 5;
*/
public org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig.Builder getThresholdConfigBuilder() {
return getThresholdConfigFieldBuilder().getBuilder();
}
/**
*
* Secondary meta optimization targets can be thresholded, meaning that the
* optimization process prefers solutions above (or below) the threshold,
* but need not prefer solutions higher (or lower) on the metric if the
* threshold is met.
*
*
* .tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig threshold_config = 5;
*/
@java.lang.Override
public org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfigOrBuilder getThresholdConfigOrBuilder() {
if ((objectiveCombinationCase_ == 5) && (thresholdConfigBuilder_ != null)) {
return thresholdConfigBuilder_.getMessageOrBuilder();
} else {
if (objectiveCombinationCase_ == 5) {
return (org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig) objectiveCombination_;
}
return org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig.getDefaultInstance();
}
}
/**
*
* Secondary meta optimization targets can be thresholded, meaning that the
* optimization process prefers solutions above (or below) the threshold,
* but need not prefer solutions higher (or lower) on the metric if the
* threshold is met.
*
*
* .tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig threshold_config = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig, org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig.Builder, org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfigOrBuilder>
getThresholdConfigFieldBuilder() {
if (thresholdConfigBuilder_ == null) {
if (!(objectiveCombinationCase_ == 5)) {
objectiveCombination_ = org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig.getDefaultInstance();
}
thresholdConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig, org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig.Builder, org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfigOrBuilder>(
(org.tensorflow.metadata.v0.MetaOptimizationTarget.ThresholdConfig) objectiveCombination_,
getParentForChildren(),
isClean());
objectiveCombination_ = null;
}
objectiveCombinationCase_ = 5;
onChanged();
return thresholdConfigBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.metadata.v0.MetaOptimizationTarget)
}
// @@protoc_insertion_point(class_scope:tensorflow.metadata.v0.MetaOptimizationTarget)
private static final org.tensorflow.metadata.v0.MetaOptimizationTarget DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.metadata.v0.MetaOptimizationTarget();
}
public static org.tensorflow.metadata.v0.MetaOptimizationTarget getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MetaOptimizationTarget parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.tensorflow.metadata.v0.MetaOptimizationTarget getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy