eval-studio-client 1.0.0a1__py3-none-any.whl → 1.0.1__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/__init__.py +43 -0
- eval_studio_client/api/api/__init__.py +5 -0
- eval_studio_client/api/api/human_calibration_service_api.py +304 -0
- eval_studio_client/api/api/perturbator_service_api.py +268 -1
- eval_studio_client/api/api/prompt_library_service_api.py +669 -0
- eval_studio_client/api/api/test_service_api.py +568 -0
- eval_studio_client/api/api/workflow_edge_service_api.py +296 -0
- eval_studio_client/api/api/workflow_node_service_api.py +1634 -0
- eval_studio_client/api/api/workflow_service_api.py +1609 -0
- eval_studio_client/api/docs/HumanCalibrationServiceApi.md +77 -0
- eval_studio_client/api/docs/PerturbationServiceCreatePerturbationRequest.md +1 -0
- eval_studio_client/api/docs/PerturbatorServiceApi.md +33 -3
- eval_studio_client/api/docs/PromptGenerationServiceAutoGeneratePromptsRequest.md +2 -1
- eval_studio_client/api/docs/PromptLibraryServiceApi.md +155 -0
- eval_studio_client/api/docs/ProtobufNullValue.md +12 -0
- eval_studio_client/api/docs/RequiredTheTestCaseToUpdate.md +1 -0
- eval_studio_client/api/docs/RequiredTheUpdatedWorkflow.md +44 -0
- eval_studio_client/api/docs/RequiredTheUpdatedWorkflowNode.md +44 -0
- eval_studio_client/api/docs/TestServiceApi.md +140 -0
- eval_studio_client/api/docs/TestServiceGenerateTestCasesRequest.md +1 -0
- eval_studio_client/api/docs/TestServiceImportTestCasesFromLibraryRequest.md +32 -0
- eval_studio_client/api/docs/TestServiceListTestCaseLibraryItemsRequest.md +35 -0
- eval_studio_client/api/docs/TestServicePerturbTestRequest.md +1 -0
- eval_studio_client/api/docs/V1BatchDeleteWorkflowsRequest.md +29 -0
- eval_studio_client/api/docs/V1BatchDeleteWorkflowsResponse.md +29 -0
- eval_studio_client/api/docs/V1BatchGetWorkflowEdgesResponse.md +29 -0
- eval_studio_client/api/docs/V1BatchGetWorkflowNodesResponse.md +29 -0
- eval_studio_client/api/docs/V1CreateEvaluationRequest.md +1 -0
- eval_studio_client/api/docs/V1CreateWorkflowResponse.md +29 -0
- eval_studio_client/api/docs/V1DeleteWorkflowNodeResponse.md +29 -0
- eval_studio_client/api/docs/V1DeleteWorkflowResponse.md +29 -0
- eval_studio_client/api/docs/V1EstimateThresholdRequest.md +33 -0
- eval_studio_client/api/docs/V1GetWorkflowNodePrerequisitesResponse.md +30 -0
- eval_studio_client/api/docs/V1GetWorkflowNodeResponse.md +29 -0
- eval_studio_client/api/docs/V1GetWorkflowResponse.md +29 -0
- eval_studio_client/api/docs/V1ImportEvaluationRequest.md +1 -0
- eval_studio_client/api/docs/V1ImportTestCasesFromLibraryResponse.md +29 -0
- eval_studio_client/api/docs/V1ImportTestCasesRequest.md +33 -0
- eval_studio_client/api/docs/V1LabeledTestCase.md +31 -0
- eval_studio_client/api/docs/V1ListPromptLibraryItemsResponse.md +29 -0
- eval_studio_client/api/docs/V1ListTestCaseLibraryItemsResponse.md +29 -0
- eval_studio_client/api/docs/V1ListWorkflowsResponse.md +29 -0
- eval_studio_client/api/docs/V1ProcessWorkflowNodeResponse.md +29 -0
- eval_studio_client/api/docs/V1PromptLibraryItem.md +42 -0
- eval_studio_client/api/docs/V1TestCase.md +1 -0
- eval_studio_client/api/docs/V1TestSuiteEvaluates.md +11 -0
- eval_studio_client/api/docs/V1UpdateWorkflowNodeResponse.md +29 -0
- eval_studio_client/api/docs/V1UpdateWorkflowResponse.md +29 -0
- eval_studio_client/api/docs/V1Workflow.md +46 -0
- eval_studio_client/api/docs/V1WorkflowEdge.md +40 -0
- eval_studio_client/api/docs/V1WorkflowEdgeType.md +12 -0
- eval_studio_client/api/docs/V1WorkflowNode.md +46 -0
- eval_studio_client/api/docs/V1WorkflowNodeArtifact.md +40 -0
- eval_studio_client/api/docs/V1WorkflowNodeArtifacts.md +29 -0
- eval_studio_client/api/docs/V1WorkflowNodeAttributes.md +30 -0
- eval_studio_client/api/docs/V1WorkflowNodeStatus.md +12 -0
- eval_studio_client/api/docs/V1WorkflowNodeType.md +12 -0
- eval_studio_client/api/docs/V1WorkflowNodeView.md +12 -0
- eval_studio_client/api/docs/V1WorkflowType.md +12 -0
- eval_studio_client/api/docs/WorkflowEdgeServiceApi.md +76 -0
- eval_studio_client/api/docs/WorkflowNodeServiceApi.md +423 -0
- eval_studio_client/api/docs/WorkflowServiceApi.md +417 -0
- eval_studio_client/api/models/__init__.py +38 -0
- eval_studio_client/api/models/perturbation_service_create_perturbation_request.py +8 -2
- eval_studio_client/api/models/prompt_generation_service_auto_generate_prompts_request.py +5 -3
- eval_studio_client/api/models/protobuf_null_value.py +36 -0
- eval_studio_client/api/models/required_the_test_case_to_update.py +6 -2
- eval_studio_client/api/models/required_the_updated_workflow.py +152 -0
- eval_studio_client/api/models/required_the_updated_workflow_node.py +152 -0
- eval_studio_client/api/models/test_service_generate_test_cases_request.py +4 -2
- eval_studio_client/api/models/test_service_import_test_cases_from_library_request.py +93 -0
- eval_studio_client/api/models/test_service_list_test_case_library_items_request.py +99 -0
- eval_studio_client/api/models/test_service_perturb_test_request.py +4 -2
- eval_studio_client/api/models/v1_batch_delete_workflows_request.py +87 -0
- eval_studio_client/api/models/v1_batch_delete_workflows_response.py +95 -0
- eval_studio_client/api/models/v1_batch_get_workflow_edges_response.py +95 -0
- eval_studio_client/api/models/v1_batch_get_workflow_nodes_response.py +95 -0
- eval_studio_client/api/models/v1_create_evaluation_request.py +7 -2
- eval_studio_client/api/models/v1_create_workflow_response.py +91 -0
- eval_studio_client/api/models/v1_delete_workflow_node_response.py +91 -0
- eval_studio_client/api/models/v1_delete_workflow_response.py +91 -0
- eval_studio_client/api/models/v1_estimate_threshold_request.py +103 -0
- eval_studio_client/api/models/v1_get_workflow_node_prerequisites_response.py +89 -0
- eval_studio_client/api/models/v1_get_workflow_node_response.py +91 -0
- eval_studio_client/api/models/v1_get_workflow_response.py +91 -0
- eval_studio_client/api/models/v1_import_evaluation_request.py +7 -2
- eval_studio_client/api/models/v1_import_test_cases_from_library_response.py +91 -0
- eval_studio_client/api/models/v1_import_test_cases_request.py +95 -0
- eval_studio_client/api/models/v1_labeled_test_case.py +91 -0
- eval_studio_client/api/models/v1_list_prompt_library_items_response.py +95 -0
- eval_studio_client/api/models/v1_list_test_case_library_items_response.py +95 -0
- eval_studio_client/api/models/v1_list_workflows_response.py +95 -0
- eval_studio_client/api/models/v1_process_workflow_node_response.py +91 -0
- eval_studio_client/api/models/v1_prompt_library_item.py +129 -0
- eval_studio_client/api/models/v1_test_case.py +6 -2
- eval_studio_client/api/models/v1_test_suite_evaluates.py +39 -0
- eval_studio_client/api/models/v1_update_workflow_node_response.py +91 -0
- eval_studio_client/api/models/v1_update_workflow_response.py +91 -0
- eval_studio_client/api/models/v1_workflow.py +156 -0
- eval_studio_client/api/models/v1_workflow_edge.py +123 -0
- eval_studio_client/api/models/v1_workflow_edge_type.py +37 -0
- eval_studio_client/api/models/v1_workflow_node.py +156 -0
- eval_studio_client/api/models/v1_workflow_node_artifact.py +122 -0
- eval_studio_client/api/models/v1_workflow_node_artifacts.py +97 -0
- eval_studio_client/api/models/v1_workflow_node_attributes.py +87 -0
- eval_studio_client/api/models/v1_workflow_node_status.py +40 -0
- eval_studio_client/api/models/v1_workflow_node_type.py +41 -0
- eval_studio_client/api/models/v1_workflow_node_view.py +38 -0
- eval_studio_client/api/models/v1_workflow_type.py +37 -0
- eval_studio_client/api/test/test_human_calibration_service_api.py +38 -0
- eval_studio_client/api/test/test_perturbation_service_create_perturbation_request.py +20 -2
- eval_studio_client/api/test/test_prompt_generation_service_auto_generate_prompts_request.py +4 -1
- eval_studio_client/api/test/test_prompt_library_service_api.py +43 -0
- eval_studio_client/api/test/test_protobuf_null_value.py +33 -0
- eval_studio_client/api/test/test_required_the_test_case_to_update.py +4 -1
- eval_studio_client/api/test/test_required_the_updated_workflow.py +88 -0
- eval_studio_client/api/test/test_required_the_updated_workflow_node.py +80 -0
- eval_studio_client/api/test/test_test_service_api.py +12 -0
- eval_studio_client/api/test/test_test_service_generate_test_cases_request.py +4 -1
- eval_studio_client/api/test/test_test_service_import_test_cases_from_library_request.py +56 -0
- eval_studio_client/api/test/test_test_service_list_test_case_library_items_request.py +63 -0
- eval_studio_client/api/test/test_test_service_perturb_test_request.py +4 -1
- eval_studio_client/api/test/test_v1_batch_delete_test_cases_response.py +4 -1
- eval_studio_client/api/test/test_v1_batch_delete_workflows_request.py +53 -0
- eval_studio_client/api/test/test_v1_batch_delete_workflows_response.py +92 -0
- eval_studio_client/api/test/test_v1_batch_get_workflow_edges_response.py +64 -0
- eval_studio_client/api/test/test_v1_batch_get_workflow_nodes_response.py +84 -0
- eval_studio_client/api/test/test_v1_create_evaluation_request.py +20 -2
- eval_studio_client/api/test/test_v1_create_test_case_response.py +4 -1
- eval_studio_client/api/test/test_v1_create_workflow_response.py +90 -0
- eval_studio_client/api/test/test_v1_delete_test_case_response.py +4 -1
- eval_studio_client/api/test/test_v1_delete_workflow_node_response.py +82 -0
- eval_studio_client/api/test/test_v1_delete_workflow_response.py +90 -0
- eval_studio_client/api/test/test_v1_estimate_threshold_request.py +60 -0
- eval_studio_client/api/test/test_v1_evaluation_test.py +4 -1
- eval_studio_client/api/test/test_v1_find_all_test_cases_by_id_response.py +4 -1
- eval_studio_client/api/test/test_v1_get_test_case_response.py +4 -1
- eval_studio_client/api/test/test_v1_get_workflow_node_prerequisites_response.py +56 -0
- eval_studio_client/api/test/test_v1_get_workflow_node_response.py +82 -0
- eval_studio_client/api/test/test_v1_get_workflow_response.py +90 -0
- eval_studio_client/api/test/test_v1_import_evaluation_request.py +16 -1
- eval_studio_client/api/test/test_v1_import_test_cases_from_library_response.py +71 -0
- eval_studio_client/api/test/test_v1_import_test_cases_request.py +57 -0
- eval_studio_client/api/test/test_v1_labeled_test_case.py +53 -0
- eval_studio_client/api/test/test_v1_list_prompt_library_items_response.py +71 -0
- eval_studio_client/api/test/test_v1_list_test_case_library_items_response.py +71 -0
- eval_studio_client/api/test/test_v1_list_test_cases_response.py +4 -1
- eval_studio_client/api/test/test_v1_list_workflows_response.py +92 -0
- eval_studio_client/api/test/test_v1_process_workflow_node_response.py +71 -0
- eval_studio_client/api/test/test_v1_prompt_library_item.py +68 -0
- eval_studio_client/api/test/test_v1_test_case.py +4 -1
- eval_studio_client/api/test/test_v1_test_suite_evaluates.py +33 -0
- eval_studio_client/api/test/test_v1_update_test_case_response.py +4 -1
- eval_studio_client/api/test/test_v1_update_workflow_node_response.py +82 -0
- eval_studio_client/api/test/test_v1_update_workflow_response.py +90 -0
- eval_studio_client/api/test/test_v1_workflow.py +89 -0
- eval_studio_client/api/test/test_v1_workflow_edge.py +61 -0
- eval_studio_client/api/test/test_v1_workflow_edge_type.py +33 -0
- eval_studio_client/api/test/test_v1_workflow_node.py +81 -0
- eval_studio_client/api/test/test_v1_workflow_node_artifact.py +61 -0
- eval_studio_client/api/test/test_v1_workflow_node_artifacts.py +64 -0
- eval_studio_client/api/test/test_v1_workflow_node_attributes.py +51 -0
- eval_studio_client/api/test/test_v1_workflow_node_status.py +33 -0
- eval_studio_client/api/test/test_v1_workflow_node_type.py +33 -0
- eval_studio_client/api/test/test_v1_workflow_node_view.py +33 -0
- eval_studio_client/api/test/test_v1_workflow_type.py +33 -0
- eval_studio_client/api/test/test_workflow_edge_service_api.py +38 -0
- eval_studio_client/api/test/test_workflow_node_service_api.py +73 -0
- eval_studio_client/api/test/test_workflow_service_api.py +73 -0
- eval_studio_client/client.py +7 -0
- eval_studio_client/dashboards.py +66 -18
- eval_studio_client/gen/openapiv2/eval_studio.swagger.json +2665 -794
- eval_studio_client/leaderboards.py +125 -0
- eval_studio_client/models.py +3 -42
- eval_studio_client/test_labs.py +49 -21
- eval_studio_client/tests.py +221 -51
- eval_studio_client/utils.py +26 -0
- {eval_studio_client-1.0.0a1.dist-info → eval_studio_client-1.0.1.dist-info}/METADATA +1 -2
- {eval_studio_client-1.0.0a1.dist-info → eval_studio_client-1.0.1.dist-info}/RECORD +180 -50
- {eval_studio_client-1.0.0a1.dist-info → eval_studio_client-1.0.1.dist-info}/WHEEL +1 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
ai/h2o/eval_studio/v1/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
|
+
import unittest
|
|
16
|
+
|
|
17
|
+
from eval_studio_client.api.models.v1_workflow_node_type import V1WorkflowNodeType
|
|
18
|
+
|
|
19
|
+
class TestV1WorkflowNodeType(unittest.TestCase):
|
|
20
|
+
"""V1WorkflowNodeType unit test stubs"""
|
|
21
|
+
|
|
22
|
+
def setUp(self):
|
|
23
|
+
pass
|
|
24
|
+
|
|
25
|
+
def tearDown(self):
|
|
26
|
+
pass
|
|
27
|
+
|
|
28
|
+
def testV1WorkflowNodeType(self):
|
|
29
|
+
"""Test V1WorkflowNodeType"""
|
|
30
|
+
# inst = V1WorkflowNodeType()
|
|
31
|
+
|
|
32
|
+
if __name__ == '__main__':
|
|
33
|
+
unittest.main()
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
ai/h2o/eval_studio/v1/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
|
+
import unittest
|
|
16
|
+
|
|
17
|
+
from eval_studio_client.api.models.v1_workflow_node_view import V1WorkflowNodeView
|
|
18
|
+
|
|
19
|
+
class TestV1WorkflowNodeView(unittest.TestCase):
|
|
20
|
+
"""V1WorkflowNodeView unit test stubs"""
|
|
21
|
+
|
|
22
|
+
def setUp(self):
|
|
23
|
+
pass
|
|
24
|
+
|
|
25
|
+
def tearDown(self):
|
|
26
|
+
pass
|
|
27
|
+
|
|
28
|
+
def testV1WorkflowNodeView(self):
|
|
29
|
+
"""Test V1WorkflowNodeView"""
|
|
30
|
+
# inst = V1WorkflowNodeView()
|
|
31
|
+
|
|
32
|
+
if __name__ == '__main__':
|
|
33
|
+
unittest.main()
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
ai/h2o/eval_studio/v1/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
|
+
import unittest
|
|
16
|
+
|
|
17
|
+
from eval_studio_client.api.models.v1_workflow_type import V1WorkflowType
|
|
18
|
+
|
|
19
|
+
class TestV1WorkflowType(unittest.TestCase):
|
|
20
|
+
"""V1WorkflowType unit test stubs"""
|
|
21
|
+
|
|
22
|
+
def setUp(self):
|
|
23
|
+
pass
|
|
24
|
+
|
|
25
|
+
def tearDown(self):
|
|
26
|
+
pass
|
|
27
|
+
|
|
28
|
+
def testV1WorkflowType(self):
|
|
29
|
+
"""Test V1WorkflowType"""
|
|
30
|
+
# inst = V1WorkflowType()
|
|
31
|
+
|
|
32
|
+
if __name__ == '__main__':
|
|
33
|
+
unittest.main()
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
ai/h2o/eval_studio/v1/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
|
+
import unittest
|
|
16
|
+
|
|
17
|
+
from eval_studio_client.api.api.workflow_edge_service_api import WorkflowEdgeServiceApi
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class TestWorkflowEdgeServiceApi(unittest.TestCase):
|
|
21
|
+
"""WorkflowEdgeServiceApi unit test stubs"""
|
|
22
|
+
|
|
23
|
+
def setUp(self) -> None:
|
|
24
|
+
self.api = WorkflowEdgeServiceApi()
|
|
25
|
+
|
|
26
|
+
def tearDown(self) -> None:
|
|
27
|
+
pass
|
|
28
|
+
|
|
29
|
+
def test_workflow_edge_service_batch_get_workflow_edges(self) -> None:
|
|
30
|
+
"""Test case for workflow_edge_service_batch_get_workflow_edges
|
|
31
|
+
|
|
32
|
+
Retrieves all WorkflowEdges with the specified resource names. If any of the WorkflowEdges do not exist an error is returned. The order of resource names in the request and the returned WorkflowEdges might differ.
|
|
33
|
+
"""
|
|
34
|
+
pass
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
if __name__ == '__main__':
|
|
38
|
+
unittest.main()
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
ai/h2o/eval_studio/v1/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
|
+
import unittest
|
|
16
|
+
|
|
17
|
+
from eval_studio_client.api.api.workflow_node_service_api import WorkflowNodeServiceApi
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class TestWorkflowNodeServiceApi(unittest.TestCase):
|
|
21
|
+
"""WorkflowNodeServiceApi unit test stubs"""
|
|
22
|
+
|
|
23
|
+
def setUp(self) -> None:
|
|
24
|
+
self.api = WorkflowNodeServiceApi()
|
|
25
|
+
|
|
26
|
+
def tearDown(self) -> None:
|
|
27
|
+
pass
|
|
28
|
+
|
|
29
|
+
def test_workflow_node_service_batch_get_workflow_nodes(self) -> None:
|
|
30
|
+
"""Test case for workflow_node_service_batch_get_workflow_nodes
|
|
31
|
+
|
|
32
|
+
BatchGetWorkflowNodes retrieves all WorkflowNodes with the specified resource names. If any of the WorkflowNodes do not exist an error is returned. Deleted WorkflowNodes are returned without error. The order of resource names in the request and the returned WorkflowNodes might differ.
|
|
33
|
+
"""
|
|
34
|
+
pass
|
|
35
|
+
|
|
36
|
+
def test_workflow_node_service_delete_workflow_node(self) -> None:
|
|
37
|
+
"""Test case for workflow_node_service_delete_workflow_node
|
|
38
|
+
|
|
39
|
+
DeleteWorkflowNode deletes a WorkflowNode by name. If the WorkflowNode does not exist an error is returned.
|
|
40
|
+
"""
|
|
41
|
+
pass
|
|
42
|
+
|
|
43
|
+
def test_workflow_node_service_get_workflow_node(self) -> None:
|
|
44
|
+
"""Test case for workflow_node_service_get_workflow_node
|
|
45
|
+
|
|
46
|
+
GetWorkflowNode retrieves a WorkflowNode by name. Deleted WorkflowNode is returned without error, it has a delete_time and deleter fields set.
|
|
47
|
+
"""
|
|
48
|
+
pass
|
|
49
|
+
|
|
50
|
+
def test_workflow_node_service_get_workflow_node_prerequisites(self) -> None:
|
|
51
|
+
"""Test case for workflow_node_service_get_workflow_node_prerequisites
|
|
52
|
+
|
|
53
|
+
GetWorkflowNodePrerequisites retrieves the WorkflowNodes and WorkflowEdges that are the prerequisites of the specified WorkflowNode. The list might be empty. Large data might be stored in storage and not returned in the response. It is client's responsibility to retrieve the data from storage using the content handlers. It is intended to be used by the Eval Studio Workers.
|
|
54
|
+
"""
|
|
55
|
+
pass
|
|
56
|
+
|
|
57
|
+
def test_workflow_node_service_process_workflow_node(self) -> None:
|
|
58
|
+
"""Test case for workflow_node_service_process_workflow_node
|
|
59
|
+
|
|
60
|
+
ProcessWorkflowNode processes a WorkflowNode.
|
|
61
|
+
"""
|
|
62
|
+
pass
|
|
63
|
+
|
|
64
|
+
def test_workflow_node_service_update_workflow_node(self) -> None:
|
|
65
|
+
"""Test case for workflow_node_service_update_workflow_node
|
|
66
|
+
|
|
67
|
+
UpdateWorkflowNode updates a WorkflowNode. The update_mask is used to specify the fields to be updated.
|
|
68
|
+
"""
|
|
69
|
+
pass
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
if __name__ == '__main__':
|
|
73
|
+
unittest.main()
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
ai/h2o/eval_studio/v1/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
|
+
import unittest
|
|
16
|
+
|
|
17
|
+
from eval_studio_client.api.api.workflow_service_api import WorkflowServiceApi
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class TestWorkflowServiceApi(unittest.TestCase):
|
|
21
|
+
"""WorkflowServiceApi unit test stubs"""
|
|
22
|
+
|
|
23
|
+
def setUp(self) -> None:
|
|
24
|
+
self.api = WorkflowServiceApi()
|
|
25
|
+
|
|
26
|
+
def tearDown(self) -> None:
|
|
27
|
+
pass
|
|
28
|
+
|
|
29
|
+
def test_workflow_service_batch_delete_workflows(self) -> None:
|
|
30
|
+
"""Test case for workflow_service_batch_delete_workflows
|
|
31
|
+
|
|
32
|
+
BatchDeleteWorkflows deletes Workflows by names. If any of the Workflows do not exist an error is returned.
|
|
33
|
+
"""
|
|
34
|
+
pass
|
|
35
|
+
|
|
36
|
+
def test_workflow_service_create_workflow(self) -> None:
|
|
37
|
+
"""Test case for workflow_service_create_workflow
|
|
38
|
+
|
|
39
|
+
CreateWorkflow creates a Workflow.
|
|
40
|
+
"""
|
|
41
|
+
pass
|
|
42
|
+
|
|
43
|
+
def test_workflow_service_delete_workflow(self) -> None:
|
|
44
|
+
"""Test case for workflow_service_delete_workflow
|
|
45
|
+
|
|
46
|
+
DeleteWorkflow deletes a Workflow by name. If the Workflow does not exist an error is returned.
|
|
47
|
+
"""
|
|
48
|
+
pass
|
|
49
|
+
|
|
50
|
+
def test_workflow_service_get_workflow(self) -> None:
|
|
51
|
+
"""Test case for workflow_service_get_workflow
|
|
52
|
+
|
|
53
|
+
GetWorkflow retrieves a Workflow by name. Deleted Workflow is returned without error, it has a delete_time and deleter fields set.
|
|
54
|
+
"""
|
|
55
|
+
pass
|
|
56
|
+
|
|
57
|
+
def test_workflow_service_list_workflows(self) -> None:
|
|
58
|
+
"""Test case for workflow_service_list_workflows
|
|
59
|
+
|
|
60
|
+
ListWorkflows lists Workflows.
|
|
61
|
+
"""
|
|
62
|
+
pass
|
|
63
|
+
|
|
64
|
+
def test_workflow_service_update_workflow(self) -> None:
|
|
65
|
+
"""Test case for workflow_service_update_workflow
|
|
66
|
+
|
|
67
|
+
UpdateWorkflow updates a Workflow. The update_mask is used to specify the fields to be updated.
|
|
68
|
+
"""
|
|
69
|
+
pass
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
if __name__ == '__main__':
|
|
73
|
+
unittest.main()
|
eval_studio_client/client.py
CHANGED
|
@@ -7,6 +7,7 @@ from eval_studio_client import api
|
|
|
7
7
|
from eval_studio_client import dashboards
|
|
8
8
|
from eval_studio_client import documents
|
|
9
9
|
from eval_studio_client import evaluators
|
|
10
|
+
from eval_studio_client import leaderboards
|
|
10
11
|
from eval_studio_client import models
|
|
11
12
|
from eval_studio_client import perturbators
|
|
12
13
|
from eval_studio_client import test_labs
|
|
@@ -33,6 +34,7 @@ class Client:
|
|
|
33
34
|
self._api_client = _TokenApiClient(_api_config, token_provider.token)
|
|
34
35
|
|
|
35
36
|
self._dashboards = dashboards._Dashboards(self._api_client)
|
|
37
|
+
self._leaderboards = leaderboards._Leaderboards(self._api_client)
|
|
36
38
|
self._documents = documents._Documents(self._api_client)
|
|
37
39
|
self._evaluators = evaluators._Evaluators(self._api_client)
|
|
38
40
|
self._perturbators = perturbators._Perturbators(self._api_client)
|
|
@@ -55,6 +57,11 @@ class Client:
|
|
|
55
57
|
"""API for getting information about evaluation techniques in the Eval Studio."""
|
|
56
58
|
return self._evaluators
|
|
57
59
|
|
|
60
|
+
@property
|
|
61
|
+
def leaderboards(self) -> leaderboards._Leaderboards:
|
|
62
|
+
"""API for managing the collection of leaderboards."""
|
|
63
|
+
return self._leaderboards
|
|
64
|
+
|
|
58
65
|
@property
|
|
59
66
|
def perturbators(self) -> perturbators._Perturbators:
|
|
60
67
|
"""API for getting information about perturbation techniques in the Eval Studio."""
|
eval_studio_client/dashboards.py
CHANGED
|
@@ -9,6 +9,7 @@ from eval_studio_client import api
|
|
|
9
9
|
from eval_studio_client import insights as i6s
|
|
10
10
|
from eval_studio_client import leaderboards as l10s
|
|
11
11
|
from eval_studio_client import problems as p6s
|
|
12
|
+
from eval_studio_client import utils
|
|
12
13
|
from eval_studio_client.api import models
|
|
13
14
|
|
|
14
15
|
|
|
@@ -41,6 +42,7 @@ class Dashboard:
|
|
|
41
42
|
self._dashboard_api = api.DashboardServiceApi(self._client)
|
|
42
43
|
self._leaderboard_api = api.LeaderboardServiceApi(self._client)
|
|
43
44
|
self._info_api = api.InfoServiceApi(self._client)
|
|
45
|
+
self._operation_api = api.OperationServiceApi(self._client)
|
|
44
46
|
|
|
45
47
|
@property
|
|
46
48
|
def leaderboards(self) -> Optional[List[l10s.Leaderboard]]:
|
|
@@ -118,36 +120,56 @@ class Dashboard:
|
|
|
118
120
|
else:
|
|
119
121
|
raise ValueError("Cannot establish connection to Eval Studio host.")
|
|
120
122
|
|
|
121
|
-
def wait_to_finish(self, timeout: Optional[float] = None):
|
|
123
|
+
def wait_to_finish(self, timeout: Optional[float] = None, verbose: bool = False):
|
|
122
124
|
"""Waits for the dashboard to finish.
|
|
123
125
|
|
|
124
126
|
Args:
|
|
125
127
|
timeout: The maximum time to wait in seconds.
|
|
128
|
+
verbose (bool): If True, prints the status of the evaluation while waiting.
|
|
126
129
|
"""
|
|
127
130
|
timeout = timeout or float("inf")
|
|
131
|
+
progress_bar = utils.ProgressBar()
|
|
128
132
|
if self.finished:
|
|
129
133
|
return
|
|
130
134
|
|
|
135
|
+
if not self._create_operation:
|
|
136
|
+
# This means that the evaluation has no assigned operation, thus cannot poll.
|
|
137
|
+
raise RuntimeError("Failed to retrieve running evaluation info.")
|
|
138
|
+
|
|
131
139
|
if self._client:
|
|
132
140
|
ctr = 0
|
|
133
141
|
while ctr < timeout:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
142
|
+
op = self._operation_api.operation_service_get_operation(
|
|
143
|
+
self._create_operation
|
|
144
|
+
)
|
|
145
|
+
if not op or not op.operation:
|
|
146
|
+
raise RuntimeError(
|
|
147
|
+
"Failed to retrieve running evaluation progress."
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
if verbose:
|
|
151
|
+
if not op.operation.metadata:
|
|
152
|
+
raise RuntimeError(
|
|
153
|
+
"Failed to retrieve running evaluation progress details."
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
op_meta = op.operation.metadata.to_dict()
|
|
157
|
+
progress = op_meta.get("progress", 0)
|
|
158
|
+
progress_msg = op_meta.get("progressMessage", "Running")
|
|
159
|
+
progress_bar.update(progress, progress_msg)
|
|
160
|
+
|
|
161
|
+
if op.operation.done:
|
|
162
|
+
return
|
|
163
|
+
|
|
164
|
+
ctr += 1
|
|
165
|
+
time.sleep(1)
|
|
141
166
|
else:
|
|
142
167
|
raise ValueError("Cannot establish connection to Eval Studio host.")
|
|
143
168
|
|
|
144
169
|
raise TimeoutError("Waiting timeout has been reached.")
|
|
145
170
|
|
|
146
|
-
def show(self):
|
|
147
|
-
"""
|
|
148
|
-
|
|
149
|
-
NOTE: This functionality is primarily for interactive use in Jupyter notebooks.
|
|
150
|
-
"""
|
|
171
|
+
def show(self) -> str:
|
|
172
|
+
"""Prints the endpoint URL of the evaluation dashboard."""
|
|
151
173
|
if self._client:
|
|
152
174
|
info_res = self._info_api.info_service_get_info()
|
|
153
175
|
if not info_res or not info_res.info:
|
|
@@ -155,11 +177,8 @@ class Dashboard:
|
|
|
155
177
|
|
|
156
178
|
host = info_res.info.base_url
|
|
157
179
|
url = urllib.parse.urljoin(host, self.key)
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
import webbrowser
|
|
161
|
-
|
|
162
|
-
webbrowser.open(url)
|
|
180
|
+
print(f"Open following url to access evaluation dashboard: \n\n{url}")
|
|
181
|
+
return url
|
|
163
182
|
else:
|
|
164
183
|
raise ValueError("Cannot establish connection to Eval Studio host.")
|
|
165
184
|
|
|
@@ -179,6 +198,35 @@ class Dashboard:
|
|
|
179
198
|
_client=client,
|
|
180
199
|
)
|
|
181
200
|
|
|
201
|
+
@staticmethod
|
|
202
|
+
def from_operation(
|
|
203
|
+
operation: models.V1Operation, client: Optional[api.ApiClient]
|
|
204
|
+
) -> Optional["Dashboard"]:
|
|
205
|
+
"""Retrieves the dashboard from the operation, which created it.
|
|
206
|
+
|
|
207
|
+
Args:
|
|
208
|
+
operation: The operation that created the dashboard.
|
|
209
|
+
client: The API client to use for the dashboard retrieval.
|
|
210
|
+
|
|
211
|
+
Returns:
|
|
212
|
+
Dashboard: The dashboard instance created by the operation.
|
|
213
|
+
"""
|
|
214
|
+
if not client:
|
|
215
|
+
raise RuntimeError("API Client is not provided")
|
|
216
|
+
|
|
217
|
+
if not operation.metadata:
|
|
218
|
+
raise RuntimeError(
|
|
219
|
+
"Operation metadata missing, it's not possible to retrieve dashboard from operation"
|
|
220
|
+
)
|
|
221
|
+
|
|
222
|
+
dashboard_api = api.DashboardServiceApi(client)
|
|
223
|
+
dashboard_id = operation.metadata.to_dict().get("dashboard", "")
|
|
224
|
+
res = dashboard_api.dashboard_service_get_dashboard(str(dashboard_id))
|
|
225
|
+
if res and res.dashboard:
|
|
226
|
+
return Dashboard._from_api_dashboard(res.dashboard, client)
|
|
227
|
+
|
|
228
|
+
return None
|
|
229
|
+
|
|
182
230
|
|
|
183
231
|
class _Dashboards:
|
|
184
232
|
def __init__(self, client: api.ApiClient):
|