All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.tensorflow.metadata.v0.Task Maven / Gradle / Ivy

The newest version!
// 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;

/**
 * 
 * Describes a single task in a model and all its properties.
 * A task corresponds to a single output of the model.
 * Multiple tasks in the same problem statement correspond to different outputs
 * of the model.
 * 
* * Protobuf type {@code tensorflow.metadata.v0.Task} */ public final class Task extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.metadata.v0.Task) TaskOrBuilder { private static final long serialVersionUID = 0L; // Use Task.newBuilder() to construct. private Task(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Task() { name_ = ""; performanceMetric_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Task(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_Task_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_Task_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.metadata.v0.Task.class, org.tensorflow.metadata.v0.Task.Builder.class); } private int bitField0_; public static final int TYPE_FIELD_NUMBER = 1; private org.tensorflow.metadata.v0.Type type_; /** *
   * Specification of the label and weight columns, and the type of the
   * prediction or classification.
   * 
* * .tensorflow.metadata.v0.Type type = 1; * @return Whether the type field is set. */ @java.lang.Override public boolean hasType() { return ((bitField0_ & 0x00000001) != 0); } /** *
   * Specification of the label and weight columns, and the type of the
   * prediction or classification.
   * 
* * .tensorflow.metadata.v0.Type type = 1; * @return The type. */ @java.lang.Override public org.tensorflow.metadata.v0.Type getType() { return type_ == null ? org.tensorflow.metadata.v0.Type.getDefaultInstance() : type_; } /** *
   * Specification of the label and weight columns, and the type of the
   * prediction or classification.
   * 
* * .tensorflow.metadata.v0.Type type = 1; */ @java.lang.Override public org.tensorflow.metadata.v0.TypeOrBuilder getTypeOrBuilder() { return type_ == null ? org.tensorflow.metadata.v0.Type.getDefaultInstance() : type_; } public static final int NAME_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** *
   * The task name. Tasks within the same ProblemStatement should have unique
   * names. This a REQUIRED field in case of multi-task learning problems.
   * 
* * string name = 5; * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; 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(); name_ = s; return s; } } /** *
   * The task name. Tasks within the same ProblemStatement should have unique
   * names. This a REQUIRED field in case of multi-task learning problems.
   * 
* * string name = 5; * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TASK_WEIGHT_FIELD_NUMBER = 2; private double taskWeight_ = 0D; /** *
   * If a Problem is composed of mulitple sub-tasks, the weight of each task
   * determines the importance of solving each sub-task. It is used to
   * rank and select the best solution for multi-task problems.
   * Not meaningful for a problem with one task.
   * If the problem has multiple tasks and all task_weight=0 (unset) then all
   * tasks are weighted equally.
   * 
* * double task_weight = 2 [deprecated = true]; * @deprecated tensorflow.metadata.v0.Task.task_weight is deprecated. * See tensorflow_metadata/proto/v0/problem_statement.proto;l=259 * @return The taskWeight. */ @java.lang.Override @java.lang.Deprecated public double getTaskWeight() { return taskWeight_; } public static final int PERFORMANCE_METRIC_FIELD_NUMBER = 4; @SuppressWarnings("serial") private java.util.List performanceMetric_; /** *
   * This field includes performance metrics of this head that are important to
   * the problem owner and need to be monitored and reported. However, unlike
   * fields such as "meta_optimization_target", these metrics are not
   * not automatically used in meta-optimization.
   * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ @java.lang.Override public java.util.List getPerformanceMetricList() { return performanceMetric_; } /** *
   * This field includes performance metrics of this head that are important to
   * the problem owner and need to be monitored and reported. However, unlike
   * fields such as "meta_optimization_target", these metrics are not
   * not automatically used in meta-optimization.
   * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ @java.lang.Override public java.util.List getPerformanceMetricOrBuilderList() { return performanceMetric_; } /** *
   * This field includes performance metrics of this head that are important to
   * the problem owner and need to be monitored and reported. However, unlike
   * fields such as "meta_optimization_target", these metrics are not
   * not automatically used in meta-optimization.
   * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ @java.lang.Override public int getPerformanceMetricCount() { return performanceMetric_.size(); } /** *
   * This field includes performance metrics of this head that are important to
   * the problem owner and need to be monitored and reported. However, unlike
   * fields such as "meta_optimization_target", these metrics are not
   * not automatically used in meta-optimization.
   * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ @java.lang.Override public org.tensorflow.metadata.v0.PerformanceMetric getPerformanceMetric(int index) { return performanceMetric_.get(index); } /** *
   * This field includes performance metrics of this head that are important to
   * the problem owner and need to be monitored and reported. However, unlike
   * fields such as "meta_optimization_target", these metrics are not
   * not automatically used in meta-optimization.
   * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ @java.lang.Override public org.tensorflow.metadata.v0.PerformanceMetricOrBuilder getPerformanceMetricOrBuilder( int index) { return performanceMetric_.get(index); } public static final int IS_AUXILIARY_FIELD_NUMBER = 6; private boolean isAuxiliary_ = false; /** *
   * True to indicate the task is an auxiliary task in a multi-task setting.
   * Auxiliary tasks are of minor relevance for the application and they are
   * added only to improve the performance on a primary task (by providing
   * additional regularization or data augmentation), and thus are not
   * considered in the meta optimization process (but may be utilized in the
   * learner optimization).
   * 
* * bool is_auxiliary = 6; * @return The isAuxiliary. */ @java.lang.Override public boolean getIsAuxiliary() { return isAuxiliary_; } 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 (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getType()); } if (java.lang.Double.doubleToRawLongBits(taskWeight_) != 0) { output.writeDouble(2, taskWeight_); } for (int i = 0; i < performanceMetric_.size(); i++) { output.writeMessage(4, performanceMetric_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, name_); } if (isAuxiliary_ != false) { output.writeBool(6, isAuxiliary_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getType()); } if (java.lang.Double.doubleToRawLongBits(taskWeight_) != 0) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(2, taskWeight_); } for (int i = 0; i < performanceMetric_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, performanceMetric_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, name_); } if (isAuxiliary_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(6, isAuxiliary_); } 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.Task)) { return super.equals(obj); } org.tensorflow.metadata.v0.Task other = (org.tensorflow.metadata.v0.Task) obj; if (hasType() != other.hasType()) return false; if (hasType()) { if (!getType() .equals(other.getType())) return false; } if (!getName() .equals(other.getName())) return false; if (java.lang.Double.doubleToLongBits(getTaskWeight()) != java.lang.Double.doubleToLongBits( other.getTaskWeight())) return false; if (!getPerformanceMetricList() .equals(other.getPerformanceMetricList())) return false; if (getIsAuxiliary() != other.getIsAuxiliary()) return false; 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(); if (hasType()) { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + TASK_WEIGHT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getTaskWeight())); if (getPerformanceMetricCount() > 0) { hash = (37 * hash) + PERFORMANCE_METRIC_FIELD_NUMBER; hash = (53 * hash) + getPerformanceMetricList().hashCode(); } hash = (37 * hash) + IS_AUXILIARY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getIsAuxiliary()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static org.tensorflow.metadata.v0.Task parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.metadata.v0.Task 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.Task parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.metadata.v0.Task 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.Task parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.metadata.v0.Task parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.metadata.v0.Task parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.metadata.v0.Task 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.Task parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.tensorflow.metadata.v0.Task 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.Task parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.metadata.v0.Task 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.Task 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; } /** *
   * Describes a single task in a model and all its properties.
   * A task corresponds to a single output of the model.
   * Multiple tasks in the same problem statement correspond to different outputs
   * of the model.
   * 
* * Protobuf type {@code tensorflow.metadata.v0.Task} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.metadata.v0.Task) org.tensorflow.metadata.v0.TaskOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_Task_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_Task_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.metadata.v0.Task.class, org.tensorflow.metadata.v0.Task.Builder.class); } // Construct using org.tensorflow.metadata.v0.Task.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getTypeFieldBuilder(); getPerformanceMetricFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; type_ = null; if (typeBuilder_ != null) { typeBuilder_.dispose(); typeBuilder_ = null; } name_ = ""; taskWeight_ = 0D; if (performanceMetricBuilder_ == null) { performanceMetric_ = java.util.Collections.emptyList(); } else { performanceMetric_ = null; performanceMetricBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); isAuxiliary_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_Task_descriptor; } @java.lang.Override public org.tensorflow.metadata.v0.Task getDefaultInstanceForType() { return org.tensorflow.metadata.v0.Task.getDefaultInstance(); } @java.lang.Override public org.tensorflow.metadata.v0.Task build() { org.tensorflow.metadata.v0.Task result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.tensorflow.metadata.v0.Task buildPartial() { org.tensorflow.metadata.v0.Task result = new org.tensorflow.metadata.v0.Task(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(org.tensorflow.metadata.v0.Task result) { if (performanceMetricBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0)) { performanceMetric_ = java.util.Collections.unmodifiableList(performanceMetric_); bitField0_ = (bitField0_ & ~0x00000008); } result.performanceMetric_ = performanceMetric_; } else { result.performanceMetric_ = performanceMetricBuilder_.build(); } } private void buildPartial0(org.tensorflow.metadata.v0.Task result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.type_ = typeBuilder_ == null ? type_ : typeBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.name_ = name_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.taskWeight_ = taskWeight_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.isAuxiliary_ = isAuxiliary_; } result.bitField0_ |= to_bitField0_; } @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.Task) { return mergeFrom((org.tensorflow.metadata.v0.Task)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.tensorflow.metadata.v0.Task other) { if (other == org.tensorflow.metadata.v0.Task.getDefaultInstance()) return this; if (other.hasType()) { mergeType(other.getType()); } if (!other.getName().isEmpty()) { name_ = other.name_; bitField0_ |= 0x00000002; onChanged(); } if (other.getTaskWeight() != 0D) { setTaskWeight(other.getTaskWeight()); } if (performanceMetricBuilder_ == null) { if (!other.performanceMetric_.isEmpty()) { if (performanceMetric_.isEmpty()) { performanceMetric_ = other.performanceMetric_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensurePerformanceMetricIsMutable(); performanceMetric_.addAll(other.performanceMetric_); } onChanged(); } } else { if (!other.performanceMetric_.isEmpty()) { if (performanceMetricBuilder_.isEmpty()) { performanceMetricBuilder_.dispose(); performanceMetricBuilder_ = null; performanceMetric_ = other.performanceMetric_; bitField0_ = (bitField0_ & ~0x00000008); performanceMetricBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPerformanceMetricFieldBuilder() : null; } else { performanceMetricBuilder_.addAllMessages(other.performanceMetric_); } } } if (other.getIsAuxiliary() != false) { setIsAuxiliary(other.getIsAuxiliary()); } 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: { input.readMessage( getTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 17: { taskWeight_ = input.readDouble(); bitField0_ |= 0x00000004; break; } // case 17 case 34: { org.tensorflow.metadata.v0.PerformanceMetric m = input.readMessage( org.tensorflow.metadata.v0.PerformanceMetric.parser(), extensionRegistry); if (performanceMetricBuilder_ == null) { ensurePerformanceMetricIsMutable(); performanceMetric_.add(m); } else { performanceMetricBuilder_.addMessage(m); } break; } // case 34 case 42: { name_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 42 case 48: { isAuxiliary_ = input.readBool(); bitField0_ |= 0x00000010; break; } // case 48 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 bitField0_; private org.tensorflow.metadata.v0.Type type_; private com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.metadata.v0.Type, org.tensorflow.metadata.v0.Type.Builder, org.tensorflow.metadata.v0.TypeOrBuilder> typeBuilder_; /** *
     * Specification of the label and weight columns, and the type of the
     * prediction or classification.
     * 
* * .tensorflow.metadata.v0.Type type = 1; * @return Whether the type field is set. */ public boolean hasType() { return ((bitField0_ & 0x00000001) != 0); } /** *
     * Specification of the label and weight columns, and the type of the
     * prediction or classification.
     * 
* * .tensorflow.metadata.v0.Type type = 1; * @return The type. */ public org.tensorflow.metadata.v0.Type getType() { if (typeBuilder_ == null) { return type_ == null ? org.tensorflow.metadata.v0.Type.getDefaultInstance() : type_; } else { return typeBuilder_.getMessage(); } } /** *
     * Specification of the label and weight columns, and the type of the
     * prediction or classification.
     * 
* * .tensorflow.metadata.v0.Type type = 1; */ public Builder setType(org.tensorflow.metadata.v0.Type value) { if (typeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } type_ = value; } else { typeBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * Specification of the label and weight columns, and the type of the
     * prediction or classification.
     * 
* * .tensorflow.metadata.v0.Type type = 1; */ public Builder setType( org.tensorflow.metadata.v0.Type.Builder builderForValue) { if (typeBuilder_ == null) { type_ = builderForValue.build(); } else { typeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * Specification of the label and weight columns, and the type of the
     * prediction or classification.
     * 
* * .tensorflow.metadata.v0.Type type = 1; */ public Builder mergeType(org.tensorflow.metadata.v0.Type value) { if (typeBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && type_ != null && type_ != org.tensorflow.metadata.v0.Type.getDefaultInstance()) { getTypeBuilder().mergeFrom(value); } else { type_ = value; } } else { typeBuilder_.mergeFrom(value); } if (type_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** *
     * Specification of the label and weight columns, and the type of the
     * prediction or classification.
     * 
* * .tensorflow.metadata.v0.Type type = 1; */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); type_ = null; if (typeBuilder_ != null) { typeBuilder_.dispose(); typeBuilder_ = null; } onChanged(); return this; } /** *
     * Specification of the label and weight columns, and the type of the
     * prediction or classification.
     * 
* * .tensorflow.metadata.v0.Type type = 1; */ public org.tensorflow.metadata.v0.Type.Builder getTypeBuilder() { bitField0_ |= 0x00000001; onChanged(); return getTypeFieldBuilder().getBuilder(); } /** *
     * Specification of the label and weight columns, and the type of the
     * prediction or classification.
     * 
* * .tensorflow.metadata.v0.Type type = 1; */ public org.tensorflow.metadata.v0.TypeOrBuilder getTypeOrBuilder() { if (typeBuilder_ != null) { return typeBuilder_.getMessageOrBuilder(); } else { return type_ == null ? org.tensorflow.metadata.v0.Type.getDefaultInstance() : type_; } } /** *
     * Specification of the label and weight columns, and the type of the
     * prediction or classification.
     * 
* * .tensorflow.metadata.v0.Type type = 1; */ private com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.metadata.v0.Type, org.tensorflow.metadata.v0.Type.Builder, org.tensorflow.metadata.v0.TypeOrBuilder> getTypeFieldBuilder() { if (typeBuilder_ == null) { typeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.metadata.v0.Type, org.tensorflow.metadata.v0.Type.Builder, org.tensorflow.metadata.v0.TypeOrBuilder>( getType(), getParentForChildren(), isClean()); type_ = null; } return typeBuilder_; } private java.lang.Object name_ = ""; /** *
     * The task name. Tasks within the same ProblemStatement should have unique
     * names. This a REQUIRED field in case of multi-task learning problems.
     * 
* * string name = 5; * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * The task name. Tasks within the same ProblemStatement should have unique
     * names. This a REQUIRED field in case of multi-task learning problems.
     * 
* * string name = 5; * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * The task name. Tasks within the same ProblemStatement should have unique
     * names. This a REQUIRED field in case of multi-task learning problems.
     * 
* * string name = 5; * @param value The name to set. * @return This builder for chaining. */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * The task name. Tasks within the same ProblemStatement should have unique
     * names. This a REQUIRED field in case of multi-task learning problems.
     * 
* * string name = 5; * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
     * The task name. Tasks within the same ProblemStatement should have unique
     * names. This a REQUIRED field in case of multi-task learning problems.
     * 
* * string name = 5; * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private double taskWeight_ ; /** *
     * If a Problem is composed of mulitple sub-tasks, the weight of each task
     * determines the importance of solving each sub-task. It is used to
     * rank and select the best solution for multi-task problems.
     * Not meaningful for a problem with one task.
     * If the problem has multiple tasks and all task_weight=0 (unset) then all
     * tasks are weighted equally.
     * 
* * double task_weight = 2 [deprecated = true]; * @deprecated tensorflow.metadata.v0.Task.task_weight is deprecated. * See tensorflow_metadata/proto/v0/problem_statement.proto;l=259 * @return The taskWeight. */ @java.lang.Override @java.lang.Deprecated public double getTaskWeight() { return taskWeight_; } /** *
     * If a Problem is composed of mulitple sub-tasks, the weight of each task
     * determines the importance of solving each sub-task. It is used to
     * rank and select the best solution for multi-task problems.
     * Not meaningful for a problem with one task.
     * If the problem has multiple tasks and all task_weight=0 (unset) then all
     * tasks are weighted equally.
     * 
* * double task_weight = 2 [deprecated = true]; * @deprecated tensorflow.metadata.v0.Task.task_weight is deprecated. * See tensorflow_metadata/proto/v0/problem_statement.proto;l=259 * @param value The taskWeight to set. * @return This builder for chaining. */ @java.lang.Deprecated public Builder setTaskWeight(double value) { taskWeight_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * If a Problem is composed of mulitple sub-tasks, the weight of each task
     * determines the importance of solving each sub-task. It is used to
     * rank and select the best solution for multi-task problems.
     * Not meaningful for a problem with one task.
     * If the problem has multiple tasks and all task_weight=0 (unset) then all
     * tasks are weighted equally.
     * 
* * double task_weight = 2 [deprecated = true]; * @deprecated tensorflow.metadata.v0.Task.task_weight is deprecated. * See tensorflow_metadata/proto/v0/problem_statement.proto;l=259 * @return This builder for chaining. */ @java.lang.Deprecated public Builder clearTaskWeight() { bitField0_ = (bitField0_ & ~0x00000004); taskWeight_ = 0D; onChanged(); return this; } private java.util.List performanceMetric_ = java.util.Collections.emptyList(); private void ensurePerformanceMetricIsMutable() { if (!((bitField0_ & 0x00000008) != 0)) { performanceMetric_ = new java.util.ArrayList(performanceMetric_); bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilderV3< org.tensorflow.metadata.v0.PerformanceMetric, org.tensorflow.metadata.v0.PerformanceMetric.Builder, org.tensorflow.metadata.v0.PerformanceMetricOrBuilder> performanceMetricBuilder_; /** *
     * This field includes performance metrics of this head that are important to
     * the problem owner and need to be monitored and reported. However, unlike
     * fields such as "meta_optimization_target", these metrics are not
     * not automatically used in meta-optimization.
     * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ public java.util.List getPerformanceMetricList() { if (performanceMetricBuilder_ == null) { return java.util.Collections.unmodifiableList(performanceMetric_); } else { return performanceMetricBuilder_.getMessageList(); } } /** *
     * This field includes performance metrics of this head that are important to
     * the problem owner and need to be monitored and reported. However, unlike
     * fields such as "meta_optimization_target", these metrics are not
     * not automatically used in meta-optimization.
     * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ public int getPerformanceMetricCount() { if (performanceMetricBuilder_ == null) { return performanceMetric_.size(); } else { return performanceMetricBuilder_.getCount(); } } /** *
     * This field includes performance metrics of this head that are important to
     * the problem owner and need to be monitored and reported. However, unlike
     * fields such as "meta_optimization_target", these metrics are not
     * not automatically used in meta-optimization.
     * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ public org.tensorflow.metadata.v0.PerformanceMetric getPerformanceMetric(int index) { if (performanceMetricBuilder_ == null) { return performanceMetric_.get(index); } else { return performanceMetricBuilder_.getMessage(index); } } /** *
     * This field includes performance metrics of this head that are important to
     * the problem owner and need to be monitored and reported. However, unlike
     * fields such as "meta_optimization_target", these metrics are not
     * not automatically used in meta-optimization.
     * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ public Builder setPerformanceMetric( int index, org.tensorflow.metadata.v0.PerformanceMetric value) { if (performanceMetricBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePerformanceMetricIsMutable(); performanceMetric_.set(index, value); onChanged(); } else { performanceMetricBuilder_.setMessage(index, value); } return this; } /** *
     * This field includes performance metrics of this head that are important to
     * the problem owner and need to be monitored and reported. However, unlike
     * fields such as "meta_optimization_target", these metrics are not
     * not automatically used in meta-optimization.
     * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ public Builder setPerformanceMetric( int index, org.tensorflow.metadata.v0.PerformanceMetric.Builder builderForValue) { if (performanceMetricBuilder_ == null) { ensurePerformanceMetricIsMutable(); performanceMetric_.set(index, builderForValue.build()); onChanged(); } else { performanceMetricBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * This field includes performance metrics of this head that are important to
     * the problem owner and need to be monitored and reported. However, unlike
     * fields such as "meta_optimization_target", these metrics are not
     * not automatically used in meta-optimization.
     * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ public Builder addPerformanceMetric(org.tensorflow.metadata.v0.PerformanceMetric value) { if (performanceMetricBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePerformanceMetricIsMutable(); performanceMetric_.add(value); onChanged(); } else { performanceMetricBuilder_.addMessage(value); } return this; } /** *
     * This field includes performance metrics of this head that are important to
     * the problem owner and need to be monitored and reported. However, unlike
     * fields such as "meta_optimization_target", these metrics are not
     * not automatically used in meta-optimization.
     * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ public Builder addPerformanceMetric( int index, org.tensorflow.metadata.v0.PerformanceMetric value) { if (performanceMetricBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePerformanceMetricIsMutable(); performanceMetric_.add(index, value); onChanged(); } else { performanceMetricBuilder_.addMessage(index, value); } return this; } /** *
     * This field includes performance metrics of this head that are important to
     * the problem owner and need to be monitored and reported. However, unlike
     * fields such as "meta_optimization_target", these metrics are not
     * not automatically used in meta-optimization.
     * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ public Builder addPerformanceMetric( org.tensorflow.metadata.v0.PerformanceMetric.Builder builderForValue) { if (performanceMetricBuilder_ == null) { ensurePerformanceMetricIsMutable(); performanceMetric_.add(builderForValue.build()); onChanged(); } else { performanceMetricBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * This field includes performance metrics of this head that are important to
     * the problem owner and need to be monitored and reported. However, unlike
     * fields such as "meta_optimization_target", these metrics are not
     * not automatically used in meta-optimization.
     * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ public Builder addPerformanceMetric( int index, org.tensorflow.metadata.v0.PerformanceMetric.Builder builderForValue) { if (performanceMetricBuilder_ == null) { ensurePerformanceMetricIsMutable(); performanceMetric_.add(index, builderForValue.build()); onChanged(); } else { performanceMetricBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * This field includes performance metrics of this head that are important to
     * the problem owner and need to be monitored and reported. However, unlike
     * fields such as "meta_optimization_target", these metrics are not
     * not automatically used in meta-optimization.
     * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ public Builder addAllPerformanceMetric( java.lang.Iterable values) { if (performanceMetricBuilder_ == null) { ensurePerformanceMetricIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, performanceMetric_); onChanged(); } else { performanceMetricBuilder_.addAllMessages(values); } return this; } /** *
     * This field includes performance metrics of this head that are important to
     * the problem owner and need to be monitored and reported. However, unlike
     * fields such as "meta_optimization_target", these metrics are not
     * not automatically used in meta-optimization.
     * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ public Builder clearPerformanceMetric() { if (performanceMetricBuilder_ == null) { performanceMetric_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { performanceMetricBuilder_.clear(); } return this; } /** *
     * This field includes performance metrics of this head that are important to
     * the problem owner and need to be monitored and reported. However, unlike
     * fields such as "meta_optimization_target", these metrics are not
     * not automatically used in meta-optimization.
     * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ public Builder removePerformanceMetric(int index) { if (performanceMetricBuilder_ == null) { ensurePerformanceMetricIsMutable(); performanceMetric_.remove(index); onChanged(); } else { performanceMetricBuilder_.remove(index); } return this; } /** *
     * This field includes performance metrics of this head that are important to
     * the problem owner and need to be monitored and reported. However, unlike
     * fields such as "meta_optimization_target", these metrics are not
     * not automatically used in meta-optimization.
     * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ public org.tensorflow.metadata.v0.PerformanceMetric.Builder getPerformanceMetricBuilder( int index) { return getPerformanceMetricFieldBuilder().getBuilder(index); } /** *
     * This field includes performance metrics of this head that are important to
     * the problem owner and need to be monitored and reported. However, unlike
     * fields such as "meta_optimization_target", these metrics are not
     * not automatically used in meta-optimization.
     * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ public org.tensorflow.metadata.v0.PerformanceMetricOrBuilder getPerformanceMetricOrBuilder( int index) { if (performanceMetricBuilder_ == null) { return performanceMetric_.get(index); } else { return performanceMetricBuilder_.getMessageOrBuilder(index); } } /** *
     * This field includes performance metrics of this head that are important to
     * the problem owner and need to be monitored and reported. However, unlike
     * fields such as "meta_optimization_target", these metrics are not
     * not automatically used in meta-optimization.
     * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ public java.util.List getPerformanceMetricOrBuilderList() { if (performanceMetricBuilder_ != null) { return performanceMetricBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(performanceMetric_); } } /** *
     * This field includes performance metrics of this head that are important to
     * the problem owner and need to be monitored and reported. However, unlike
     * fields such as "meta_optimization_target", these metrics are not
     * not automatically used in meta-optimization.
     * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ public org.tensorflow.metadata.v0.PerformanceMetric.Builder addPerformanceMetricBuilder() { return getPerformanceMetricFieldBuilder().addBuilder( org.tensorflow.metadata.v0.PerformanceMetric.getDefaultInstance()); } /** *
     * This field includes performance metrics of this head that are important to
     * the problem owner and need to be monitored and reported. However, unlike
     * fields such as "meta_optimization_target", these metrics are not
     * not automatically used in meta-optimization.
     * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ public org.tensorflow.metadata.v0.PerformanceMetric.Builder addPerformanceMetricBuilder( int index) { return getPerformanceMetricFieldBuilder().addBuilder( index, org.tensorflow.metadata.v0.PerformanceMetric.getDefaultInstance()); } /** *
     * This field includes performance metrics of this head that are important to
     * the problem owner and need to be monitored and reported. However, unlike
     * fields such as "meta_optimization_target", these metrics are not
     * not automatically used in meta-optimization.
     * 
* * repeated .tensorflow.metadata.v0.PerformanceMetric performance_metric = 4; */ public java.util.List getPerformanceMetricBuilderList() { return getPerformanceMetricFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< 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.RepeatedFieldBuilderV3< org.tensorflow.metadata.v0.PerformanceMetric, org.tensorflow.metadata.v0.PerformanceMetric.Builder, org.tensorflow.metadata.v0.PerformanceMetricOrBuilder>( performanceMetric_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); performanceMetric_ = null; } return performanceMetricBuilder_; } private boolean isAuxiliary_ ; /** *
     * True to indicate the task is an auxiliary task in a multi-task setting.
     * Auxiliary tasks are of minor relevance for the application and they are
     * added only to improve the performance on a primary task (by providing
     * additional regularization or data augmentation), and thus are not
     * considered in the meta optimization process (but may be utilized in the
     * learner optimization).
     * 
* * bool is_auxiliary = 6; * @return The isAuxiliary. */ @java.lang.Override public boolean getIsAuxiliary() { return isAuxiliary_; } /** *
     * True to indicate the task is an auxiliary task in a multi-task setting.
     * Auxiliary tasks are of minor relevance for the application and they are
     * added only to improve the performance on a primary task (by providing
     * additional regularization or data augmentation), and thus are not
     * considered in the meta optimization process (but may be utilized in the
     * learner optimization).
     * 
* * bool is_auxiliary = 6; * @param value The isAuxiliary to set. * @return This builder for chaining. */ public Builder setIsAuxiliary(boolean value) { isAuxiliary_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** *
     * True to indicate the task is an auxiliary task in a multi-task setting.
     * Auxiliary tasks are of minor relevance for the application and they are
     * added only to improve the performance on a primary task (by providing
     * additional regularization or data augmentation), and thus are not
     * considered in the meta optimization process (but may be utilized in the
     * learner optimization).
     * 
* * bool is_auxiliary = 6; * @return This builder for chaining. */ public Builder clearIsAuxiliary() { bitField0_ = (bitField0_ & ~0x00000010); isAuxiliary_ = false; 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.Task) } // @@protoc_insertion_point(class_scope:tensorflow.metadata.v0.Task) private static final org.tensorflow.metadata.v0.Task DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.tensorflow.metadata.v0.Task(); } public static org.tensorflow.metadata.v0.Task getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Task 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.Task getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy