eval-studio-client 1.2.1a4__py3-none-any.whl → 1.2.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- eval_studio_client/api/models/adversarial_inputs_service_test_adversarial_inputs_robustness_request.py +5 -5
- eval_studio_client/api/models/perturbation_service_create_perturbation_request.py +11 -11
- eval_studio_client/api/models/prompt_generation_service_auto_generate_prompts_request.py +2 -2
- eval_studio_client/api/models/protobuf_any.py +2 -2
- eval_studio_client/api/models/required_the_dashboard_to_update.py +2 -2
- eval_studio_client/api/models/required_the_document_to_update.py +2 -2
- eval_studio_client/api/models/required_the_leaderboard_to_update.py +8 -8
- eval_studio_client/api/models/required_the_model_to_update.py +2 -2
- eval_studio_client/api/models/required_the_operation_to_finalize.py +2 -2
- eval_studio_client/api/models/required_the_operation_to_update.py +2 -2
- eval_studio_client/api/models/required_the_test_case_to_update.py +2 -2
- eval_studio_client/api/models/required_the_test_to_update.py +2 -2
- eval_studio_client/api/models/required_the_updated_workflow.py +5 -5
- eval_studio_client/api/models/required_the_updated_workflow_node.py +5 -5
- eval_studio_client/api/models/rpc_status.py +5 -5
- eval_studio_client/api/models/test_case_service_batch_delete_test_cases_request.py +2 -2
- eval_studio_client/api/models/test_service_clone_test_request.py +2 -2
- eval_studio_client/api/models/test_service_generate_test_cases_request.py +5 -5
- eval_studio_client/api/models/test_service_grant_test_access_request.py +2 -2
- eval_studio_client/api/models/test_service_import_test_cases_from_library_request.py +2 -2
- eval_studio_client/api/models/test_service_list_test_case_library_items_request.py +2 -2
- eval_studio_client/api/models/test_service_perturb_test_in_place_request.py +5 -5
- eval_studio_client/api/models/test_service_perturb_test_request.py +5 -5
- eval_studio_client/api/models/test_service_revoke_test_access_request.py +2 -2
- eval_studio_client/api/models/v1_abort_operation_response.py +2 -2
- eval_studio_client/api/models/v1_batch_create_leaderboards_request.py +5 -5
- eval_studio_client/api/models/v1_batch_create_leaderboards_response.py +2 -2
- eval_studio_client/api/models/v1_batch_delete_dashboards_request.py +2 -2
- eval_studio_client/api/models/v1_batch_delete_dashboards_response.py +5 -5
- eval_studio_client/api/models/v1_batch_delete_documents_request.py +2 -2
- eval_studio_client/api/models/v1_batch_delete_documents_response.py +5 -5
- eval_studio_client/api/models/v1_batch_delete_evaluators_request.py +2 -2
- eval_studio_client/api/models/v1_batch_delete_evaluators_response.py +5 -5
- eval_studio_client/api/models/v1_batch_delete_leaderboards_request.py +2 -2
- eval_studio_client/api/models/v1_batch_delete_leaderboards_response.py +5 -5
- eval_studio_client/api/models/v1_batch_delete_models_request.py +2 -2
- eval_studio_client/api/models/v1_batch_delete_models_response.py +5 -5
- eval_studio_client/api/models/v1_batch_delete_test_cases_response.py +5 -5
- eval_studio_client/api/models/v1_batch_delete_tests_request.py +2 -2
- eval_studio_client/api/models/v1_batch_delete_tests_response.py +5 -5
- eval_studio_client/api/models/v1_batch_delete_workflows_request.py +2 -2
- eval_studio_client/api/models/v1_batch_delete_workflows_response.py +5 -5
- eval_studio_client/api/models/v1_batch_get_dashboards_response.py +5 -5
- eval_studio_client/api/models/v1_batch_get_documents_response.py +5 -5
- eval_studio_client/api/models/v1_batch_get_leaderboards_response.py +5 -5
- eval_studio_client/api/models/v1_batch_get_models_response.py +5 -5
- eval_studio_client/api/models/v1_batch_get_operations_response.py +5 -5
- eval_studio_client/api/models/v1_batch_get_tests_response.py +5 -5
- eval_studio_client/api/models/v1_batch_get_workflow_edges_response.py +5 -5
- eval_studio_client/api/models/v1_batch_get_workflow_nodes_response.py +5 -5
- eval_studio_client/api/models/v1_batch_import_leaderboard_request.py +2 -2
- eval_studio_client/api/models/v1_batch_import_leaderboard_response.py +2 -2
- eval_studio_client/api/models/v1_batch_import_tests_request.py +2 -2
- eval_studio_client/api/models/v1_batch_import_tests_response.py +5 -5
- eval_studio_client/api/models/v1_check_base_models_response.py +2 -2
- eval_studio_client/api/models/v1_clone_test_response.py +2 -2
- eval_studio_client/api/models/v1_clone_workflow_response.py +2 -2
- eval_studio_client/api/models/v1_collection_info.py +2 -2
- eval_studio_client/api/models/v1_context.py +2 -2
- eval_studio_client/api/models/v1_create_dashboard_response.py +2 -2
- eval_studio_client/api/models/v1_create_document_response.py +2 -2
- eval_studio_client/api/models/v1_create_evaluation_request.py +5 -5
- eval_studio_client/api/models/v1_create_evaluator_response.py +2 -2
- eval_studio_client/api/models/v1_create_leaderboard_request.py +2 -2
- eval_studio_client/api/models/v1_create_leaderboard_response.py +2 -2
- eval_studio_client/api/models/v1_create_leaderboard_without_cache_response.py +2 -2
- eval_studio_client/api/models/v1_create_model_response.py +2 -2
- eval_studio_client/api/models/v1_create_perturbation_response.py +2 -2
- eval_studio_client/api/models/v1_create_test_case_response.py +2 -2
- eval_studio_client/api/models/v1_create_test_lab_response.py +2 -2
- eval_studio_client/api/models/v1_create_test_response.py +2 -2
- eval_studio_client/api/models/v1_create_workflow_edge_response.py +2 -2
- eval_studio_client/api/models/v1_create_workflow_node_response.py +2 -2
- eval_studio_client/api/models/v1_create_workflow_response.py +2 -2
- eval_studio_client/api/models/v1_dashboard.py +2 -2
- eval_studio_client/api/models/v1_delete_dashboard_response.py +2 -2
- eval_studio_client/api/models/v1_delete_document_response.py +2 -2
- eval_studio_client/api/models/v1_delete_evaluator_response.py +2 -2
- eval_studio_client/api/models/v1_delete_leaderboard_response.py +2 -2
- eval_studio_client/api/models/v1_delete_model_response.py +2 -2
- eval_studio_client/api/models/v1_delete_test_case_response.py +2 -2
- eval_studio_client/api/models/v1_delete_test_response.py +2 -2
- eval_studio_client/api/models/v1_delete_workflow_edge_response.py +2 -2
- eval_studio_client/api/models/v1_delete_workflow_node_response.py +2 -2
- eval_studio_client/api/models/v1_delete_workflow_response.py +2 -2
- eval_studio_client/api/models/v1_dependency_list.py +5 -5
- eval_studio_client/api/models/v1_document.py +2 -2
- eval_studio_client/api/models/v1_estimate_threshold_request.py +5 -5
- eval_studio_client/api/models/v1_evaluation_test.py +8 -8
- eval_studio_client/api/models/v1_evaluator.py +5 -5
- eval_studio_client/api/models/v1_evaluator_parameter.py +2 -2
- eval_studio_client/api/models/v1_finalize_operation_response.py +2 -2
- eval_studio_client/api/models/v1_find_all_test_cases_by_id_response.py +5 -5
- eval_studio_client/api/models/v1_find_test_lab_response.py +2 -2
- eval_studio_client/api/models/v1_find_workflows_by_collection_id_response.py +5 -5
- eval_studio_client/api/models/v1_generate_test_cases_response.py +2 -2
- eval_studio_client/api/models/v1_get_dashboard_response.py +2 -2
- eval_studio_client/api/models/v1_get_document_response.py +2 -2
- eval_studio_client/api/models/v1_get_evaluator_response.py +2 -2
- eval_studio_client/api/models/v1_get_guardrails_configuration_response.py +2 -2
- eval_studio_client/api/models/v1_get_info_response.py +2 -2
- eval_studio_client/api/models/v1_get_leaderboard_report_response.py +2 -2
- eval_studio_client/api/models/v1_get_leaderboard_response.py +2 -2
- eval_studio_client/api/models/v1_get_model_response.py +2 -2
- eval_studio_client/api/models/v1_get_operation_progress_by_parent_response.py +2 -2
- eval_studio_client/api/models/v1_get_operation_response.py +2 -2
- eval_studio_client/api/models/v1_get_perturbator_response.py +2 -2
- eval_studio_client/api/models/v1_get_stats_response.py +2 -2
- eval_studio_client/api/models/v1_get_test_case_response.py +2 -2
- eval_studio_client/api/models/v1_get_test_class_response.py +2 -2
- eval_studio_client/api/models/v1_get_test_response.py +2 -2
- eval_studio_client/api/models/v1_get_workflow_node_prerequisites_response.py +2 -2
- eval_studio_client/api/models/v1_get_workflow_node_response.py +2 -2
- eval_studio_client/api/models/v1_get_workflow_response.py +2 -2
- eval_studio_client/api/models/v1_get_workflow_result_corpus_patch_response.py +2 -2
- eval_studio_client/api/models/v1_get_workflow_result_report_response.py +2 -2
- eval_studio_client/api/models/v1_get_workflow_result_summary_response.py +2 -2
- eval_studio_client/api/models/v1_get_workflow_result_system_prompt_patch_response.py +2 -2
- eval_studio_client/api/models/v1_import_evaluation_request.py +2 -2
- eval_studio_client/api/models/v1_import_leaderboard_request.py +2 -2
- eval_studio_client/api/models/v1_import_leaderboard_response.py +2 -2
- eval_studio_client/api/models/v1_import_test_cases_from_library_response.py +2 -2
- eval_studio_client/api/models/v1_import_test_cases_request.py +2 -2
- eval_studio_client/api/models/v1_info.py +2 -2
- eval_studio_client/api/models/v1_init_workflow_node_response.py +2 -2
- eval_studio_client/api/models/v1_insight.py +2 -2
- eval_studio_client/api/models/v1_labeled_test_case.py +2 -2
- eval_studio_client/api/models/v1_leaderboard.py +8 -8
- eval_studio_client/api/models/v1_leaderboard_report.py +8 -8
- eval_studio_client/api/models/v1_leaderboard_report_actual_output_data.py +2 -2
- eval_studio_client/api/models/v1_leaderboard_report_actual_output_meta.py +5 -5
- eval_studio_client/api/models/v1_leaderboard_report_evaluator.py +11 -11
- eval_studio_client/api/models/v1_leaderboard_report_evaluator_parameter.py +2 -2
- eval_studio_client/api/models/v1_leaderboard_report_explanation.py +2 -2
- eval_studio_client/api/models/v1_leaderboard_report_metrics_meta_entry.py +2 -2
- eval_studio_client/api/models/v1_leaderboard_report_model.py +2 -2
- eval_studio_client/api/models/v1_leaderboard_report_result.py +11 -11
- eval_studio_client/api/models/v1_leaderboard_report_result_relationship.py +2 -2
- eval_studio_client/api/models/v1_list_base_models_response.py +2 -2
- eval_studio_client/api/models/v1_list_dashboard_access_response.py +5 -5
- eval_studio_client/api/models/v1_list_dashboards_response.py +5 -5
- eval_studio_client/api/models/v1_list_dashboards_shared_with_me_response.py +5 -5
- eval_studio_client/api/models/v1_list_documents_response.py +5 -5
- eval_studio_client/api/models/v1_list_evaluators_response.py +5 -5
- eval_studio_client/api/models/v1_list_leaderboards_response.py +5 -5
- eval_studio_client/api/models/v1_list_llm_models_response.py +2 -2
- eval_studio_client/api/models/v1_list_model_collections_response.py +5 -5
- eval_studio_client/api/models/v1_list_models_response.py +5 -5
- eval_studio_client/api/models/v1_list_most_recent_dashboards_response.py +5 -5
- eval_studio_client/api/models/v1_list_most_recent_leaderboards_response.py +5 -5
- eval_studio_client/api/models/v1_list_most_recent_models_response.py +5 -5
- eval_studio_client/api/models/v1_list_most_recent_tests_response.py +5 -5
- eval_studio_client/api/models/v1_list_operations_response.py +5 -5
- eval_studio_client/api/models/v1_list_perturbators_response.py +5 -5
- eval_studio_client/api/models/v1_list_prompt_library_items_response.py +5 -5
- eval_studio_client/api/models/v1_list_rag_collections_response.py +5 -5
- eval_studio_client/api/models/v1_list_test_access_response.py +5 -5
- eval_studio_client/api/models/v1_list_test_case_library_items_response.py +5 -5
- eval_studio_client/api/models/v1_list_test_case_relationships_response.py +5 -5
- eval_studio_client/api/models/v1_list_test_cases_response.py +5 -5
- eval_studio_client/api/models/v1_list_test_classes_response.py +5 -5
- eval_studio_client/api/models/v1_list_tests_response.py +5 -5
- eval_studio_client/api/models/v1_list_tests_shared_with_me_response.py +5 -5
- eval_studio_client/api/models/v1_list_workflow_access_response.py +5 -5
- eval_studio_client/api/models/v1_list_workflow_dependencies_response.py +8 -8
- eval_studio_client/api/models/v1_list_workflows_response.py +5 -5
- eval_studio_client/api/models/v1_list_workflows_shared_with_me_response.py +5 -5
- eval_studio_client/api/models/v1_metric_score.py +2 -2
- eval_studio_client/api/models/v1_metric_scores.py +5 -5
- eval_studio_client/api/models/v1_model.py +2 -2
- eval_studio_client/api/models/v1_operation.py +2 -2
- eval_studio_client/api/models/v1_operation_progress.py +2 -2
- eval_studio_client/api/models/v1_perturb_test_in_place_response.py +2 -2
- eval_studio_client/api/models/v1_perturb_test_response.py +2 -2
- eval_studio_client/api/models/v1_perturbator.py +2 -2
- eval_studio_client/api/models/v1_perturbator_configuration.py +2 -2
- eval_studio_client/api/models/v1_problem_and_action.py +2 -2
- eval_studio_client/api/models/v1_process_workflow_node_response.py +2 -2
- eval_studio_client/api/models/v1_prompt_library_item.py +2 -2
- eval_studio_client/api/models/v1_repeated_context.py +5 -5
- eval_studio_client/api/models/v1_repeated_string.py +2 -2
- eval_studio_client/api/models/v1_reset_workflow_node_response.py +2 -2
- eval_studio_client/api/models/v1_role_binding.py +2 -2
- eval_studio_client/api/models/v1_stats.py +2 -2
- eval_studio_client/api/models/v1_test.py +2 -2
- eval_studio_client/api/models/v1_test_case.py +2 -2
- eval_studio_client/api/models/v1_test_case_relationship.py +2 -2
- eval_studio_client/api/models/v1_test_class.py +2 -2
- eval_studio_client/api/models/v1_test_lab.py +2 -2
- eval_studio_client/api/models/v1_update_dashboard_response.py +2 -2
- eval_studio_client/api/models/v1_update_document_response.py +2 -2
- eval_studio_client/api/models/v1_update_leaderboard_response.py +2 -2
- eval_studio_client/api/models/v1_update_model_response.py +2 -2
- eval_studio_client/api/models/v1_update_operation_response.py +2 -2
- eval_studio_client/api/models/v1_update_test_case_response.py +2 -2
- eval_studio_client/api/models/v1_update_test_response.py +2 -2
- eval_studio_client/api/models/v1_update_workflow_node_response.py +2 -2
- eval_studio_client/api/models/v1_update_workflow_response.py +2 -2
- eval_studio_client/api/models/v1_who_am_i_response.py +2 -2
- eval_studio_client/api/models/v1_workflow.py +5 -5
- eval_studio_client/api/models/v1_workflow_dependency.py +2 -2
- eval_studio_client/api/models/v1_workflow_edge.py +2 -2
- eval_studio_client/api/models/v1_workflow_node.py +5 -5
- eval_studio_client/api/models/v1_workflow_node_artifact.py +2 -2
- eval_studio_client/api/models/v1_workflow_node_artifacts.py +5 -5
- eval_studio_client/api/models/v1_workflow_node_attributes.py +2 -2
- eval_studio_client/api/models/workflow_service_clone_workflow_request.py +2 -2
- eval_studio_client/api/models/workflow_service_revoke_workflow_access_request.py +2 -2
- eval_studio_client/leaderboards.py +17 -0
- eval_studio_client/models.py +153 -8
- {eval_studio_client-1.2.1a4.dist-info → eval_studio_client-1.2.2.dist-info}/METADATA +1 -1
- {eval_studio_client-1.2.1a4.dist-info → eval_studio_client-1.2.2.dist-info}/RECORD +213 -213
- {eval_studio_client-1.2.1a4.dist-info → eval_studio_client-1.2.2.dist-info}/WHEEL +0 -0
|
@@ -72,9 +72,9 @@ class V1RepeatedContext(BaseModel):
|
|
|
72
72
|
# override the default output from pydantic by calling `to_dict()` of each item in content (list)
|
|
73
73
|
_items = []
|
|
74
74
|
if self.content:
|
|
75
|
-
for
|
|
76
|
-
if
|
|
77
|
-
_items.append(
|
|
75
|
+
for _item_content in self.content:
|
|
76
|
+
if _item_content:
|
|
77
|
+
_items.append(_item_content.to_dict())
|
|
78
78
|
_dict['content'] = _items
|
|
79
79
|
return _dict
|
|
80
80
|
|
|
@@ -85,11 +85,11 @@ class V1RepeatedContext(BaseModel):
|
|
|
85
85
|
return None
|
|
86
86
|
|
|
87
87
|
if not isinstance(obj, dict):
|
|
88
|
-
return cls.model_validate(obj)
|
|
88
|
+
return cls.model_validate(obj, strict=False)
|
|
89
89
|
|
|
90
90
|
_obj = cls.model_validate({
|
|
91
91
|
"content": [V1Context.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None
|
|
92
|
-
})
|
|
92
|
+
}, strict=False)
|
|
93
93
|
return _obj
|
|
94
94
|
|
|
95
95
|
|
|
@@ -77,11 +77,11 @@ class V1RepeatedString(BaseModel):
|
|
|
77
77
|
return None
|
|
78
78
|
|
|
79
79
|
if not isinstance(obj, dict):
|
|
80
|
-
return cls.model_validate(obj)
|
|
80
|
+
return cls.model_validate(obj, strict=False)
|
|
81
81
|
|
|
82
82
|
_obj = cls.model_validate({
|
|
83
83
|
"content": obj.get("content")
|
|
84
|
-
})
|
|
84
|
+
}, strict=False)
|
|
85
85
|
return _obj
|
|
86
86
|
|
|
87
87
|
|
|
@@ -81,11 +81,11 @@ class V1ResetWorkflowNodeResponse(BaseModel):
|
|
|
81
81
|
return None
|
|
82
82
|
|
|
83
83
|
if not isinstance(obj, dict):
|
|
84
|
-
return cls.model_validate(obj)
|
|
84
|
+
return cls.model_validate(obj, strict=False)
|
|
85
85
|
|
|
86
86
|
_obj = cls.model_validate({
|
|
87
87
|
"node": V1WorkflowNode.from_dict(obj["node"]) if obj.get("node") is not None else None
|
|
88
|
-
})
|
|
88
|
+
}, strict=False)
|
|
89
89
|
return _obj
|
|
90
90
|
|
|
91
91
|
|
|
@@ -80,13 +80,13 @@ class V1RoleBinding(BaseModel):
|
|
|
80
80
|
return None
|
|
81
81
|
|
|
82
82
|
if not isinstance(obj, dict):
|
|
83
|
-
return cls.model_validate(obj)
|
|
83
|
+
return cls.model_validate(obj, strict=False)
|
|
84
84
|
|
|
85
85
|
_obj = cls.model_validate({
|
|
86
86
|
"subject": obj.get("subject"),
|
|
87
87
|
"role": obj.get("role"),
|
|
88
88
|
"resource": obj.get("resource")
|
|
89
|
-
})
|
|
89
|
+
}, strict=False)
|
|
90
90
|
return _obj
|
|
91
91
|
|
|
92
92
|
|
|
@@ -94,13 +94,13 @@ class V1Stats(BaseModel):
|
|
|
94
94
|
return None
|
|
95
95
|
|
|
96
96
|
if not isinstance(obj, dict):
|
|
97
|
-
return cls.model_validate(obj)
|
|
97
|
+
return cls.model_validate(obj, strict=False)
|
|
98
98
|
|
|
99
99
|
_obj = cls.model_validate({
|
|
100
100
|
"topicModelingPendingJobs": obj.get("topicModelingPendingJobs"),
|
|
101
101
|
"testValidationPendingJobs": obj.get("testValidationPendingJobs"),
|
|
102
102
|
"failureClusteringPendingJobs": obj.get("failureClusteringPendingJobs")
|
|
103
|
-
})
|
|
103
|
+
}, strict=False)
|
|
104
104
|
return _obj
|
|
105
105
|
|
|
106
106
|
|
|
@@ -107,7 +107,7 @@ class V1Test(BaseModel):
|
|
|
107
107
|
return None
|
|
108
108
|
|
|
109
109
|
if not isinstance(obj, dict):
|
|
110
|
-
return cls.model_validate(obj)
|
|
110
|
+
return cls.model_validate(obj, strict=False)
|
|
111
111
|
|
|
112
112
|
_obj = cls.model_validate({
|
|
113
113
|
"name": obj.get("name"),
|
|
@@ -123,7 +123,7 @@ class V1Test(BaseModel):
|
|
|
123
123
|
"tags": obj.get("tags"),
|
|
124
124
|
"demo": obj.get("demo"),
|
|
125
125
|
"type": obj.get("type")
|
|
126
|
-
})
|
|
126
|
+
}, strict=False)
|
|
127
127
|
return _obj
|
|
128
128
|
|
|
129
129
|
|
|
@@ -111,7 +111,7 @@ class V1TestCase(BaseModel):
|
|
|
111
111
|
return None
|
|
112
112
|
|
|
113
113
|
if not isinstance(obj, dict):
|
|
114
|
-
return cls.model_validate(obj)
|
|
114
|
+
return cls.model_validate(obj, strict=False)
|
|
115
115
|
|
|
116
116
|
_obj = cls.model_validate({
|
|
117
117
|
"name": obj.get("name"),
|
|
@@ -129,7 +129,7 @@ class V1TestCase(BaseModel):
|
|
|
129
129
|
"perturbedBy": obj.get("perturbedBy"),
|
|
130
130
|
"topics": obj.get("topics"),
|
|
131
131
|
"generator": obj.get("generator")
|
|
132
|
-
})
|
|
132
|
+
}, strict=False)
|
|
133
133
|
return _obj
|
|
134
134
|
|
|
135
135
|
|
|
@@ -79,13 +79,13 @@ class V1TestCaseRelationship(BaseModel):
|
|
|
79
79
|
return None
|
|
80
80
|
|
|
81
81
|
if not isinstance(obj, dict):
|
|
82
|
-
return cls.model_validate(obj)
|
|
82
|
+
return cls.model_validate(obj, strict=False)
|
|
83
83
|
|
|
84
84
|
_obj = cls.model_validate({
|
|
85
85
|
"source": obj.get("source"),
|
|
86
86
|
"target": obj.get("target"),
|
|
87
87
|
"type": obj.get("type")
|
|
88
|
-
})
|
|
88
|
+
}, strict=False)
|
|
89
89
|
return _obj
|
|
90
90
|
|
|
91
91
|
|
|
@@ -105,7 +105,7 @@ class V1TestClass(BaseModel):
|
|
|
105
105
|
return None
|
|
106
106
|
|
|
107
107
|
if not isinstance(obj, dict):
|
|
108
|
-
return cls.model_validate(obj)
|
|
108
|
+
return cls.model_validate(obj, strict=False)
|
|
109
109
|
|
|
110
110
|
_obj = cls.model_validate({
|
|
111
111
|
"name": obj.get("name"),
|
|
@@ -121,7 +121,7 @@ class V1TestClass(BaseModel):
|
|
|
121
121
|
"recommendedTests": obj.get("recommendedTests"),
|
|
122
122
|
"testClassType": obj.get("testClassType"),
|
|
123
123
|
"tags": obj.get("tags")
|
|
124
|
-
})
|
|
124
|
+
}, strict=False)
|
|
125
125
|
return _obj
|
|
126
126
|
|
|
127
127
|
|
|
@@ -115,7 +115,7 @@ class V1TestLab(BaseModel):
|
|
|
115
115
|
return None
|
|
116
116
|
|
|
117
117
|
if not isinstance(obj, dict):
|
|
118
|
-
return cls.model_validate(obj)
|
|
118
|
+
return cls.model_validate(obj, strict=False)
|
|
119
119
|
|
|
120
120
|
_obj = cls.model_validate({
|
|
121
121
|
"name": obj.get("name"),
|
|
@@ -131,7 +131,7 @@ class V1TestLab(BaseModel):
|
|
|
131
131
|
"llmModels": obj.get("llmModels"),
|
|
132
132
|
"modelParameters": obj.get("modelParameters"),
|
|
133
133
|
"h2ogpteCollection": obj.get("h2ogpteCollection")
|
|
134
|
-
})
|
|
134
|
+
}, strict=False)
|
|
135
135
|
return _obj
|
|
136
136
|
|
|
137
137
|
|
|
@@ -81,11 +81,11 @@ class V1UpdateDashboardResponse(BaseModel):
|
|
|
81
81
|
return None
|
|
82
82
|
|
|
83
83
|
if not isinstance(obj, dict):
|
|
84
|
-
return cls.model_validate(obj)
|
|
84
|
+
return cls.model_validate(obj, strict=False)
|
|
85
85
|
|
|
86
86
|
_obj = cls.model_validate({
|
|
87
87
|
"dashboard": V1Dashboard.from_dict(obj["dashboard"]) if obj.get("dashboard") is not None else None
|
|
88
|
-
})
|
|
88
|
+
}, strict=False)
|
|
89
89
|
return _obj
|
|
90
90
|
|
|
91
91
|
|
|
@@ -81,11 +81,11 @@ class V1UpdateDocumentResponse(BaseModel):
|
|
|
81
81
|
return None
|
|
82
82
|
|
|
83
83
|
if not isinstance(obj, dict):
|
|
84
|
-
return cls.model_validate(obj)
|
|
84
|
+
return cls.model_validate(obj, strict=False)
|
|
85
85
|
|
|
86
86
|
_obj = cls.model_validate({
|
|
87
87
|
"document": V1Document.from_dict(obj["document"]) if obj.get("document") is not None else None
|
|
88
|
-
})
|
|
88
|
+
}, strict=False)
|
|
89
89
|
return _obj
|
|
90
90
|
|
|
91
91
|
|
|
@@ -81,11 +81,11 @@ class V1UpdateLeaderboardResponse(BaseModel):
|
|
|
81
81
|
return None
|
|
82
82
|
|
|
83
83
|
if not isinstance(obj, dict):
|
|
84
|
-
return cls.model_validate(obj)
|
|
84
|
+
return cls.model_validate(obj, strict=False)
|
|
85
85
|
|
|
86
86
|
_obj = cls.model_validate({
|
|
87
87
|
"leaderboard": V1Leaderboard.from_dict(obj["leaderboard"]) if obj.get("leaderboard") is not None else None
|
|
88
|
-
})
|
|
88
|
+
}, strict=False)
|
|
89
89
|
return _obj
|
|
90
90
|
|
|
91
91
|
|
|
@@ -81,11 +81,11 @@ class V1UpdateModelResponse(BaseModel):
|
|
|
81
81
|
return None
|
|
82
82
|
|
|
83
83
|
if not isinstance(obj, dict):
|
|
84
|
-
return cls.model_validate(obj)
|
|
84
|
+
return cls.model_validate(obj, strict=False)
|
|
85
85
|
|
|
86
86
|
_obj = cls.model_validate({
|
|
87
87
|
"model": V1Model.from_dict(obj["model"]) if obj.get("model") is not None else None
|
|
88
|
-
})
|
|
88
|
+
}, strict=False)
|
|
89
89
|
return _obj
|
|
90
90
|
|
|
91
91
|
|
|
@@ -81,11 +81,11 @@ class V1UpdateOperationResponse(BaseModel):
|
|
|
81
81
|
return None
|
|
82
82
|
|
|
83
83
|
if not isinstance(obj, dict):
|
|
84
|
-
return cls.model_validate(obj)
|
|
84
|
+
return cls.model_validate(obj, strict=False)
|
|
85
85
|
|
|
86
86
|
_obj = cls.model_validate({
|
|
87
87
|
"operation": V1Operation.from_dict(obj["operation"]) if obj.get("operation") is not None else None
|
|
88
|
-
})
|
|
88
|
+
}, strict=False)
|
|
89
89
|
return _obj
|
|
90
90
|
|
|
91
91
|
|
|
@@ -81,11 +81,11 @@ class V1UpdateTestCaseResponse(BaseModel):
|
|
|
81
81
|
return None
|
|
82
82
|
|
|
83
83
|
if not isinstance(obj, dict):
|
|
84
|
-
return cls.model_validate(obj)
|
|
84
|
+
return cls.model_validate(obj, strict=False)
|
|
85
85
|
|
|
86
86
|
_obj = cls.model_validate({
|
|
87
87
|
"testCase": V1TestCase.from_dict(obj["testCase"]) if obj.get("testCase") is not None else None
|
|
88
|
-
})
|
|
88
|
+
}, strict=False)
|
|
89
89
|
return _obj
|
|
90
90
|
|
|
91
91
|
|
|
@@ -81,11 +81,11 @@ class V1UpdateTestResponse(BaseModel):
|
|
|
81
81
|
return None
|
|
82
82
|
|
|
83
83
|
if not isinstance(obj, dict):
|
|
84
|
-
return cls.model_validate(obj)
|
|
84
|
+
return cls.model_validate(obj, strict=False)
|
|
85
85
|
|
|
86
86
|
_obj = cls.model_validate({
|
|
87
87
|
"test": V1Test.from_dict(obj["test"]) if obj.get("test") is not None else None
|
|
88
|
-
})
|
|
88
|
+
}, strict=False)
|
|
89
89
|
return _obj
|
|
90
90
|
|
|
91
91
|
|
|
@@ -81,11 +81,11 @@ class V1UpdateWorkflowNodeResponse(BaseModel):
|
|
|
81
81
|
return None
|
|
82
82
|
|
|
83
83
|
if not isinstance(obj, dict):
|
|
84
|
-
return cls.model_validate(obj)
|
|
84
|
+
return cls.model_validate(obj, strict=False)
|
|
85
85
|
|
|
86
86
|
_obj = cls.model_validate({
|
|
87
87
|
"node": V1WorkflowNode.from_dict(obj["node"]) if obj.get("node") is not None else None
|
|
88
|
-
})
|
|
88
|
+
}, strict=False)
|
|
89
89
|
return _obj
|
|
90
90
|
|
|
91
91
|
|
|
@@ -81,11 +81,11 @@ class V1UpdateWorkflowResponse(BaseModel):
|
|
|
81
81
|
return None
|
|
82
82
|
|
|
83
83
|
if not isinstance(obj, dict):
|
|
84
|
-
return cls.model_validate(obj)
|
|
84
|
+
return cls.model_validate(obj, strict=False)
|
|
85
85
|
|
|
86
86
|
_obj = cls.model_validate({
|
|
87
87
|
"workflow": V1Workflow.from_dict(obj["workflow"]) if obj.get("workflow") is not None else None
|
|
88
|
-
})
|
|
88
|
+
}, strict=False)
|
|
89
89
|
return _obj
|
|
90
90
|
|
|
91
91
|
|
|
@@ -79,13 +79,13 @@ class V1WhoAmIResponse(BaseModel):
|
|
|
79
79
|
return None
|
|
80
80
|
|
|
81
81
|
if not isinstance(obj, dict):
|
|
82
|
-
return cls.model_validate(obj)
|
|
82
|
+
return cls.model_validate(obj, strict=False)
|
|
83
83
|
|
|
84
84
|
_obj = cls.model_validate({
|
|
85
85
|
"sub": obj.get("sub"),
|
|
86
86
|
"preferredUsername": obj.get("preferredUsername"),
|
|
87
87
|
"email": obj.get("email")
|
|
88
|
-
})
|
|
88
|
+
}, strict=False)
|
|
89
89
|
return _obj
|
|
90
90
|
|
|
91
91
|
|
|
@@ -117,9 +117,9 @@ class V1Workflow(BaseModel):
|
|
|
117
117
|
# override the default output from pydantic by calling `to_dict()` of each value in output_artifacts (dict)
|
|
118
118
|
_field_dict = {}
|
|
119
119
|
if self.output_artifacts:
|
|
120
|
-
for
|
|
121
|
-
if self.output_artifacts[
|
|
122
|
-
_field_dict[
|
|
120
|
+
for _key_output_artifacts in self.output_artifacts:
|
|
121
|
+
if self.output_artifacts[_key_output_artifacts]:
|
|
122
|
+
_field_dict[_key_output_artifacts] = self.output_artifacts[_key_output_artifacts].to_dict()
|
|
123
123
|
_dict['outputArtifacts'] = _field_dict
|
|
124
124
|
return _dict
|
|
125
125
|
|
|
@@ -130,7 +130,7 @@ class V1Workflow(BaseModel):
|
|
|
130
130
|
return None
|
|
131
131
|
|
|
132
132
|
if not isinstance(obj, dict):
|
|
133
|
-
return cls.model_validate(obj)
|
|
133
|
+
return cls.model_validate(obj, strict=False)
|
|
134
134
|
|
|
135
135
|
_obj = cls.model_validate({
|
|
136
136
|
"name": obj.get("name"),
|
|
@@ -158,7 +158,7 @@ class V1Workflow(BaseModel):
|
|
|
158
158
|
"document": obj.get("document"),
|
|
159
159
|
"h2ogpteCollection": obj.get("h2ogpteCollection"),
|
|
160
160
|
"clonedFromWorkflow": obj.get("clonedFromWorkflow")
|
|
161
|
-
})
|
|
161
|
+
}, strict=False)
|
|
162
162
|
return _obj
|
|
163
163
|
|
|
164
164
|
|
|
@@ -78,12 +78,12 @@ class V1WorkflowDependency(BaseModel):
|
|
|
78
78
|
return None
|
|
79
79
|
|
|
80
80
|
if not isinstance(obj, dict):
|
|
81
|
-
return cls.model_validate(obj)
|
|
81
|
+
return cls.model_validate(obj, strict=False)
|
|
82
82
|
|
|
83
83
|
_obj = cls.model_validate({
|
|
84
84
|
"name": obj.get("name"),
|
|
85
85
|
"optional": obj.get("optional")
|
|
86
|
-
})
|
|
86
|
+
}, strict=False)
|
|
87
87
|
return _obj
|
|
88
88
|
|
|
89
89
|
|
|
@@ -103,7 +103,7 @@ class V1WorkflowEdge(BaseModel):
|
|
|
103
103
|
return None
|
|
104
104
|
|
|
105
105
|
if not isinstance(obj, dict):
|
|
106
|
-
return cls.model_validate(obj)
|
|
106
|
+
return cls.model_validate(obj, strict=False)
|
|
107
107
|
|
|
108
108
|
_obj = cls.model_validate({
|
|
109
109
|
"name": obj.get("name"),
|
|
@@ -117,7 +117,7 @@ class V1WorkflowEdge(BaseModel):
|
|
|
117
117
|
"type": obj.get("type"),
|
|
118
118
|
"from": obj.get("from"),
|
|
119
119
|
"to": obj.get("to")
|
|
120
|
-
})
|
|
120
|
+
}, strict=False)
|
|
121
121
|
return _obj
|
|
122
122
|
|
|
123
123
|
|
|
@@ -119,9 +119,9 @@ class V1WorkflowNode(BaseModel):
|
|
|
119
119
|
# override the default output from pydantic by calling `to_dict()` of each item in output_artifacts (list)
|
|
120
120
|
_items = []
|
|
121
121
|
if self.output_artifacts:
|
|
122
|
-
for
|
|
123
|
-
if
|
|
124
|
-
_items.append(
|
|
122
|
+
for _item_output_artifacts in self.output_artifacts:
|
|
123
|
+
if _item_output_artifacts:
|
|
124
|
+
_items.append(_item_output_artifacts.to_dict())
|
|
125
125
|
_dict['outputArtifacts'] = _items
|
|
126
126
|
# override the default output from pydantic by calling `to_dict()` of attributes
|
|
127
127
|
if self.attributes:
|
|
@@ -135,7 +135,7 @@ class V1WorkflowNode(BaseModel):
|
|
|
135
135
|
return None
|
|
136
136
|
|
|
137
137
|
if not isinstance(obj, dict):
|
|
138
|
-
return cls.model_validate(obj)
|
|
138
|
+
return cls.model_validate(obj, strict=False)
|
|
139
139
|
|
|
140
140
|
_obj = cls.model_validate({
|
|
141
141
|
"name": obj.get("name"),
|
|
@@ -157,7 +157,7 @@ class V1WorkflowNode(BaseModel):
|
|
|
157
157
|
"processedByOperation": obj.get("processedByOperation"),
|
|
158
158
|
"resultStatus": obj.get("resultStatus"),
|
|
159
159
|
"stale": obj.get("stale")
|
|
160
|
-
})
|
|
160
|
+
}, strict=False)
|
|
161
161
|
return _obj
|
|
162
162
|
|
|
163
163
|
|
|
@@ -105,7 +105,7 @@ class V1WorkflowNodeArtifact(BaseModel):
|
|
|
105
105
|
return None
|
|
106
106
|
|
|
107
107
|
if not isinstance(obj, dict):
|
|
108
|
-
return cls.model_validate(obj)
|
|
108
|
+
return cls.model_validate(obj, strict=False)
|
|
109
109
|
|
|
110
110
|
_obj = cls.model_validate({
|
|
111
111
|
"name": obj.get("name"),
|
|
@@ -120,7 +120,7 @@ class V1WorkflowNodeArtifact(BaseModel):
|
|
|
120
120
|
"deleter": obj.get("deleter"),
|
|
121
121
|
"mimeType": obj.get("mimeType"),
|
|
122
122
|
"type": obj.get("type")
|
|
123
|
-
})
|
|
123
|
+
}, strict=False)
|
|
124
124
|
return _obj
|
|
125
125
|
|
|
126
126
|
|
|
@@ -74,9 +74,9 @@ class V1WorkflowNodeArtifacts(BaseModel):
|
|
|
74
74
|
# override the default output from pydantic by calling `to_dict()` of each item in artifacts (list)
|
|
75
75
|
_items = []
|
|
76
76
|
if self.artifacts:
|
|
77
|
-
for
|
|
78
|
-
if
|
|
79
|
-
_items.append(
|
|
77
|
+
for _item_artifacts in self.artifacts:
|
|
78
|
+
if _item_artifacts:
|
|
79
|
+
_items.append(_item_artifacts.to_dict())
|
|
80
80
|
_dict['artifacts'] = _items
|
|
81
81
|
return _dict
|
|
82
82
|
|
|
@@ -87,11 +87,11 @@ class V1WorkflowNodeArtifacts(BaseModel):
|
|
|
87
87
|
return None
|
|
88
88
|
|
|
89
89
|
if not isinstance(obj, dict):
|
|
90
|
-
return cls.model_validate(obj)
|
|
90
|
+
return cls.model_validate(obj, strict=False)
|
|
91
91
|
|
|
92
92
|
_obj = cls.model_validate({
|
|
93
93
|
"artifacts": [V1WorkflowNodeArtifact.from_dict(_item) for _item in obj["artifacts"]] if obj.get("artifacts") is not None else None
|
|
94
|
-
})
|
|
94
|
+
}, strict=False)
|
|
95
95
|
return _obj
|
|
96
96
|
|
|
97
97
|
|
|
@@ -77,11 +77,11 @@ class V1WorkflowNodeAttributes(BaseModel):
|
|
|
77
77
|
return None
|
|
78
78
|
|
|
79
79
|
if not isinstance(obj, dict):
|
|
80
|
-
return cls.model_validate(obj)
|
|
80
|
+
return cls.model_validate(obj, strict=False)
|
|
81
81
|
|
|
82
82
|
_obj = cls.model_validate({
|
|
83
83
|
"canDelete": obj.get("canDelete")
|
|
84
|
-
})
|
|
84
|
+
}, strict=False)
|
|
85
85
|
return _obj
|
|
86
86
|
|
|
87
87
|
|
|
@@ -81,7 +81,7 @@ class WorkflowServiceCloneWorkflowRequest(BaseModel):
|
|
|
81
81
|
return None
|
|
82
82
|
|
|
83
83
|
if not isinstance(obj, dict):
|
|
84
|
-
return cls.model_validate(obj)
|
|
84
|
+
return cls.model_validate(obj, strict=False)
|
|
85
85
|
|
|
86
86
|
_obj = cls.model_validate({
|
|
87
87
|
"displayNameOverride": obj.get("displayNameOverride"),
|
|
@@ -89,7 +89,7 @@ class WorkflowServiceCloneWorkflowRequest(BaseModel):
|
|
|
89
89
|
"modelOverride": obj.get("modelOverride"),
|
|
90
90
|
"llmModelOverride": obj.get("llmModelOverride"),
|
|
91
91
|
"modelParametersOverride": obj.get("modelParametersOverride")
|
|
92
|
-
})
|
|
92
|
+
}, strict=False)
|
|
93
93
|
return _obj
|
|
94
94
|
|
|
95
95
|
|
|
@@ -79,12 +79,12 @@ class WorkflowServiceRevokeWorkflowAccessRequest(BaseModel):
|
|
|
79
79
|
return None
|
|
80
80
|
|
|
81
81
|
if not isinstance(obj, dict):
|
|
82
|
-
return cls.model_validate(obj)
|
|
82
|
+
return cls.model_validate(obj, strict=False)
|
|
83
83
|
|
|
84
84
|
_obj = cls.model_validate({
|
|
85
85
|
"subject": obj.get("subject"),
|
|
86
86
|
"role": obj.get("role")
|
|
87
|
-
})
|
|
87
|
+
}, strict=False)
|
|
88
88
|
return _obj
|
|
89
89
|
|
|
90
90
|
|
|
@@ -36,6 +36,7 @@ class Leaderboard:
|
|
|
36
36
|
insights: List[i6s.Insight] = dataclasses.field(default_factory=list)
|
|
37
37
|
summary: Optional[str] = None
|
|
38
38
|
existing_collection: Optional[str] = None
|
|
39
|
+
_model_parameters: Optional[str] = None
|
|
39
40
|
_report: Optional[str] = None
|
|
40
41
|
_leaderboard: Optional[str] = None
|
|
41
42
|
_model_name: Optional[str] = None
|
|
@@ -83,6 +84,20 @@ class Leaderboard:
|
|
|
83
84
|
|
|
84
85
|
return []
|
|
85
86
|
|
|
87
|
+
@property
|
|
88
|
+
def model_parameters(self) -> dict:
|
|
89
|
+
"""Retrieves the model parameters (overrides) used in this leaderboard."""
|
|
90
|
+
if self._model_parameters:
|
|
91
|
+
if isinstance(self._model_parameters, str):
|
|
92
|
+
try:
|
|
93
|
+
return json.loads(self._model_parameters)
|
|
94
|
+
except json.JSONDecodeError:
|
|
95
|
+
print("Failed to parse model parameters")
|
|
96
|
+
return {}
|
|
97
|
+
elif isinstance(self._model_parameters, dict):
|
|
98
|
+
return self._model_parameters
|
|
99
|
+
return {}
|
|
100
|
+
|
|
86
101
|
def delete(self):
|
|
87
102
|
"""Deletes the leaderboard."""
|
|
88
103
|
if self._client:
|
|
@@ -226,6 +241,7 @@ class Leaderboard:
|
|
|
226
241
|
tests=self._test_names,
|
|
227
242
|
model=self._model_name,
|
|
228
243
|
h2ogpte_collection=self.existing_collection or None,
|
|
244
|
+
model_parameters=self._model_parameters,
|
|
229
245
|
)
|
|
230
246
|
|
|
231
247
|
def _update_result(self, api_leaderboard: models.V1Leaderboard):
|
|
@@ -264,6 +280,7 @@ class Leaderboard:
|
|
|
264
280
|
_status=api_leaderboard.status,
|
|
265
281
|
_client=client,
|
|
266
282
|
_operation=api_leaderboard.create_operation or None,
|
|
283
|
+
_model_parameters=api_leaderboard.model_parameters,
|
|
267
284
|
)
|
|
268
285
|
|
|
269
286
|
@staticmethod
|