Get Evaluation Data Schema
evaluations.retrieve_schema(strevaluation_id, EvaluationRetrieveSchemaParams**kwargs) -> EvaluationSchemaResponse
GET/v5/evaluations/{evaluation_id}/schema
Describe the data schema of an evaluation’s items.
Inspects the item data and task-result fields and returns each discovered field with its
flattened key path, JSON type, source, and the number of items containing it, ordered
alphabetically by field name. For large evaluations the schema may be inferred from a sample of
items, in which case is_sampled is set and sample_size reports how many were analyzed. Set
include_archived to include archived items in the analysis.
Get Evaluation Data Schema
import os
from scale_gp_beta import SGPClient
client = SGPClient(
api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted
)
evaluation_schema_response = client.evaluations.retrieve_schema(
evaluation_id="evaluation_id",
)
print(evaluation_schema_response.evaluation_id){
"evaluation_id": "evaluation_id",
"fields": [
{
"data_type": "data_type",
"field_name": "field_name",
"item_count": 0,
"source": "data",
"object": "field_schema"
}
],
"total_items": 0,
"is_sampled": true,
"object": "evaluation_schema",
"sample_size": 0
}Returns Examples
{
"evaluation_id": "evaluation_id",
"fields": [
{
"data_type": "data_type",
"field_name": "field_name",
"item_count": 0,
"source": "data",
"object": "field_schema"
}
],
"total_items": 0,
"is_sampled": true,
"object": "evaluation_schema",
"sample_size": 0
}