Class EvalCreateParams.TestingCriterion.Python
-
- All Implemented Interfaces:
public final class EvalCreateParams.TestingCriterion.Python
A PythonGrader object that runs a python script on the input.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
EvalCreateParams.TestingCriterion.Python.Builder
A builder for Python.
-
Method Summary
Modifier and Type Method Description final PythonGrader
toPythonGrader()
final String
name()
The name of the grader. final String
source()
The source code of the python script. final JsonValue
_type()
The object type, which is always python
.final Optional<String>
imageTag()
The image tag to use for the python script. final Optional<Double>
passThreshold()
The threshold for the score. final JsonField<String>
_name()
Returns the raw JSON value of name. final JsonField<String>
_source()
Returns the raw JSON value of source. final JsonField<String>
_imageTag()
Returns the raw JSON value of imageTag. final JsonField<Double>
_passThreshold()
Returns the raw JSON value of passThreshold. final Map<String, JsonValue>
_additionalProperties()
final EvalCreateParams.TestingCriterion.Python.Builder
toBuilder()
final EvalCreateParams.TestingCriterion.Python
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static EvalCreateParams.TestingCriterion.Python.Builder
builder()
Returns a mutable builder for constructing an instance of Python. -
-
Method Detail
-
toPythonGrader
final PythonGrader toPythonGrader()
-
_type
final JsonValue _type()
The object type, which is always
python
.Expected to always return the following:
JsonValue.from("python")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
passThreshold
final Optional<Double> passThreshold()
The threshold for the score.
-
_name
final JsonField<String> _name()
Returns the raw JSON value of name.
Unlike name, this method doesn't throw if the JSON field has an unexpected type.
-
_source
final JsonField<String> _source()
Returns the raw JSON value of source.
Unlike source, this method doesn't throw if the JSON field has an unexpected type.
-
_imageTag
final JsonField<String> _imageTag()
Returns the raw JSON value of imageTag.
Unlike imageTag, this method doesn't throw if the JSON field has an unexpected type.
-
_passThreshold
final JsonField<Double> _passThreshold()
Returns the raw JSON value of passThreshold.
Unlike passThreshold, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final EvalCreateParams.TestingCriterion.Python.Builder toBuilder()
-
validate
final EvalCreateParams.TestingCriterion.Python validate()
-
builder
final static EvalCreateParams.TestingCriterion.Python.Builder builder()
Returns a mutable builder for constructing an instance of Python.
The following fields are required:
.name() .source()
-
-
-
-