Class StudySpec.MetricSpec.SafetyMetricConfig (3.20.0)

public static final class StudySpec.MetricSpec.SafetyMetricConfig extends GeneratedMessageV3 implements StudySpec.MetricSpec.SafetyMetricConfigOrBuilder

Used in safe optimization to specify threshold levels and risk tolerance.

Protobuf type google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > StudySpec.MetricSpec.SafetyMetricConfig

Static Fields

DESIRED_MIN_SAFE_TRIALS_FRACTION_FIELD_NUMBER

public static final int DESIRED_MIN_SAFE_TRIALS_FRACTION_FIELD_NUMBER
Field Value
TypeDescription
int

SAFETY_THRESHOLD_FIELD_NUMBER

public static final int SAFETY_THRESHOLD_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static StudySpec.MetricSpec.SafetyMetricConfig getDefaultInstance()
Returns
TypeDescription
StudySpec.MetricSpec.SafetyMetricConfig

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static StudySpec.MetricSpec.SafetyMetricConfig.Builder newBuilder()
Returns
TypeDescription
StudySpec.MetricSpec.SafetyMetricConfig.Builder

newBuilder(StudySpec.MetricSpec.SafetyMetricConfig prototype)

public static StudySpec.MetricSpec.SafetyMetricConfig.Builder newBuilder(StudySpec.MetricSpec.SafetyMetricConfig prototype)
Parameter
NameDescription
prototypeStudySpec.MetricSpec.SafetyMetricConfig
Returns
TypeDescription
StudySpec.MetricSpec.SafetyMetricConfig.Builder

parseDelimitedFrom(InputStream input)

public static StudySpec.MetricSpec.SafetyMetricConfig parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
StudySpec.MetricSpec.SafetyMetricConfig
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StudySpec.MetricSpec.SafetyMetricConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StudySpec.MetricSpec.SafetyMetricConfig
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static StudySpec.MetricSpec.SafetyMetricConfig parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
StudySpec.MetricSpec.SafetyMetricConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static StudySpec.MetricSpec.SafetyMetricConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StudySpec.MetricSpec.SafetyMetricConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static StudySpec.MetricSpec.SafetyMetricConfig parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
StudySpec.MetricSpec.SafetyMetricConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static StudySpec.MetricSpec.SafetyMetricConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StudySpec.MetricSpec.SafetyMetricConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static StudySpec.MetricSpec.SafetyMetricConfig parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
StudySpec.MetricSpec.SafetyMetricConfig
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static StudySpec.MetricSpec.SafetyMetricConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StudySpec.MetricSpec.SafetyMetricConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static StudySpec.MetricSpec.SafetyMetricConfig parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
StudySpec.MetricSpec.SafetyMetricConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StudySpec.MetricSpec.SafetyMetricConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StudySpec.MetricSpec.SafetyMetricConfig
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static StudySpec.MetricSpec.SafetyMetricConfig parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
StudySpec.MetricSpec.SafetyMetricConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static StudySpec.MetricSpec.SafetyMetricConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StudySpec.MetricSpec.SafetyMetricConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<StudySpec.MetricSpec.SafetyMetricConfig> parser()
Returns
TypeDescription
Parser<SafetyMetricConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public StudySpec.MetricSpec.SafetyMetricConfig getDefaultInstanceForType()
Returns
TypeDescription
StudySpec.MetricSpec.SafetyMetricConfig

getDesiredMinSafeTrialsFraction()

public double getDesiredMinSafeTrialsFraction()

Desired minimum fraction of safe trials (over total number of trials) that should be targeted by the algorithm at any time during the study (best effort). This should be between 0.0 and 1.0 and a value of 0.0 means that there is no minimum and an algorithm proceeds without targeting any specific fraction. A value of 1.0 means that the algorithm attempts to only Suggest safe Trials.

optional double desired_min_safe_trials_fraction = 2;

Returns
TypeDescription
double

The desiredMinSafeTrialsFraction.

getParserForType()

public Parser<StudySpec.MetricSpec.SafetyMetricConfig> getParserForType()
Returns
TypeDescription
Parser<SafetyMetricConfig>
Overrides

getSafetyThreshold()

public double getSafetyThreshold()

Safety threshold (boundary value between safe and unsafe). NOTE that if you leave SafetyMetricConfig unset, a default value of 0 will be used.

double safety_threshold = 1;

Returns
TypeDescription
double

The safetyThreshold.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hasDesiredMinSafeTrialsFraction()

public boolean hasDesiredMinSafeTrialsFraction()

Desired minimum fraction of safe trials (over total number of trials) that should be targeted by the algorithm at any time during the study (best effort). This should be between 0.0 and 1.0 and a value of 0.0 means that there is no minimum and an algorithm proceeds without targeting any specific fraction. A value of 1.0 means that the algorithm attempts to only Suggest safe Trials.

optional double desired_min_safe_trials_fraction = 2;

Returns
TypeDescription
boolean

Whether the desiredMinSafeTrialsFraction field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public StudySpec.MetricSpec.SafetyMetricConfig.Builder newBuilderForType()
Returns
TypeDescription
StudySpec.MetricSpec.SafetyMetricConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected StudySpec.MetricSpec.SafetyMetricConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
StudySpec.MetricSpec.SafetyMetricConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public StudySpec.MetricSpec.SafetyMetricConfig.Builder toBuilder()
Returns
TypeDescription
StudySpec.MetricSpec.SafetyMetricConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException