CodeBasedEvaluatorDefinition Class
- java.
lang. Object - com.
azure. ai. projects. models. EvaluatorDefinition - com.
azure. ai. projects. models. CodeBasedEvaluatorDefinition
- com.
- com.
public final class CodeBasedEvaluatorDefinition
extends EvaluatorDefinition
Code-based evaluator definition using python code.
Constructor Summary
| Constructor | Description |
|---|---|
| CodeBasedEvaluatorDefinition() |
Creates an instance of Code |
| CodeBasedEvaluatorDefinition(String codeText) |
Creates an instance of Code |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Code |
fromJson(JsonReader jsonReader)
Reads an instance of Code |
| String |
getBlobUrl()
Get the blob |
| String |
getCodeText()
Get the code |
| String |
getEntryPoint()
Get the entry |
| String |
getImageTag()
Get the image |
|
Evaluator |
getType()
Get the type property: The type of evaluator definition. |
|
Code |
setBlobUrl(String blobUrl)
Set the blob |
|
Code |
setCodeText(String codeText)
Set the code |
|
Code |
setDataSchema(Map<String,BinaryData> dataSchema)
Set the data |
|
Code |
setEntryPoint(String entryPoint)
Set the entry |
|
Code |
setImageTag(String imageTag)
Set the image |
|
Code |
setInitializationParameters(Map<String,BinaryData> initializationParameters)
Set the initialization |
|
Code |
setMetrics(Map<String,EvaluatorMetric> metrics)
Set the metrics property: List of output metrics produced by this evaluator. |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from EvaluatorDefinition
Methods inherited from java.lang.Object
Constructor Details
CodeBasedEvaluatorDefinition
public CodeBasedEvaluatorDefinition()
Creates an instance of CodeBasedEvaluatorDefinition class.
CodeBasedEvaluatorDefinition
public CodeBasedEvaluatorDefinition(String codeText)
Creates an instance of CodeBasedEvaluatorDefinition class.
Parameters:
Method Details
fromJson
public static CodeBasedEvaluatorDefinition fromJson(JsonReader jsonReader)
Reads an instance of CodeBasedEvaluatorDefinition from the JsonReader.
Parameters:
Returns:
Throws:
getBlobUrl
public String getBlobUrl()
Get the blobUrl property: The blob URI for the evaluator storage.
Returns:
getCodeText
public String getCodeText()
Get the codeText property: Inline code text for the evaluator.
Returns:
getEntryPoint
public String getEntryPoint()
Get the entryPoint property: The entry point Python file name for the uploaded evaluator code (e.g. 'answer_length_evaluator.py').
Returns:
getImageTag
public String getImageTag()
Get the imageTag property: The container image tag to use for evaluator code execution.
Returns:
getType
public EvaluatorDefinitionType getType()
Get the type property: The type of evaluator definition.
Overrides:
CodeBasedEvaluatorDefinition.getType()Returns:
setBlobUrl
public CodeBasedEvaluatorDefinition setBlobUrl(String blobUrl)
Set the blobUrl property: The blob URI for the evaluator storage.
Parameters:
Returns:
setCodeText
public CodeBasedEvaluatorDefinition setCodeText(String codeText)
Set the codeText property: Inline code text for the evaluator.
Parameters:
Returns:
setDataSchema
public CodeBasedEvaluatorDefinition setDataSchema(Map<String,BinaryData> dataSchema)
Set the dataSchema property: The JSON schema (Draft 2020-12) for the evaluator's input data. This includes parameters like type, properties, required.
Overrides:
CodeBasedEvaluatorDefinition.setDataSchema(Map<String,BinaryData> dataSchema)Parameters:
setEntryPoint
public CodeBasedEvaluatorDefinition setEntryPoint(String entryPoint)
Set the entryPoint property: The entry point Python file name for the uploaded evaluator code (e.g. 'answer_length_evaluator.py').
Parameters:
Returns:
setImageTag
public CodeBasedEvaluatorDefinition setImageTag(String imageTag)
Set the imageTag property: The container image tag to use for evaluator code execution.
Parameters:
Returns:
setInitializationParameters
public CodeBasedEvaluatorDefinition setInitializationParameters(Map<String,BinaryData> initializationParameters)
Set the initializationParameters property: The JSON schema (Draft 2020-12) for the evaluator's input parameters. This includes parameters like type, properties, required.
Overrides:
CodeBasedEvaluatorDefinition.setInitializationParameters(Map<String,BinaryData> initializationParameters)Parameters:
setMetrics
public CodeBasedEvaluatorDefinition setMetrics(Map<String,EvaluatorMetric> metrics)
Set the metrics property: List of output metrics produced by this evaluator.
Overrides:
CodeBasedEvaluatorDefinition.setMetrics(Map<String,EvaluatorMetric> metrics)Parameters:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
CodeBasedEvaluatorDefinition.toJson(JsonWriter jsonWriter)Parameters:
Throws: