eval-studio-client 0.7.0__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/__about__.py +1 -0
- eval_studio_client/__init__.py +4 -0
- eval_studio_client/api/__init__.py +180 -0
- eval_studio_client/api/api/__init__.py +20 -0
- eval_studio_client/api/api/dashboard_service_api.py +2142 -0
- eval_studio_client/api/api/document_service_api.py +1868 -0
- eval_studio_client/api/api/evaluation_service_api.py +1603 -0
- eval_studio_client/api/api/evaluator_service_api.py +1343 -0
- eval_studio_client/api/api/info_service_api.py +275 -0
- eval_studio_client/api/api/leaderboard_service_api.py +3336 -0
- eval_studio_client/api/api/model_service_api.py +2913 -0
- eval_studio_client/api/api/operation_progress_service_api.py +292 -0
- eval_studio_client/api/api/operation_service_api.py +1359 -0
- eval_studio_client/api/api/perturbation_service_api.py +321 -0
- eval_studio_client/api/api/perturbator_service_api.py +532 -0
- eval_studio_client/api/api/test_case_service_api.py +1913 -0
- eval_studio_client/api/api/test_class_service_api.py +532 -0
- eval_studio_client/api/api/test_lab_service_api.py +634 -0
- eval_studio_client/api/api/test_service_api.py +2712 -0
- eval_studio_client/api/api/who_am_i_service_api.py +275 -0
- eval_studio_client/api/api_client.py +770 -0
- eval_studio_client/api/api_response.py +21 -0
- eval_studio_client/api/configuration.py +436 -0
- eval_studio_client/api/docs/DashboardServiceApi.md +549 -0
- eval_studio_client/api/docs/DocumentServiceApi.md +478 -0
- eval_studio_client/api/docs/EvaluationServiceApi.md +332 -0
- eval_studio_client/api/docs/EvaluatorServiceApi.md +345 -0
- eval_studio_client/api/docs/InfoServiceApi.md +71 -0
- eval_studio_client/api/docs/LeaderboardServiceApi.md +835 -0
- eval_studio_client/api/docs/ModelServiceApi.md +750 -0
- eval_studio_client/api/docs/OperationProgressServiceApi.md +75 -0
- eval_studio_client/api/docs/OperationServiceApi.md +345 -0
- eval_studio_client/api/docs/PerturbationServiceApi.md +78 -0
- eval_studio_client/api/docs/PerturbationServiceCreatePerturbationRequest.md +31 -0
- eval_studio_client/api/docs/PerturbatorServiceApi.md +138 -0
- eval_studio_client/api/docs/ProtobufAny.md +30 -0
- eval_studio_client/api/docs/RequiredTheDashboardToUpdate.md +41 -0
- eval_studio_client/api/docs/RequiredTheDocumentToUpdate.md +38 -0
- eval_studio_client/api/docs/RequiredTheLeaderboardToUpdate.md +54 -0
- eval_studio_client/api/docs/RequiredTheModelToUpdate.md +41 -0
- eval_studio_client/api/docs/RequiredTheOperationToFinalize.md +39 -0
- eval_studio_client/api/docs/RequiredTheOperationToUpdate.md +39 -0
- eval_studio_client/api/docs/RequiredTheTestCaseToUpdate.md +39 -0
- eval_studio_client/api/docs/RequiredTheTestToUpdate.md +39 -0
- eval_studio_client/api/docs/RpcStatus.md +32 -0
- eval_studio_client/api/docs/TestCaseServiceApi.md +486 -0
- eval_studio_client/api/docs/TestCaseServiceBatchDeleteTestCasesRequest.md +29 -0
- eval_studio_client/api/docs/TestClassServiceApi.md +138 -0
- eval_studio_client/api/docs/TestLabServiceApi.md +151 -0
- eval_studio_client/api/docs/TestServiceApi.md +689 -0
- eval_studio_client/api/docs/TestServicePerturbTestRequest.md +31 -0
- eval_studio_client/api/docs/V1alphaBatchCreateLeaderboardsRequest.md +31 -0
- eval_studio_client/api/docs/V1alphaBatchCreateLeaderboardsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteDashboardsRequest.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteDashboardsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteDocumentsRequest.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteDocumentsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteEvaluatorsRequest.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteEvaluatorsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteLeaderboardsRequest.md +30 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteLeaderboardsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteModelsRequest.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteModelsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteTestCasesResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteTestsRequest.md +30 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteTestsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchGetDashboardsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchGetDocumentsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchGetLeaderboardsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchGetModelsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchGetOperationsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchGetTestsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchImportLeaderboardRequest.md +37 -0
- eval_studio_client/api/docs/V1alphaBatchImportLeaderboardResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchImportTestsRequest.md +32 -0
- eval_studio_client/api/docs/V1alphaBatchImportTestsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaCheckBaseModelsResponse.md +30 -0
- eval_studio_client/api/docs/V1alphaCollectionInfo.md +33 -0
- eval_studio_client/api/docs/V1alphaCreateDashboardResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaCreateDocumentResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaCreateEvaluationRequest.md +37 -0
- eval_studio_client/api/docs/V1alphaCreateEvaluatorResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaCreateLeaderboardRequest.md +29 -0
- eval_studio_client/api/docs/V1alphaCreateLeaderboardResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaCreateLeaderboardWithoutCacheResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaCreateModelResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaCreatePerturbationResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaCreateTestCaseResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaCreateTestLabResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaCreateTestResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaDashboard.md +41 -0
- eval_studio_client/api/docs/V1alphaDashboardStatus.md +12 -0
- eval_studio_client/api/docs/V1alphaDeleteDashboardResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaDeleteDocumentResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaDeleteEvaluatorResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaDeleteLeaderboardResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaDeleteModelResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaDeleteTestCaseResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaDeleteTestResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaDocument.md +38 -0
- eval_studio_client/api/docs/V1alphaEvaluationTest.md +32 -0
- eval_studio_client/api/docs/V1alphaEvaluator.md +45 -0
- eval_studio_client/api/docs/V1alphaEvaluatorParamType.md +12 -0
- eval_studio_client/api/docs/V1alphaEvaluatorParameter.md +40 -0
- eval_studio_client/api/docs/V1alphaEvaluatorView.md +12 -0
- eval_studio_client/api/docs/V1alphaFinalizeOperationResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaFindAllTestCasesByIDResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaFindTestLabResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetDashboardResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetDocumentResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetEvaluatorResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetInfoResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetLeaderboardResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetModelResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetOperationProgressByParentResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetOperationResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetPerturbatorResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetTestCaseResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetTestClassResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetTestResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaImportEvaluationRequest.md +33 -0
- eval_studio_client/api/docs/V1alphaImportLeaderboardRequest.md +37 -0
- eval_studio_client/api/docs/V1alphaImportLeaderboardResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaInfo.md +35 -0
- eval_studio_client/api/docs/V1alphaInsight.md +40 -0
- eval_studio_client/api/docs/V1alphaLeaderboard.md +54 -0
- eval_studio_client/api/docs/V1alphaLeaderboardStatus.md +12 -0
- eval_studio_client/api/docs/V1alphaLeaderboardType.md +12 -0
- eval_studio_client/api/docs/V1alphaLeaderboardView.md +12 -0
- eval_studio_client/api/docs/V1alphaListBaseModelsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListDashboardsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListDocumentsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListEvaluatorsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListLLMModelsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListLeaderboardsResponse.md +30 -0
- eval_studio_client/api/docs/V1alphaListModelCollectionsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListModelsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListMostRecentDashboardsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListMostRecentLeaderboardsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListMostRecentModelsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListMostRecentTestsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListOperationsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListPerturbatorsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListRAGCollectionsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListTestCasesResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListTestClassesResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListTestsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaModel.md +42 -0
- eval_studio_client/api/docs/V1alphaModelType.md +12 -0
- eval_studio_client/api/docs/V1alphaOperation.md +40 -0
- eval_studio_client/api/docs/V1alphaOperationProgress.md +32 -0
- eval_studio_client/api/docs/V1alphaPerturbTestResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaPerturbator.md +39 -0
- eval_studio_client/api/docs/V1alphaPerturbatorConfiguration.md +32 -0
- eval_studio_client/api/docs/V1alphaPerturbatorIntensity.md +11 -0
- eval_studio_client/api/docs/V1alphaProblemAndAction.md +39 -0
- eval_studio_client/api/docs/V1alphaTest.md +40 -0
- eval_studio_client/api/docs/V1alphaTestCase.md +40 -0
- eval_studio_client/api/docs/V1alphaTestCaseRelationship.md +31 -0
- eval_studio_client/api/docs/V1alphaTestClass.md +41 -0
- eval_studio_client/api/docs/V1alphaTestClassType.md +12 -0
- eval_studio_client/api/docs/V1alphaTestLab.md +41 -0
- eval_studio_client/api/docs/V1alphaUpdateDashboardResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaUpdateDocumentResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaUpdateLeaderboardResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaUpdateModelResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaUpdateOperationResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaUpdateTestCaseResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaUpdateTestResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaWhoAmIResponse.md +31 -0
- eval_studio_client/api/docs/WhoAmIServiceApi.md +72 -0
- eval_studio_client/api/exceptions.py +199 -0
- eval_studio_client/api/models/__init__.py +148 -0
- eval_studio_client/api/models/perturbation_service_create_perturbation_request.py +115 -0
- eval_studio_client/api/models/protobuf_any.py +100 -0
- eval_studio_client/api/models/required_the_dashboard_to_update.py +127 -0
- eval_studio_client/api/models/required_the_document_to_update.py +116 -0
- eval_studio_client/api/models/required_the_leaderboard_to_update.py +178 -0
- eval_studio_client/api/models/required_the_model_to_update.py +127 -0
- eval_studio_client/api/models/required_the_operation_to_finalize.py +129 -0
- eval_studio_client/api/models/required_the_operation_to_update.py +129 -0
- eval_studio_client/api/models/required_the_test_case_to_update.py +120 -0
- eval_studio_client/api/models/required_the_test_to_update.py +122 -0
- eval_studio_client/api/models/rpc_status.py +99 -0
- eval_studio_client/api/models/test_case_service_batch_delete_test_cases_request.py +87 -0
- eval_studio_client/api/models/test_service_perturb_test_request.py +99 -0
- eval_studio_client/api/models/v1alpha_batch_create_leaderboards_request.py +99 -0
- eval_studio_client/api/models/v1alpha_batch_create_leaderboards_response.py +91 -0
- eval_studio_client/api/models/v1alpha_batch_delete_dashboards_request.py +87 -0
- eval_studio_client/api/models/v1alpha_batch_delete_dashboards_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_delete_documents_request.py +87 -0
- eval_studio_client/api/models/v1alpha_batch_delete_documents_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_delete_evaluators_request.py +87 -0
- eval_studio_client/api/models/v1alpha_batch_delete_evaluators_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_delete_leaderboards_request.py +90 -0
- eval_studio_client/api/models/v1alpha_batch_delete_leaderboards_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_delete_models_request.py +87 -0
- eval_studio_client/api/models/v1alpha_batch_delete_models_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_delete_test_cases_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_delete_tests_request.py +89 -0
- eval_studio_client/api/models/v1alpha_batch_delete_tests_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_get_dashboards_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_get_documents_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_get_leaderboards_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_get_models_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_get_operations_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_get_tests_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_import_leaderboard_request.py +104 -0
- eval_studio_client/api/models/v1alpha_batch_import_leaderboard_response.py +91 -0
- eval_studio_client/api/models/v1alpha_batch_import_tests_request.py +93 -0
- eval_studio_client/api/models/v1alpha_batch_import_tests_response.py +95 -0
- eval_studio_client/api/models/v1alpha_check_base_models_response.py +89 -0
- eval_studio_client/api/models/v1alpha_collection_info.py +93 -0
- eval_studio_client/api/models/v1alpha_create_dashboard_response.py +91 -0
- eval_studio_client/api/models/v1alpha_create_document_response.py +91 -0
- eval_studio_client/api/models/v1alpha_create_evaluation_request.py +115 -0
- eval_studio_client/api/models/v1alpha_create_evaluator_response.py +91 -0
- eval_studio_client/api/models/v1alpha_create_leaderboard_request.py +91 -0
- eval_studio_client/api/models/v1alpha_create_leaderboard_response.py +91 -0
- eval_studio_client/api/models/v1alpha_create_leaderboard_without_cache_response.py +91 -0
- eval_studio_client/api/models/v1alpha_create_model_response.py +91 -0
- eval_studio_client/api/models/v1alpha_create_perturbation_response.py +87 -0
- eval_studio_client/api/models/v1alpha_create_test_case_response.py +91 -0
- eval_studio_client/api/models/v1alpha_create_test_lab_response.py +91 -0
- eval_studio_client/api/models/v1alpha_create_test_response.py +91 -0
- eval_studio_client/api/models/v1alpha_dashboard.py +131 -0
- eval_studio_client/api/models/v1alpha_dashboard_status.py +39 -0
- eval_studio_client/api/models/v1alpha_delete_dashboard_response.py +91 -0
- eval_studio_client/api/models/v1alpha_delete_document_response.py +91 -0
- eval_studio_client/api/models/v1alpha_delete_evaluator_response.py +91 -0
- eval_studio_client/api/models/v1alpha_delete_leaderboard_response.py +91 -0
- eval_studio_client/api/models/v1alpha_delete_model_response.py +91 -0
- eval_studio_client/api/models/v1alpha_delete_test_case_response.py +91 -0
- eval_studio_client/api/models/v1alpha_delete_test_response.py +91 -0
- eval_studio_client/api/models/v1alpha_document.py +120 -0
- eval_studio_client/api/models/v1alpha_evaluation_test.py +107 -0
- eval_studio_client/api/models/v1alpha_evaluator.py +155 -0
- eval_studio_client/api/models/v1alpha_evaluator_param_type.py +42 -0
- eval_studio_client/api/models/v1alpha_evaluator_parameter.py +126 -0
- eval_studio_client/api/models/v1alpha_evaluator_view.py +38 -0
- eval_studio_client/api/models/v1alpha_finalize_operation_response.py +91 -0
- eval_studio_client/api/models/v1alpha_find_all_test_cases_by_id_response.py +95 -0
- eval_studio_client/api/models/v1alpha_find_test_lab_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_dashboard_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_document_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_evaluator_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_info_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_leaderboard_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_model_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_operation_progress_by_parent_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_operation_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_perturbator_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_test_case_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_test_class_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_test_response.py +91 -0
- eval_studio_client/api/models/v1alpha_import_evaluation_request.py +99 -0
- eval_studio_client/api/models/v1alpha_import_leaderboard_request.py +104 -0
- eval_studio_client/api/models/v1alpha_import_leaderboard_response.py +91 -0
- eval_studio_client/api/models/v1alpha_info.py +99 -0
- eval_studio_client/api/models/v1alpha_insight.py +107 -0
- eval_studio_client/api/models/v1alpha_leaderboard.py +182 -0
- eval_studio_client/api/models/v1alpha_leaderboard_status.py +39 -0
- eval_studio_client/api/models/v1alpha_leaderboard_type.py +39 -0
- eval_studio_client/api/models/v1alpha_leaderboard_view.py +39 -0
- eval_studio_client/api/models/v1alpha_list_base_models_response.py +87 -0
- eval_studio_client/api/models/v1alpha_list_dashboards_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_documents_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_evaluators_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_leaderboards_response.py +97 -0
- eval_studio_client/api/models/v1alpha_list_llm_models_response.py +87 -0
- eval_studio_client/api/models/v1alpha_list_model_collections_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_models_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_most_recent_dashboards_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_most_recent_leaderboards_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_most_recent_models_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_most_recent_tests_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_operations_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_perturbators_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_rag_collections_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_test_cases_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_test_classes_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_tests_response.py +95 -0
- eval_studio_client/api/models/v1alpha_model.py +131 -0
- eval_studio_client/api/models/v1alpha_model_type.py +46 -0
- eval_studio_client/api/models/v1alpha_operation.py +133 -0
- eval_studio_client/api/models/v1alpha_operation_progress.py +99 -0
- eval_studio_client/api/models/v1alpha_perturb_test_response.py +91 -0
- eval_studio_client/api/models/v1alpha_perturbator.py +122 -0
- eval_studio_client/api/models/v1alpha_perturbator_configuration.py +92 -0
- eval_studio_client/api/models/v1alpha_perturbator_intensity.py +39 -0
- eval_studio_client/api/models/v1alpha_problem_and_action.py +129 -0
- eval_studio_client/api/models/v1alpha_test.py +126 -0
- eval_studio_client/api/models/v1alpha_test_case.py +124 -0
- eval_studio_client/api/models/v1alpha_test_case_relationship.py +91 -0
- eval_studio_client/api/models/v1alpha_test_class.py +127 -0
- eval_studio_client/api/models/v1alpha_test_class_type.py +42 -0
- eval_studio_client/api/models/v1alpha_test_lab.py +137 -0
- eval_studio_client/api/models/v1alpha_update_dashboard_response.py +91 -0
- eval_studio_client/api/models/v1alpha_update_document_response.py +91 -0
- eval_studio_client/api/models/v1alpha_update_leaderboard_response.py +91 -0
- eval_studio_client/api/models/v1alpha_update_model_response.py +91 -0
- eval_studio_client/api/models/v1alpha_update_operation_response.py +91 -0
- eval_studio_client/api/models/v1alpha_update_test_case_response.py +91 -0
- eval_studio_client/api/models/v1alpha_update_test_response.py +91 -0
- eval_studio_client/api/models/v1alpha_who_am_i_response.py +91 -0
- eval_studio_client/api/rest.py +257 -0
- eval_studio_client/api/test/__init__.py +0 -0
- eval_studio_client/api/test/test_dashboard_service_api.py +79 -0
- eval_studio_client/api/test/test_document_service_api.py +73 -0
- eval_studio_client/api/test/test_evaluation_service_api.py +55 -0
- eval_studio_client/api/test/test_evaluator_service_api.py +61 -0
- eval_studio_client/api/test/test_info_service_api.py +37 -0
- eval_studio_client/api/test/test_leaderboard_service_api.py +103 -0
- eval_studio_client/api/test/test_model_service_api.py +97 -0
- eval_studio_client/api/test/test_operation_progress_service_api.py +37 -0
- eval_studio_client/api/test/test_operation_service_api.py +61 -0
- eval_studio_client/api/test/test_perturbation_service_api.py +37 -0
- eval_studio_client/api/test/test_perturbation_service_create_perturbation_request.py +79 -0
- eval_studio_client/api/test/test_perturbator_service_api.py +43 -0
- eval_studio_client/api/test/test_protobuf_any.py +51 -0
- eval_studio_client/api/test/test_required_the_dashboard_to_update.py +64 -0
- eval_studio_client/api/test/test_required_the_document_to_update.py +59 -0
- eval_studio_client/api/test/test_required_the_leaderboard_to_update.py +115 -0
- eval_studio_client/api/test/test_required_the_model_to_update.py +63 -0
- eval_studio_client/api/test/test_required_the_operation_to_finalize.py +71 -0
- eval_studio_client/api/test/test_required_the_operation_to_update.py +71 -0
- eval_studio_client/api/test/test_required_the_test_case_to_update.py +63 -0
- eval_studio_client/api/test/test_required_the_test_to_update.py +65 -0
- eval_studio_client/api/test/test_rpc_status.py +57 -0
- eval_studio_client/api/test/test_test_case_service_api.py +73 -0
- eval_studio_client/api/test/test_test_case_service_batch_delete_test_cases_request.py +53 -0
- eval_studio_client/api/test/test_test_class_service_api.py +43 -0
- eval_studio_client/api/test/test_test_lab_service_api.py +43 -0
- eval_studio_client/api/test/test_test_service_api.py +91 -0
- eval_studio_client/api/test/test_test_service_perturb_test_request.py +58 -0
- eval_studio_client/api/test/test_v1alpha_batch_create_leaderboards_request.py +119 -0
- eval_studio_client/api/test/test_v1alpha_batch_create_leaderboards_response.py +71 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_dashboards_request.py +53 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_dashboards_response.py +68 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_documents_request.py +53 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_documents_response.py +63 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_evaluators_request.py +53 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_evaluators_response.py +91 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_leaderboards_request.py +54 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_leaderboards_response.py +116 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_models_request.py +53 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_models_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_test_cases_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_tests_request.py +54 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_tests_response.py +69 -0
- eval_studio_client/api/test/test_v1alpha_batch_get_dashboards_response.py +68 -0
- eval_studio_client/api/test/test_v1alpha_batch_get_documents_response.py +63 -0
- eval_studio_client/api/test/test_v1alpha_batch_get_leaderboards_response.py +116 -0
- eval_studio_client/api/test/test_v1alpha_batch_get_models_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_batch_get_operations_response.py +73 -0
- eval_studio_client/api/test/test_v1alpha_batch_get_tests_response.py +69 -0
- eval_studio_client/api/test/test_v1alpha_batch_import_leaderboard_request.py +61 -0
- eval_studio_client/api/test/test_v1alpha_batch_import_leaderboard_response.py +71 -0
- eval_studio_client/api/test/test_v1alpha_batch_import_tests_request.py +54 -0
- eval_studio_client/api/test/test_v1alpha_batch_import_tests_response.py +69 -0
- eval_studio_client/api/test/test_v1alpha_check_base_models_response.py +52 -0
- eval_studio_client/api/test/test_v1alpha_collection_info.py +54 -0
- eval_studio_client/api/test/test_v1alpha_create_dashboard_response.py +66 -0
- eval_studio_client/api/test/test_v1alpha_create_document_response.py +61 -0
- eval_studio_client/api/test/test_v1alpha_create_evaluation_request.py +107 -0
- eval_studio_client/api/test/test_v1alpha_create_evaluator_response.py +89 -0
- eval_studio_client/api/test/test_v1alpha_create_leaderboard_request.py +114 -0
- eval_studio_client/api/test/test_v1alpha_create_leaderboard_response.py +71 -0
- eval_studio_client/api/test/test_v1alpha_create_leaderboard_without_cache_response.py +71 -0
- eval_studio_client/api/test/test_v1alpha_create_model_response.py +65 -0
- eval_studio_client/api/test/test_v1alpha_create_perturbation_response.py +51 -0
- eval_studio_client/api/test/test_v1alpha_create_test_case_response.py +65 -0
- eval_studio_client/api/test/test_v1alpha_create_test_lab_response.py +68 -0
- eval_studio_client/api/test/test_v1alpha_create_test_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_dashboard.py +65 -0
- eval_studio_client/api/test/test_v1alpha_dashboard_status.py +33 -0
- eval_studio_client/api/test/test_v1alpha_delete_dashboard_response.py +66 -0
- eval_studio_client/api/test/test_v1alpha_delete_document_response.py +61 -0
- eval_studio_client/api/test/test_v1alpha_delete_evaluator_response.py +89 -0
- eval_studio_client/api/test/test_v1alpha_delete_leaderboard_response.py +114 -0
- eval_studio_client/api/test/test_v1alpha_delete_model_response.py +65 -0
- eval_studio_client/api/test/test_v1alpha_delete_test_case_response.py +65 -0
- eval_studio_client/api/test/test_v1alpha_delete_test_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_document.py +60 -0
- eval_studio_client/api/test/test_v1alpha_evaluation_test.py +76 -0
- eval_studio_client/api/test/test_v1alpha_evaluator.py +91 -0
- eval_studio_client/api/test/test_v1alpha_evaluator_param_type.py +33 -0
- eval_studio_client/api/test/test_v1alpha_evaluator_parameter.py +68 -0
- eval_studio_client/api/test/test_v1alpha_evaluator_view.py +33 -0
- eval_studio_client/api/test/test_v1alpha_finalize_operation_response.py +71 -0
- eval_studio_client/api/test/test_v1alpha_find_all_test_cases_by_id_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_find_test_lab_response.py +68 -0
- eval_studio_client/api/test/test_v1alpha_get_dashboard_response.py +66 -0
- eval_studio_client/api/test/test_v1alpha_get_document_response.py +61 -0
- eval_studio_client/api/test/test_v1alpha_get_evaluator_response.py +89 -0
- eval_studio_client/api/test/test_v1alpha_get_info_response.py +60 -0
- eval_studio_client/api/test/test_v1alpha_get_leaderboard_response.py +114 -0
- eval_studio_client/api/test/test_v1alpha_get_model_response.py +65 -0
- eval_studio_client/api/test/test_v1alpha_get_operation_progress_by_parent_response.py +55 -0
- eval_studio_client/api/test/test_v1alpha_get_operation_response.py +71 -0
- eval_studio_client/api/test/test_v1alpha_get_perturbator_response.py +64 -0
- eval_studio_client/api/test/test_v1alpha_get_test_case_response.py +65 -0
- eval_studio_client/api/test/test_v1alpha_get_test_class_response.py +70 -0
- eval_studio_client/api/test/test_v1alpha_get_test_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_import_evaluation_request.py +73 -0
- eval_studio_client/api/test/test_v1alpha_import_leaderboard_request.py +59 -0
- eval_studio_client/api/test/test_v1alpha_import_leaderboard_response.py +71 -0
- eval_studio_client/api/test/test_v1alpha_info.py +59 -0
- eval_studio_client/api/test/test_v1alpha_insight.py +67 -0
- eval_studio_client/api/test/test_v1alpha_leaderboard.py +116 -0
- eval_studio_client/api/test/test_v1alpha_leaderboard_status.py +33 -0
- eval_studio_client/api/test/test_v1alpha_leaderboard_type.py +33 -0
- eval_studio_client/api/test/test_v1alpha_leaderboard_view.py +33 -0
- eval_studio_client/api/test/test_v1alpha_list_base_models_response.py +53 -0
- eval_studio_client/api/test/test_v1alpha_list_dashboards_response.py +68 -0
- eval_studio_client/api/test/test_v1alpha_list_documents_response.py +63 -0
- eval_studio_client/api/test/test_v1alpha_list_evaluators_response.py +91 -0
- eval_studio_client/api/test/test_v1alpha_list_leaderboards_response.py +117 -0
- eval_studio_client/api/test/test_v1alpha_list_llm_models_response.py +53 -0
- eval_studio_client/api/test/test_v1alpha_list_model_collections_response.py +57 -0
- eval_studio_client/api/test/test_v1alpha_list_models_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_list_most_recent_dashboards_response.py +68 -0
- eval_studio_client/api/test/test_v1alpha_list_most_recent_leaderboards_response.py +116 -0
- eval_studio_client/api/test/test_v1alpha_list_most_recent_models_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_list_most_recent_tests_response.py +69 -0
- eval_studio_client/api/test/test_v1alpha_list_operations_response.py +73 -0
- eval_studio_client/api/test/test_v1alpha_list_perturbators_response.py +66 -0
- eval_studio_client/api/test/test_v1alpha_list_rag_collections_response.py +57 -0
- eval_studio_client/api/test/test_v1alpha_list_test_cases_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_list_test_classes_response.py +72 -0
- eval_studio_client/api/test/test_v1alpha_list_tests_response.py +69 -0
- eval_studio_client/api/test/test_v1alpha_model.py +64 -0
- eval_studio_client/api/test/test_v1alpha_model_type.py +33 -0
- eval_studio_client/api/test/test_v1alpha_operation.py +72 -0
- eval_studio_client/api/test/test_v1alpha_operation_progress.py +54 -0
- eval_studio_client/api/test/test_v1alpha_perturb_test_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_perturbator.py +63 -0
- eval_studio_client/api/test/test_v1alpha_perturbator_configuration.py +53 -0
- eval_studio_client/api/test/test_v1alpha_perturbator_intensity.py +33 -0
- eval_studio_client/api/test/test_v1alpha_problem_and_action.py +65 -0
- eval_studio_client/api/test/test_v1alpha_test.py +66 -0
- eval_studio_client/api/test/test_v1alpha_test_case.py +64 -0
- eval_studio_client/api/test/test_v1alpha_test_case_relationship.py +53 -0
- eval_studio_client/api/test/test_v1alpha_test_class.py +69 -0
- eval_studio_client/api/test/test_v1alpha_test_class_type.py +33 -0
- eval_studio_client/api/test/test_v1alpha_test_lab.py +67 -0
- eval_studio_client/api/test/test_v1alpha_update_dashboard_response.py +66 -0
- eval_studio_client/api/test/test_v1alpha_update_document_response.py +61 -0
- eval_studio_client/api/test/test_v1alpha_update_leaderboard_response.py +114 -0
- eval_studio_client/api/test/test_v1alpha_update_model_response.py +65 -0
- eval_studio_client/api/test/test_v1alpha_update_operation_response.py +71 -0
- eval_studio_client/api/test/test_v1alpha_update_test_case_response.py +65 -0
- eval_studio_client/api/test/test_v1alpha_update_test_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_who_am_i_response.py +53 -0
- eval_studio_client/api/test/test_who_am_i_service_api.py +38 -0
- eval_studio_client/client.py +98 -0
- eval_studio_client/dashboards.py +187 -0
- eval_studio_client/documents.py +95 -0
- eval_studio_client/evaluators.py +65 -0
- eval_studio_client/gen/openapiv2/eval_studio.swagger.json +6043 -0
- eval_studio_client/insights.py +35 -0
- eval_studio_client/leaderboards.py +207 -0
- eval_studio_client/models.py +522 -0
- eval_studio_client/perturbators.py +101 -0
- eval_studio_client/problems.py +50 -0
- eval_studio_client/test_labs.py +319 -0
- eval_studio_client/tests.py +369 -0
- eval_studio_client-0.7.0.dist-info/METADATA +18 -0
- eval_studio_client-0.7.0.dist-info/RECORD +470 -0
- eval_studio_client-0.7.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
ai/h2o/eval_studio/v1alpha/collection.proto
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: version not set
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from typing import Any, Optional
|
|
15
|
+
from typing_extensions import Self
|
|
16
|
+
|
|
17
|
+
class OpenApiException(Exception):
|
|
18
|
+
"""The base exception class for all OpenAPIExceptions"""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class ApiTypeError(OpenApiException, TypeError):
|
|
22
|
+
def __init__(self, msg, path_to_item=None, valid_classes=None,
|
|
23
|
+
key_type=None) -> None:
|
|
24
|
+
""" Raises an exception for TypeErrors
|
|
25
|
+
|
|
26
|
+
Args:
|
|
27
|
+
msg (str): the exception message
|
|
28
|
+
|
|
29
|
+
Keyword Args:
|
|
30
|
+
path_to_item (list): a list of keys an indices to get to the
|
|
31
|
+
current_item
|
|
32
|
+
None if unset
|
|
33
|
+
valid_classes (tuple): the primitive classes that current item
|
|
34
|
+
should be an instance of
|
|
35
|
+
None if unset
|
|
36
|
+
key_type (bool): False if our value is a value in a dict
|
|
37
|
+
True if it is a key in a dict
|
|
38
|
+
False if our item is an item in a list
|
|
39
|
+
None if unset
|
|
40
|
+
"""
|
|
41
|
+
self.path_to_item = path_to_item
|
|
42
|
+
self.valid_classes = valid_classes
|
|
43
|
+
self.key_type = key_type
|
|
44
|
+
full_msg = msg
|
|
45
|
+
if path_to_item:
|
|
46
|
+
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
|
47
|
+
super(ApiTypeError, self).__init__(full_msg)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class ApiValueError(OpenApiException, ValueError):
|
|
51
|
+
def __init__(self, msg, path_to_item=None) -> None:
|
|
52
|
+
"""
|
|
53
|
+
Args:
|
|
54
|
+
msg (str): the exception message
|
|
55
|
+
|
|
56
|
+
Keyword Args:
|
|
57
|
+
path_to_item (list) the path to the exception in the
|
|
58
|
+
received_data dict. None if unset
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
self.path_to_item = path_to_item
|
|
62
|
+
full_msg = msg
|
|
63
|
+
if path_to_item:
|
|
64
|
+
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
|
65
|
+
super(ApiValueError, self).__init__(full_msg)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class ApiAttributeError(OpenApiException, AttributeError):
|
|
69
|
+
def __init__(self, msg, path_to_item=None) -> None:
|
|
70
|
+
"""
|
|
71
|
+
Raised when an attribute reference or assignment fails.
|
|
72
|
+
|
|
73
|
+
Args:
|
|
74
|
+
msg (str): the exception message
|
|
75
|
+
|
|
76
|
+
Keyword Args:
|
|
77
|
+
path_to_item (None/list) the path to the exception in the
|
|
78
|
+
received_data dict
|
|
79
|
+
"""
|
|
80
|
+
self.path_to_item = path_to_item
|
|
81
|
+
full_msg = msg
|
|
82
|
+
if path_to_item:
|
|
83
|
+
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
|
84
|
+
super(ApiAttributeError, self).__init__(full_msg)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class ApiKeyError(OpenApiException, KeyError):
|
|
88
|
+
def __init__(self, msg, path_to_item=None) -> None:
|
|
89
|
+
"""
|
|
90
|
+
Args:
|
|
91
|
+
msg (str): the exception message
|
|
92
|
+
|
|
93
|
+
Keyword Args:
|
|
94
|
+
path_to_item (None/list) the path to the exception in the
|
|
95
|
+
received_data dict
|
|
96
|
+
"""
|
|
97
|
+
self.path_to_item = path_to_item
|
|
98
|
+
full_msg = msg
|
|
99
|
+
if path_to_item:
|
|
100
|
+
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
|
101
|
+
super(ApiKeyError, self).__init__(full_msg)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
class ApiException(OpenApiException):
|
|
105
|
+
|
|
106
|
+
def __init__(
|
|
107
|
+
self,
|
|
108
|
+
status=None,
|
|
109
|
+
reason=None,
|
|
110
|
+
http_resp=None,
|
|
111
|
+
*,
|
|
112
|
+
body: Optional[str] = None,
|
|
113
|
+
data: Optional[Any] = None,
|
|
114
|
+
) -> None:
|
|
115
|
+
self.status = status
|
|
116
|
+
self.reason = reason
|
|
117
|
+
self.body = body
|
|
118
|
+
self.data = data
|
|
119
|
+
self.headers = None
|
|
120
|
+
|
|
121
|
+
if http_resp:
|
|
122
|
+
if self.status is None:
|
|
123
|
+
self.status = http_resp.status
|
|
124
|
+
if self.reason is None:
|
|
125
|
+
self.reason = http_resp.reason
|
|
126
|
+
if self.body is None:
|
|
127
|
+
try:
|
|
128
|
+
self.body = http_resp.data.decode('utf-8')
|
|
129
|
+
except Exception:
|
|
130
|
+
pass
|
|
131
|
+
self.headers = http_resp.getheaders()
|
|
132
|
+
|
|
133
|
+
@classmethod
|
|
134
|
+
def from_response(
|
|
135
|
+
cls,
|
|
136
|
+
*,
|
|
137
|
+
http_resp,
|
|
138
|
+
body: Optional[str],
|
|
139
|
+
data: Optional[Any],
|
|
140
|
+
) -> Self:
|
|
141
|
+
if http_resp.status == 400:
|
|
142
|
+
raise BadRequestException(http_resp=http_resp, body=body, data=data)
|
|
143
|
+
|
|
144
|
+
if http_resp.status == 401:
|
|
145
|
+
raise UnauthorizedException(http_resp=http_resp, body=body, data=data)
|
|
146
|
+
|
|
147
|
+
if http_resp.status == 403:
|
|
148
|
+
raise ForbiddenException(http_resp=http_resp, body=body, data=data)
|
|
149
|
+
|
|
150
|
+
if http_resp.status == 404:
|
|
151
|
+
raise NotFoundException(http_resp=http_resp, body=body, data=data)
|
|
152
|
+
|
|
153
|
+
if 500 <= http_resp.status <= 599:
|
|
154
|
+
raise ServiceException(http_resp=http_resp, body=body, data=data)
|
|
155
|
+
raise ApiException(http_resp=http_resp, body=body, data=data)
|
|
156
|
+
|
|
157
|
+
def __str__(self):
|
|
158
|
+
"""Custom error messages for exception"""
|
|
159
|
+
error_message = "({0})\n"\
|
|
160
|
+
"Reason: {1}\n".format(self.status, self.reason)
|
|
161
|
+
if self.headers:
|
|
162
|
+
error_message += "HTTP response headers: {0}\n".format(
|
|
163
|
+
self.headers)
|
|
164
|
+
|
|
165
|
+
if self.data or self.body:
|
|
166
|
+
error_message += "HTTP response body: {0}\n".format(self.data or self.body)
|
|
167
|
+
|
|
168
|
+
return error_message
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
class BadRequestException(ApiException):
|
|
172
|
+
pass
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
class NotFoundException(ApiException):
|
|
176
|
+
pass
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
class UnauthorizedException(ApiException):
|
|
180
|
+
pass
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
class ForbiddenException(ApiException):
|
|
184
|
+
pass
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
class ServiceException(ApiException):
|
|
188
|
+
pass
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
def render_path(path_to_item):
|
|
192
|
+
"""Returns a string representation of a path"""
|
|
193
|
+
result = ""
|
|
194
|
+
for pth in path_to_item:
|
|
195
|
+
if isinstance(pth, int):
|
|
196
|
+
result += "[{0}]".format(pth)
|
|
197
|
+
else:
|
|
198
|
+
result += "['{0}']".format(pth)
|
|
199
|
+
return result
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# flake8: noqa
|
|
4
|
+
"""
|
|
5
|
+
ai/h2o/eval_studio/v1alpha/collection.proto
|
|
6
|
+
|
|
7
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
8
|
+
|
|
9
|
+
The version of the OpenAPI document: version not set
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# import models into model package
|
|
17
|
+
from eval_studio_client.api.models.perturbation_service_create_perturbation_request import PerturbationServiceCreatePerturbationRequest
|
|
18
|
+
from eval_studio_client.api.models.protobuf_any import ProtobufAny
|
|
19
|
+
from eval_studio_client.api.models.required_the_dashboard_to_update import RequiredTheDashboardToUpdate
|
|
20
|
+
from eval_studio_client.api.models.required_the_document_to_update import RequiredTheDocumentToUpdate
|
|
21
|
+
from eval_studio_client.api.models.required_the_leaderboard_to_update import RequiredTheLeaderboardToUpdate
|
|
22
|
+
from eval_studio_client.api.models.required_the_model_to_update import RequiredTheModelToUpdate
|
|
23
|
+
from eval_studio_client.api.models.required_the_operation_to_finalize import RequiredTheOperationToFinalize
|
|
24
|
+
from eval_studio_client.api.models.required_the_operation_to_update import RequiredTheOperationToUpdate
|
|
25
|
+
from eval_studio_client.api.models.required_the_test_case_to_update import RequiredTheTestCaseToUpdate
|
|
26
|
+
from eval_studio_client.api.models.required_the_test_to_update import RequiredTheTestToUpdate
|
|
27
|
+
from eval_studio_client.api.models.rpc_status import RpcStatus
|
|
28
|
+
from eval_studio_client.api.models.test_case_service_batch_delete_test_cases_request import TestCaseServiceBatchDeleteTestCasesRequest
|
|
29
|
+
from eval_studio_client.api.models.test_service_perturb_test_request import TestServicePerturbTestRequest
|
|
30
|
+
from eval_studio_client.api.models.v1alpha_batch_create_leaderboards_request import V1alphaBatchCreateLeaderboardsRequest
|
|
31
|
+
from eval_studio_client.api.models.v1alpha_batch_create_leaderboards_response import V1alphaBatchCreateLeaderboardsResponse
|
|
32
|
+
from eval_studio_client.api.models.v1alpha_batch_delete_dashboards_request import V1alphaBatchDeleteDashboardsRequest
|
|
33
|
+
from eval_studio_client.api.models.v1alpha_batch_delete_dashboards_response import V1alphaBatchDeleteDashboardsResponse
|
|
34
|
+
from eval_studio_client.api.models.v1alpha_batch_delete_documents_request import V1alphaBatchDeleteDocumentsRequest
|
|
35
|
+
from eval_studio_client.api.models.v1alpha_batch_delete_documents_response import V1alphaBatchDeleteDocumentsResponse
|
|
36
|
+
from eval_studio_client.api.models.v1alpha_batch_delete_evaluators_request import V1alphaBatchDeleteEvaluatorsRequest
|
|
37
|
+
from eval_studio_client.api.models.v1alpha_batch_delete_evaluators_response import V1alphaBatchDeleteEvaluatorsResponse
|
|
38
|
+
from eval_studio_client.api.models.v1alpha_batch_delete_leaderboards_request import V1alphaBatchDeleteLeaderboardsRequest
|
|
39
|
+
from eval_studio_client.api.models.v1alpha_batch_delete_leaderboards_response import V1alphaBatchDeleteLeaderboardsResponse
|
|
40
|
+
from eval_studio_client.api.models.v1alpha_batch_delete_models_request import V1alphaBatchDeleteModelsRequest
|
|
41
|
+
from eval_studio_client.api.models.v1alpha_batch_delete_models_response import V1alphaBatchDeleteModelsResponse
|
|
42
|
+
from eval_studio_client.api.models.v1alpha_batch_delete_test_cases_response import V1alphaBatchDeleteTestCasesResponse
|
|
43
|
+
from eval_studio_client.api.models.v1alpha_batch_delete_tests_request import V1alphaBatchDeleteTestsRequest
|
|
44
|
+
from eval_studio_client.api.models.v1alpha_batch_delete_tests_response import V1alphaBatchDeleteTestsResponse
|
|
45
|
+
from eval_studio_client.api.models.v1alpha_batch_get_dashboards_response import V1alphaBatchGetDashboardsResponse
|
|
46
|
+
from eval_studio_client.api.models.v1alpha_batch_get_documents_response import V1alphaBatchGetDocumentsResponse
|
|
47
|
+
from eval_studio_client.api.models.v1alpha_batch_get_leaderboards_response import V1alphaBatchGetLeaderboardsResponse
|
|
48
|
+
from eval_studio_client.api.models.v1alpha_batch_get_models_response import V1alphaBatchGetModelsResponse
|
|
49
|
+
from eval_studio_client.api.models.v1alpha_batch_get_operations_response import V1alphaBatchGetOperationsResponse
|
|
50
|
+
from eval_studio_client.api.models.v1alpha_batch_get_tests_response import V1alphaBatchGetTestsResponse
|
|
51
|
+
from eval_studio_client.api.models.v1alpha_batch_import_leaderboard_request import V1alphaBatchImportLeaderboardRequest
|
|
52
|
+
from eval_studio_client.api.models.v1alpha_batch_import_leaderboard_response import V1alphaBatchImportLeaderboardResponse
|
|
53
|
+
from eval_studio_client.api.models.v1alpha_batch_import_tests_request import V1alphaBatchImportTestsRequest
|
|
54
|
+
from eval_studio_client.api.models.v1alpha_batch_import_tests_response import V1alphaBatchImportTestsResponse
|
|
55
|
+
from eval_studio_client.api.models.v1alpha_check_base_models_response import V1alphaCheckBaseModelsResponse
|
|
56
|
+
from eval_studio_client.api.models.v1alpha_collection_info import V1alphaCollectionInfo
|
|
57
|
+
from eval_studio_client.api.models.v1alpha_create_dashboard_response import V1alphaCreateDashboardResponse
|
|
58
|
+
from eval_studio_client.api.models.v1alpha_create_document_response import V1alphaCreateDocumentResponse
|
|
59
|
+
from eval_studio_client.api.models.v1alpha_create_evaluation_request import V1alphaCreateEvaluationRequest
|
|
60
|
+
from eval_studio_client.api.models.v1alpha_create_evaluator_response import V1alphaCreateEvaluatorResponse
|
|
61
|
+
from eval_studio_client.api.models.v1alpha_create_leaderboard_request import V1alphaCreateLeaderboardRequest
|
|
62
|
+
from eval_studio_client.api.models.v1alpha_create_leaderboard_response import V1alphaCreateLeaderboardResponse
|
|
63
|
+
from eval_studio_client.api.models.v1alpha_create_leaderboard_without_cache_response import V1alphaCreateLeaderboardWithoutCacheResponse
|
|
64
|
+
from eval_studio_client.api.models.v1alpha_create_model_response import V1alphaCreateModelResponse
|
|
65
|
+
from eval_studio_client.api.models.v1alpha_create_perturbation_response import V1alphaCreatePerturbationResponse
|
|
66
|
+
from eval_studio_client.api.models.v1alpha_create_test_case_response import V1alphaCreateTestCaseResponse
|
|
67
|
+
from eval_studio_client.api.models.v1alpha_create_test_lab_response import V1alphaCreateTestLabResponse
|
|
68
|
+
from eval_studio_client.api.models.v1alpha_create_test_response import V1alphaCreateTestResponse
|
|
69
|
+
from eval_studio_client.api.models.v1alpha_dashboard import V1alphaDashboard
|
|
70
|
+
from eval_studio_client.api.models.v1alpha_dashboard_status import V1alphaDashboardStatus
|
|
71
|
+
from eval_studio_client.api.models.v1alpha_delete_dashboard_response import V1alphaDeleteDashboardResponse
|
|
72
|
+
from eval_studio_client.api.models.v1alpha_delete_document_response import V1alphaDeleteDocumentResponse
|
|
73
|
+
from eval_studio_client.api.models.v1alpha_delete_evaluator_response import V1alphaDeleteEvaluatorResponse
|
|
74
|
+
from eval_studio_client.api.models.v1alpha_delete_leaderboard_response import V1alphaDeleteLeaderboardResponse
|
|
75
|
+
from eval_studio_client.api.models.v1alpha_delete_model_response import V1alphaDeleteModelResponse
|
|
76
|
+
from eval_studio_client.api.models.v1alpha_delete_test_case_response import V1alphaDeleteTestCaseResponse
|
|
77
|
+
from eval_studio_client.api.models.v1alpha_delete_test_response import V1alphaDeleteTestResponse
|
|
78
|
+
from eval_studio_client.api.models.v1alpha_document import V1alphaDocument
|
|
79
|
+
from eval_studio_client.api.models.v1alpha_evaluation_test import V1alphaEvaluationTest
|
|
80
|
+
from eval_studio_client.api.models.v1alpha_evaluator import V1alphaEvaluator
|
|
81
|
+
from eval_studio_client.api.models.v1alpha_evaluator_param_type import V1alphaEvaluatorParamType
|
|
82
|
+
from eval_studio_client.api.models.v1alpha_evaluator_parameter import V1alphaEvaluatorParameter
|
|
83
|
+
from eval_studio_client.api.models.v1alpha_evaluator_view import V1alphaEvaluatorView
|
|
84
|
+
from eval_studio_client.api.models.v1alpha_finalize_operation_response import V1alphaFinalizeOperationResponse
|
|
85
|
+
from eval_studio_client.api.models.v1alpha_find_all_test_cases_by_id_response import V1alphaFindAllTestCasesByIDResponse
|
|
86
|
+
from eval_studio_client.api.models.v1alpha_find_test_lab_response import V1alphaFindTestLabResponse
|
|
87
|
+
from eval_studio_client.api.models.v1alpha_get_dashboard_response import V1alphaGetDashboardResponse
|
|
88
|
+
from eval_studio_client.api.models.v1alpha_get_document_response import V1alphaGetDocumentResponse
|
|
89
|
+
from eval_studio_client.api.models.v1alpha_get_evaluator_response import V1alphaGetEvaluatorResponse
|
|
90
|
+
from eval_studio_client.api.models.v1alpha_get_info_response import V1alphaGetInfoResponse
|
|
91
|
+
from eval_studio_client.api.models.v1alpha_get_leaderboard_response import V1alphaGetLeaderboardResponse
|
|
92
|
+
from eval_studio_client.api.models.v1alpha_get_model_response import V1alphaGetModelResponse
|
|
93
|
+
from eval_studio_client.api.models.v1alpha_get_operation_progress_by_parent_response import V1alphaGetOperationProgressByParentResponse
|
|
94
|
+
from eval_studio_client.api.models.v1alpha_get_operation_response import V1alphaGetOperationResponse
|
|
95
|
+
from eval_studio_client.api.models.v1alpha_get_perturbator_response import V1alphaGetPerturbatorResponse
|
|
96
|
+
from eval_studio_client.api.models.v1alpha_get_test_case_response import V1alphaGetTestCaseResponse
|
|
97
|
+
from eval_studio_client.api.models.v1alpha_get_test_class_response import V1alphaGetTestClassResponse
|
|
98
|
+
from eval_studio_client.api.models.v1alpha_get_test_response import V1alphaGetTestResponse
|
|
99
|
+
from eval_studio_client.api.models.v1alpha_import_evaluation_request import V1alphaImportEvaluationRequest
|
|
100
|
+
from eval_studio_client.api.models.v1alpha_import_leaderboard_request import V1alphaImportLeaderboardRequest
|
|
101
|
+
from eval_studio_client.api.models.v1alpha_import_leaderboard_response import V1alphaImportLeaderboardResponse
|
|
102
|
+
from eval_studio_client.api.models.v1alpha_info import V1alphaInfo
|
|
103
|
+
from eval_studio_client.api.models.v1alpha_insight import V1alphaInsight
|
|
104
|
+
from eval_studio_client.api.models.v1alpha_leaderboard import V1alphaLeaderboard
|
|
105
|
+
from eval_studio_client.api.models.v1alpha_leaderboard_status import V1alphaLeaderboardStatus
|
|
106
|
+
from eval_studio_client.api.models.v1alpha_leaderboard_type import V1alphaLeaderboardType
|
|
107
|
+
from eval_studio_client.api.models.v1alpha_leaderboard_view import V1alphaLeaderboardView
|
|
108
|
+
from eval_studio_client.api.models.v1alpha_list_base_models_response import V1alphaListBaseModelsResponse
|
|
109
|
+
from eval_studio_client.api.models.v1alpha_list_dashboards_response import V1alphaListDashboardsResponse
|
|
110
|
+
from eval_studio_client.api.models.v1alpha_list_documents_response import V1alphaListDocumentsResponse
|
|
111
|
+
from eval_studio_client.api.models.v1alpha_list_evaluators_response import V1alphaListEvaluatorsResponse
|
|
112
|
+
from eval_studio_client.api.models.v1alpha_list_llm_models_response import V1alphaListLLMModelsResponse
|
|
113
|
+
from eval_studio_client.api.models.v1alpha_list_leaderboards_response import V1alphaListLeaderboardsResponse
|
|
114
|
+
from eval_studio_client.api.models.v1alpha_list_model_collections_response import V1alphaListModelCollectionsResponse
|
|
115
|
+
from eval_studio_client.api.models.v1alpha_list_models_response import V1alphaListModelsResponse
|
|
116
|
+
from eval_studio_client.api.models.v1alpha_list_most_recent_dashboards_response import V1alphaListMostRecentDashboardsResponse
|
|
117
|
+
from eval_studio_client.api.models.v1alpha_list_most_recent_leaderboards_response import V1alphaListMostRecentLeaderboardsResponse
|
|
118
|
+
from eval_studio_client.api.models.v1alpha_list_most_recent_models_response import V1alphaListMostRecentModelsResponse
|
|
119
|
+
from eval_studio_client.api.models.v1alpha_list_most_recent_tests_response import V1alphaListMostRecentTestsResponse
|
|
120
|
+
from eval_studio_client.api.models.v1alpha_list_operations_response import V1alphaListOperationsResponse
|
|
121
|
+
from eval_studio_client.api.models.v1alpha_list_perturbators_response import V1alphaListPerturbatorsResponse
|
|
122
|
+
from eval_studio_client.api.models.v1alpha_list_rag_collections_response import V1alphaListRAGCollectionsResponse
|
|
123
|
+
from eval_studio_client.api.models.v1alpha_list_test_cases_response import V1alphaListTestCasesResponse
|
|
124
|
+
from eval_studio_client.api.models.v1alpha_list_test_classes_response import V1alphaListTestClassesResponse
|
|
125
|
+
from eval_studio_client.api.models.v1alpha_list_tests_response import V1alphaListTestsResponse
|
|
126
|
+
from eval_studio_client.api.models.v1alpha_model import V1alphaModel
|
|
127
|
+
from eval_studio_client.api.models.v1alpha_model_type import V1alphaModelType
|
|
128
|
+
from eval_studio_client.api.models.v1alpha_operation import V1alphaOperation
|
|
129
|
+
from eval_studio_client.api.models.v1alpha_operation_progress import V1alphaOperationProgress
|
|
130
|
+
from eval_studio_client.api.models.v1alpha_perturb_test_response import V1alphaPerturbTestResponse
|
|
131
|
+
from eval_studio_client.api.models.v1alpha_perturbator import V1alphaPerturbator
|
|
132
|
+
from eval_studio_client.api.models.v1alpha_perturbator_configuration import V1alphaPerturbatorConfiguration
|
|
133
|
+
from eval_studio_client.api.models.v1alpha_perturbator_intensity import V1alphaPerturbatorIntensity
|
|
134
|
+
from eval_studio_client.api.models.v1alpha_problem_and_action import V1alphaProblemAndAction
|
|
135
|
+
from eval_studio_client.api.models.v1alpha_test import V1alphaTest
|
|
136
|
+
from eval_studio_client.api.models.v1alpha_test_case import V1alphaTestCase
|
|
137
|
+
from eval_studio_client.api.models.v1alpha_test_case_relationship import V1alphaTestCaseRelationship
|
|
138
|
+
from eval_studio_client.api.models.v1alpha_test_class import V1alphaTestClass
|
|
139
|
+
from eval_studio_client.api.models.v1alpha_test_class_type import V1alphaTestClassType
|
|
140
|
+
from eval_studio_client.api.models.v1alpha_test_lab import V1alphaTestLab
|
|
141
|
+
from eval_studio_client.api.models.v1alpha_update_dashboard_response import V1alphaUpdateDashboardResponse
|
|
142
|
+
from eval_studio_client.api.models.v1alpha_update_document_response import V1alphaUpdateDocumentResponse
|
|
143
|
+
from eval_studio_client.api.models.v1alpha_update_leaderboard_response import V1alphaUpdateLeaderboardResponse
|
|
144
|
+
from eval_studio_client.api.models.v1alpha_update_model_response import V1alphaUpdateModelResponse
|
|
145
|
+
from eval_studio_client.api.models.v1alpha_update_operation_response import V1alphaUpdateOperationResponse
|
|
146
|
+
from eval_studio_client.api.models.v1alpha_update_test_case_response import V1alphaUpdateTestCaseResponse
|
|
147
|
+
from eval_studio_client.api.models.v1alpha_update_test_response import V1alphaUpdateTestResponse
|
|
148
|
+
from eval_studio_client.api.models.v1alpha_who_am_i_response import V1alphaWhoAmIResponse
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
ai/h2o/eval_studio/v1alpha/collection.proto
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: version not set
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from eval_studio_client.api.models.v1alpha_perturbator_configuration import V1alphaPerturbatorConfiguration
|
|
23
|
+
from eval_studio_client.api.models.v1alpha_test_case import V1alphaTestCase
|
|
24
|
+
from eval_studio_client.api.models.v1alpha_test_case_relationship import V1alphaTestCaseRelationship
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class PerturbationServiceCreatePerturbationRequest(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
PerturbationServiceCreatePerturbationRequest
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
perturbator_configurations: Optional[List[V1alphaPerturbatorConfiguration]] = Field(default=None, description="Required. PerturbatorConfiguration to apply to the parent Test.", alias="perturbatorConfigurations")
|
|
33
|
+
test_cases: Optional[List[V1alphaTestCase]] = Field(default=None, description="Required. List of test cases to perturbate. These are the test cases from the parent test. TODO: breaks https://google.aip.dev/144", alias="testCases")
|
|
34
|
+
test_case_relationships: Optional[List[V1alphaTestCaseRelationship]] = Field(default=None, description="Optional. List of relationships between test cases.", alias="testCaseRelationships")
|
|
35
|
+
__properties: ClassVar[List[str]] = ["perturbatorConfigurations", "testCases", "testCaseRelationships"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of PerturbationServiceCreatePerturbationRequest from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of each item in perturbator_configurations (list)
|
|
77
|
+
_items = []
|
|
78
|
+
if self.perturbator_configurations:
|
|
79
|
+
for _item in self.perturbator_configurations:
|
|
80
|
+
if _item:
|
|
81
|
+
_items.append(_item.to_dict())
|
|
82
|
+
_dict['perturbatorConfigurations'] = _items
|
|
83
|
+
# override the default output from pydantic by calling `to_dict()` of each item in test_cases (list)
|
|
84
|
+
_items = []
|
|
85
|
+
if self.test_cases:
|
|
86
|
+
for _item in self.test_cases:
|
|
87
|
+
if _item:
|
|
88
|
+
_items.append(_item.to_dict())
|
|
89
|
+
_dict['testCases'] = _items
|
|
90
|
+
# override the default output from pydantic by calling `to_dict()` of each item in test_case_relationships (list)
|
|
91
|
+
_items = []
|
|
92
|
+
if self.test_case_relationships:
|
|
93
|
+
for _item in self.test_case_relationships:
|
|
94
|
+
if _item:
|
|
95
|
+
_items.append(_item.to_dict())
|
|
96
|
+
_dict['testCaseRelationships'] = _items
|
|
97
|
+
return _dict
|
|
98
|
+
|
|
99
|
+
@classmethod
|
|
100
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
101
|
+
"""Create an instance of PerturbationServiceCreatePerturbationRequest from a dict"""
|
|
102
|
+
if obj is None:
|
|
103
|
+
return None
|
|
104
|
+
|
|
105
|
+
if not isinstance(obj, dict):
|
|
106
|
+
return cls.model_validate(obj)
|
|
107
|
+
|
|
108
|
+
_obj = cls.model_validate({
|
|
109
|
+
"perturbatorConfigurations": [V1alphaPerturbatorConfiguration.from_dict(_item) for _item in obj["perturbatorConfigurations"]] if obj.get("perturbatorConfigurations") is not None else None,
|
|
110
|
+
"testCases": [V1alphaTestCase.from_dict(_item) for _item in obj["testCases"]] if obj.get("testCases") is not None else None,
|
|
111
|
+
"testCaseRelationships": [V1alphaTestCaseRelationship.from_dict(_item) for _item in obj["testCaseRelationships"]] if obj.get("testCaseRelationships") is not None else None
|
|
112
|
+
})
|
|
113
|
+
return _obj
|
|
114
|
+
|
|
115
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
ai/h2o/eval_studio/v1alpha/collection.proto
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: version not set
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class ProtobufAny(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
`Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": <string>, \"lastName\": <string> } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
type: Optional[StrictStr] = Field(default=None, description="A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.", alias="@type")
|
|
30
|
+
additional_properties: Dict[str, Any] = {}
|
|
31
|
+
__properties: ClassVar[List[str]] = ["@type"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of ProtobufAny from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
"additional_properties",
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# puts key-value pairs in additional_properties in the top level
|
|
75
|
+
if self.additional_properties is not None:
|
|
76
|
+
for _key, _value in self.additional_properties.items():
|
|
77
|
+
_dict[_key] = _value
|
|
78
|
+
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of ProtobufAny from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"@type": obj.get("@type")
|
|
92
|
+
})
|
|
93
|
+
# store additional fields in additional_properties
|
|
94
|
+
for _key in obj.keys():
|
|
95
|
+
if _key not in cls.__properties:
|
|
96
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
97
|
+
|
|
98
|
+
return _obj
|
|
99
|
+
|
|
100
|
+
|