rapidata 0.1.21__py3-none-any.whl → 0.1.23__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.
Potentially problematic release.
This version of rapidata might be problematic. Click here for more details.
- rapidata/__init__.py +1 -0
- rapidata/api_client_README.md +358 -0
- rapidata/rapidata_client/__init__.py +1 -1
- rapidata/rapidata_client/dataset/rapidata_validation_set.py +20 -3
- rapidata/rapidata_client/dataset/validation_set_builder.py +45 -0
- rapidata/rapidata_client/feature_flags/feature_flags.py +68 -3
- rapidata/rapidata_client/order/rapidata_order_builder.py +74 -60
- rapidata/rapidata_client/rapidata_client.py +31 -22
- rapidata/rapidata_client/referee/classify_early_stopping_referee.py +24 -6
- rapidata/rapidata_client/referee/naive_referee.py +14 -3
- rapidata/rapidata_client/selection/__init__.py +0 -0
- rapidata/rapidata_client/workflow/base_workflow.py +1 -2
- rapidata/rapidata_client/workflow/classify_workflow.py +15 -0
- rapidata/rapidata_client/workflow/compare_workflow.py +20 -2
- rapidata/rapidata_client/workflow/free_text_workflow.py +19 -0
- rapidata/rapidata_client/workflow/transcription_workflow.py +20 -2
- {rapidata-0.1.21.dist-info → rapidata-0.1.23.dist-info}/METADATA +1 -1
- {rapidata-0.1.21.dist-info → rapidata-0.1.23.dist-info}/RECORD +20 -18
- {rapidata-0.1.21.dist-info → rapidata-0.1.23.dist-info}/LICENSE +0 -0
- {rapidata-0.1.21.dist-info → rapidata-0.1.23.dist-info}/WHEEL +0 -0
rapidata/__init__.py
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from rapidata.rapidata_client import RapidataClient
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
# rapidata.api-client
|
|
2
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
3
|
+
|
|
4
|
+
The `rapidata.api_client` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
5
|
+
|
|
6
|
+
- API version: v1
|
|
7
|
+
- Package version: 1.0.0
|
|
8
|
+
- Generator version: 7.9.0-SNAPSHOT
|
|
9
|
+
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
|
|
10
|
+
|
|
11
|
+
## Requirements.
|
|
12
|
+
|
|
13
|
+
Python 3.7+
|
|
14
|
+
|
|
15
|
+
## Installation & Usage
|
|
16
|
+
|
|
17
|
+
This python library package is generated without supporting files like setup.py or requirements files
|
|
18
|
+
|
|
19
|
+
To be able to use it, you will need these dependencies in your own package that uses this library:
|
|
20
|
+
|
|
21
|
+
* urllib3 >= 1.25.3
|
|
22
|
+
* python-dateutil
|
|
23
|
+
* pydantic
|
|
24
|
+
|
|
25
|
+
## Getting Started
|
|
26
|
+
|
|
27
|
+
In your own code, to use this library to connect and interact with rapidata.api-client,
|
|
28
|
+
you can run the following:
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
|
|
32
|
+
import rapidata.api_client
|
|
33
|
+
from rapidata.api_client.rest import ApiException
|
|
34
|
+
from pprint import pprint
|
|
35
|
+
|
|
36
|
+
# Defining the host is optional and defaults to http://localhost
|
|
37
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
38
|
+
configuration = rapidata.api_client.Configuration(
|
|
39
|
+
host = "http://localhost"
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
# The client must configure the authentication and authorization parameters
|
|
43
|
+
# in accordance with the API server security policy.
|
|
44
|
+
# Examples for each auth method are provided below, use the example that
|
|
45
|
+
# satisfies your auth use case.
|
|
46
|
+
|
|
47
|
+
# Configure API key authorization: bearer
|
|
48
|
+
configuration.api_key['bearer'] = os.environ["API_KEY"]
|
|
49
|
+
|
|
50
|
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
51
|
+
# configuration.api_key_prefix['bearer'] = 'Bearer'
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
# Enter a context with an instance of the API client
|
|
55
|
+
with rapidata.api_client.ApiClient(configuration) as api_client:
|
|
56
|
+
# Create an instance of the API class
|
|
57
|
+
api_instance = rapidata.api_client.CocoApi(api_client)
|
|
58
|
+
submit_coco_model = rapidata.api_client.SubmitCocoModel() # SubmitCocoModel | The model containing the information needed to create the validation set. (optional)
|
|
59
|
+
|
|
60
|
+
try:
|
|
61
|
+
# Creates a new validation set based on a previously uploaded CoCo set.
|
|
62
|
+
api_response = api_instance.coco_submit_post(submit_coco_model=submit_coco_model)
|
|
63
|
+
print("The response of CocoApi->coco_submit_post:\n")
|
|
64
|
+
pprint(api_response)
|
|
65
|
+
except ApiException as e:
|
|
66
|
+
print("Exception when calling CocoApi->coco_submit_post: %s\n" % e)
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Documentation for API Endpoints
|
|
71
|
+
|
|
72
|
+
All URIs are relative to *http://localhost*
|
|
73
|
+
|
|
74
|
+
Class | Method | HTTP request | Description
|
|
75
|
+
------------ | ------------- | ------------- | -------------
|
|
76
|
+
*CocoApi* | [**coco_submit_post**](rapidata/api_client/docs/CocoApi.md#coco_submit_post) | **POST** /Coco/Submit | Creates a new validation set based on a previously uploaded CoCo set.
|
|
77
|
+
*CocoApi* | [**coco_upload_post**](rapidata/api_client/docs/CocoApi.md#coco_upload_post) | **POST** /Coco/Upload | Uploads a CoCo set to the system.
|
|
78
|
+
*DatapointApi* | [**datapoint_delete_delete**](rapidata/api_client/docs/DatapointApi.md#datapoint_delete_delete) | **DELETE** /Datapoint/Delete | Delete a datapoint.
|
|
79
|
+
*DatapointApi* | [**datapoint_get_all_datapoints_by_dataset_id_get**](rapidata/api_client/docs/DatapointApi.md#datapoint_get_all_datapoints_by_dataset_id_get) | **GET** /Datapoint/GetAllDatapointsByDatasetId | Get all datapoints of a dataset.
|
|
80
|
+
*DatapointApi* | [**datapoint_get_by_id_get**](rapidata/api_client/docs/DatapointApi.md#datapoint_get_by_id_get) | **GET** /Datapoint/GetById | Get a datapoint by its id.
|
|
81
|
+
*DatasetApi* | [**dataset_create_datapoint_post**](rapidata/api_client/docs/DatasetApi.md#dataset_create_datapoint_post) | **POST** /Dataset/CreateDatapoint | Creates a single datapoint.
|
|
82
|
+
*DatasetApi* | [**dataset_get_by_id_get**](rapidata/api_client/docs/DatasetApi.md#dataset_get_by_id_get) | **GET** /Dataset/GetById | Gets a dataset by its id.
|
|
83
|
+
*DatasetApi* | [**dataset_import_post**](rapidata/api_client/docs/DatasetApi.md#dataset_import_post) | **POST** /Dataset/Import | Imports datapoints from a csv file.
|
|
84
|
+
*DatasetApi* | [**dataset_update_name_post**](rapidata/api_client/docs/DatasetApi.md#dataset_update_name_post) | **POST** /Dataset/UpdateName | Updates the name of a dataset.
|
|
85
|
+
*DatasetApi* | [**dataset_upload_datapoint_post**](rapidata/api_client/docs/DatasetApi.md#dataset_upload_datapoint_post) | **POST** /Dataset/UploadDatapoint | Creates a new multi asset datapoint.
|
|
86
|
+
*DatasetApi* | [**dataset_upload_files_from_s3_post**](rapidata/api_client/docs/DatasetApi.md#dataset_upload_files_from_s3_post) | **POST** /Dataset/UploadFilesFromS3 | Uploads files from an S3 bucket to a dataset.
|
|
87
|
+
*DatasetApi* | [**dataset_upload_images_to_dataset_post**](rapidata/api_client/docs/DatasetApi.md#dataset_upload_images_to_dataset_post) | **POST** /Dataset/UploadImagesToDataset | Uploads images to a dataset.
|
|
88
|
+
*DatasetApi* | [**dataset_upload_text_sources_to_dataset_post**](rapidata/api_client/docs/DatasetApi.md#dataset_upload_text_sources_to_dataset_post) | **POST** /Dataset/UploadTextSourcesToDataset | Creates new datapoints from text sources.
|
|
89
|
+
*IdentityApi* | [**identity_confirm_get**](rapidata/api_client/docs/IdentityApi.md#identity_confirm_get) | **GET** /Identity/Confirm | Confirms a user's signup by a token.
|
|
90
|
+
*IdentityApi* | [**identity_create_client_post**](rapidata/api_client/docs/IdentityApi.md#identity_create_client_post) | **POST** /Identity/CreateClient | Creates a new client for a customer.
|
|
91
|
+
*IdentityApi* | [**identity_external_login_callback_get**](rapidata/api_client/docs/IdentityApi.md#identity_external_login_callback_get) | **GET** /Identity/ExternalLoginCallback | Logs in a user using after receiving a grant from an external provider.
|
|
92
|
+
*IdentityApi* | [**identity_external_login_post**](rapidata/api_client/docs/IdentityApi.md#identity_external_login_post) | **POST** /Identity/ExternalLogin | Logs in a user using an external provider.
|
|
93
|
+
*IdentityApi* | [**identity_get_auth_token_get**](rapidata/api_client/docs/IdentityApi.md#identity_get_auth_token_get) | **GET** /Identity/GetAuthToken | Issues a new auth token using the refresh token.
|
|
94
|
+
*IdentityApi* | [**identity_get_client_auth_token_post**](rapidata/api_client/docs/IdentityApi.md#identity_get_client_auth_token_post) | **POST** /Identity/GetClientAuthToken | Issues a new auth token using the client credentials.
|
|
95
|
+
*IdentityApi* | [**identity_index_post**](rapidata/api_client/docs/IdentityApi.md#identity_index_post) | **POST** /Identity/Index | Logs in a user by username or email and password.
|
|
96
|
+
*IdentityApi* | [**identity_logout_post**](rapidata/api_client/docs/IdentityApi.md#identity_logout_post) | **POST** /Identity/Logout | Logs out the current user by deleting the refresh token cookie.
|
|
97
|
+
*IdentityApi* | [**identity_request_reset_post**](rapidata/api_client/docs/IdentityApi.md#identity_request_reset_post) | **POST** /Identity/RequestReset | Request a password reset for a user.
|
|
98
|
+
*IdentityApi* | [**identity_signup_post**](rapidata/api_client/docs/IdentityApi.md#identity_signup_post) | **POST** /Identity/Signup | Signs up a new user.
|
|
99
|
+
*IdentityApi* | [**identity_submit_reset_post**](rapidata/api_client/docs/IdentityApi.md#identity_submit_reset_post) | **POST** /Identity/SubmitReset | Updates the password of a user after a password reset request.
|
|
100
|
+
*IdentityApi* | [**identity_temporary_post**](rapidata/api_client/docs/IdentityApi.md#identity_temporary_post) | **POST** /Identity/Temporary | Creates a new temporary user.
|
|
101
|
+
*NewsletterApi* | [**newsletter_post**](rapidata/api_client/docs/NewsletterApi.md#newsletter_post) | **POST** /Newsletter | Signs a user up to the newsletter.
|
|
102
|
+
*NewsletterApi* | [**newsletter_unsubscribe_post**](rapidata/api_client/docs/NewsletterApi.md#newsletter_unsubscribe_post) | **POST** /Newsletter/Unsubscribe | Unsubscribes a user from the newsletter.
|
|
103
|
+
*OrderApi* | [**order_approve_post**](rapidata/api_client/docs/OrderApi.md#order_approve_post) | **POST** /Order/Approve | Approves an order that has been submitted for manual approval.
|
|
104
|
+
*OrderApi* | [**order_clone_order_post**](rapidata/api_client/docs/OrderApi.md#order_clone_order_post) | **POST** /Order/CloneOrder | Clones an existing order.
|
|
105
|
+
*OrderApi* | [**order_create_complex_order_post**](rapidata/api_client/docs/OrderApi.md#order_create_complex_order_post) | **POST** /Order/CreateComplexOrder | Creates a new order with a custom pipeline.
|
|
106
|
+
*OrderApi* | [**order_create_default_order_post**](rapidata/api_client/docs/OrderApi.md#order_create_default_order_post) | **POST** /Order/CreateDefaultOrder | Creates a new order with a default pipeline.
|
|
107
|
+
*OrderApi* | [**order_create_post**](rapidata/api_client/docs/OrderApi.md#order_create_post) | **POST** /Order/Create | Used to create a new order.
|
|
108
|
+
*OrderApi* | [**order_create_unsupported_order_post**](rapidata/api_client/docs/OrderApi.md#order_create_unsupported_order_post) | **POST** /Order/CreateUnsupportedOrder | Notifies the admins that a user wants to create an order with an unsupported label type or data type.
|
|
109
|
+
*OrderApi* | [**order_delete_delete**](rapidata/api_client/docs/OrderApi.md#order_delete_delete) | **DELETE** /Order/Delete | Deletes an order.
|
|
110
|
+
*OrderApi* | [**order_feedback_post**](rapidata/api_client/docs/OrderApi.md#order_feedback_post) | **POST** /Order/Feedback | Submits feedback about our services.
|
|
111
|
+
*OrderApi* | [**order_get_by_id_get**](rapidata/api_client/docs/OrderApi.md#order_get_by_id_get) | **GET** /Order/GetById | Retrieves an order by its id.
|
|
112
|
+
*OrderApi* | [**order_get_order_results_get**](rapidata/api_client/docs/OrderApi.md#order_get_order_results_get) | **GET** /Order/GetOrderResults | Aggregates the results of an order.
|
|
113
|
+
*OrderApi* | [**order_get_public_get**](rapidata/api_client/docs/OrderApi.md#order_get_public_get) | **GET** /Order/GetPublic | Retrieves orders that are public and can be cloned by any user.
|
|
114
|
+
*OrderApi* | [**order_get_workflow_config_get**](rapidata/api_client/docs/OrderApi.md#order_get_workflow_config_get) | **GET** /Order/GetWorkflowConfig | Retrieves the workflow configuration for an order.
|
|
115
|
+
*OrderApi* | [**order_query_get**](rapidata/api_client/docs/OrderApi.md#order_query_get) | **GET** /Order/Query | Queries orders based on a filter, page, and sort criteria.
|
|
116
|
+
*OrderApi* | [**order_result_get**](rapidata/api_client/docs/OrderApi.md#order_result_get) | **GET** /Order/Result | Aggregates the results of an order.
|
|
117
|
+
*OrderApi* | [**order_retry_failed_post**](rapidata/api_client/docs/OrderApi.md#order_retry_failed_post) | **POST** /Order/RetryFailed | Retries a failed order.
|
|
118
|
+
*OrderApi* | [**order_submit_post**](rapidata/api_client/docs/OrderApi.md#order_submit_post) | **POST** /Order/Submit | Submits an order for approval.
|
|
119
|
+
*OrderApi* | [**order_unlock_post**](rapidata/api_client/docs/OrderApi.md#order_unlock_post) | **POST** /Order/Unlock | Unlocks a newly cloned order.
|
|
120
|
+
*OrderApi* | [**order_update_access_put**](rapidata/api_client/docs/OrderApi.md#order_update_access_put) | **PUT** /Order/UpdateAccess | Updates whether an order is public or not.
|
|
121
|
+
*OrderApi* | [**order_update_order_name_put**](rapidata/api_client/docs/OrderApi.md#order_update_order_name_put) | **PUT** /Order/UpdateOrderName | Updates the name of an order.
|
|
122
|
+
*OrderApi* | [**order_update_workflow_config_put**](rapidata/api_client/docs/OrderApi.md#order_update_workflow_config_put) | **PUT** /Order/UpdateWorkflowConfig | Updates the workflow configuration of an order.
|
|
123
|
+
*RapidApi* | [**rapid_add_user_guess_post**](rapidata/api_client/docs/RapidApi.md#rapid_add_user_guess_post) | **POST** /Rapid/AddUserGuess | Submits a user guess for a Rapid.
|
|
124
|
+
*RapidApi* | [**rapid_create_demographic_rapid_post**](rapidata/api_client/docs/RapidApi.md#rapid_create_demographic_rapid_post) | **POST** /Rapid/CreateDemographicRapid | Creates a new Demographic Rapid.
|
|
125
|
+
*RapidApi* | [**rapid_query_validation_rapids_get**](rapidata/api_client/docs/RapidApi.md#rapid_query_validation_rapids_get) | **GET** /Rapid/QueryValidationRapids | Queries the validation rapids for a specific validation set.
|
|
126
|
+
*RapidApi* | [**rapid_skip_user_guess_post**](rapidata/api_client/docs/RapidApi.md#rapid_skip_user_guess_post) | **POST** /Rapid/SkipUserGuess | Skips a Rapid for the user.
|
|
127
|
+
*RapidApi* | [**rapid_validate_current_rapid_bag_get**](rapidata/api_client/docs/RapidApi.md#rapid_validate_current_rapid_bag_get) | **GET** /Rapid/ValidateCurrentRapidBag | Validates that the rapids associated with the current user are active.
|
|
128
|
+
*ValidationApi* | [**validation_add_validation_rapid_post**](rapidata/api_client/docs/ValidationApi.md#validation_add_validation_rapid_post) | **POST** /Validation/AddValidationRapid | Adds a new validation rapid to the specified validation set.
|
|
129
|
+
*ValidationApi* | [**validation_create_validation_set_post**](rapidata/api_client/docs/ValidationApi.md#validation_create_validation_set_post) | **POST** /Validation/CreateValidationSet | Creates a new empty validation set.
|
|
130
|
+
*ValidationApi* | [**validation_get_available_validation_sets_get**](rapidata/api_client/docs/ValidationApi.md#validation_get_available_validation_sets_get) | **GET** /Validation/GetAvailableValidationSets | Gets the available validation sets for the current user.
|
|
131
|
+
*ValidationApi* | [**validation_import_compare_post**](rapidata/api_client/docs/ValidationApi.md#validation_import_compare_post) | **POST** /Validation/ImportCompare | Imports a compare validation set from a zip file.
|
|
132
|
+
*ValidationApi* | [**validation_import_post**](rapidata/api_client/docs/ValidationApi.md#validation_import_post) | **POST** /Validation/Import | Imports a validation set from a zip file.
|
|
133
|
+
*ValidationApi* | [**validation_query_validation_sets_get**](rapidata/api_client/docs/ValidationApi.md#validation_query_validation_sets_get) | **GET** /Validation/QueryValidationSets | Queries validation sets based on the provided filter, paging and sorting criteria.
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
## Documentation For Models
|
|
137
|
+
|
|
138
|
+
- [AddValidationRapidModel](rapidata/api_client/docs/AddValidationRapidModel.md)
|
|
139
|
+
- [AddValidationRapidModelPayload](rapidata/api_client/docs/AddValidationRapidModelPayload.md)
|
|
140
|
+
- [AddValidationRapidModelTruth](rapidata/api_client/docs/AddValidationRapidModelTruth.md)
|
|
141
|
+
- [AddValidationRapidResult](rapidata/api_client/docs/AddValidationRapidResult.md)
|
|
142
|
+
- [AdminOrderModel](rapidata/api_client/docs/AdminOrderModel.md)
|
|
143
|
+
- [AdminOrderModelPagedResult](rapidata/api_client/docs/AdminOrderModelPagedResult.md)
|
|
144
|
+
- [AgeGroup](rapidata/api_client/docs/AgeGroup.md)
|
|
145
|
+
- [AgeUserFilterModel](rapidata/api_client/docs/AgeUserFilterModel.md)
|
|
146
|
+
- [AggregatorType](rapidata/api_client/docs/AggregatorType.md)
|
|
147
|
+
- [AttachCategoryRapidBlueprint](rapidata/api_client/docs/AttachCategoryRapidBlueprint.md)
|
|
148
|
+
- [AttachCategoryResult](rapidata/api_client/docs/AttachCategoryResult.md)
|
|
149
|
+
- [AttachCategoryTruth](rapidata/api_client/docs/AttachCategoryTruth.md)
|
|
150
|
+
- [BaseError](rapidata/api_client/docs/BaseError.md)
|
|
151
|
+
- [BoundingBoxPayload](rapidata/api_client/docs/BoundingBoxPayload.md)
|
|
152
|
+
- [BoundingBoxRapidBlueprint](rapidata/api_client/docs/BoundingBoxRapidBlueprint.md)
|
|
153
|
+
- [BoundingBoxResult](rapidata/api_client/docs/BoundingBoxResult.md)
|
|
154
|
+
- [BoundingBoxTruth](rapidata/api_client/docs/BoundingBoxTruth.md)
|
|
155
|
+
- [BoxShape](rapidata/api_client/docs/BoxShape.md)
|
|
156
|
+
- [ClassificationMetadata](rapidata/api_client/docs/ClassificationMetadata.md)
|
|
157
|
+
- [ClassificationMetadataFilterConfig](rapidata/api_client/docs/ClassificationMetadataFilterConfig.md)
|
|
158
|
+
- [ClassifyPayload](rapidata/api_client/docs/ClassifyPayload.md)
|
|
159
|
+
- [CloneDatasetModel](rapidata/api_client/docs/CloneDatasetModel.md)
|
|
160
|
+
- [CloneOrderModel](rapidata/api_client/docs/CloneOrderModel.md)
|
|
161
|
+
- [CloneOrderResult](rapidata/api_client/docs/CloneOrderResult.md)
|
|
162
|
+
- [ComparePayload](rapidata/api_client/docs/ComparePayload.md)
|
|
163
|
+
- [CompareRapidBlueprint](rapidata/api_client/docs/CompareRapidBlueprint.md)
|
|
164
|
+
- [CompareResult](rapidata/api_client/docs/CompareResult.md)
|
|
165
|
+
- [CompareTruth](rapidata/api_client/docs/CompareTruth.md)
|
|
166
|
+
- [CompareWorkflowConfig](rapidata/api_client/docs/CompareWorkflowConfig.md)
|
|
167
|
+
- [CompareWorkflowConfigRapidSelectionConfigsInner](rapidata/api_client/docs/CompareWorkflowConfigRapidSelectionConfigsInner.md)
|
|
168
|
+
- [CompareWorkflowConfigReferee](rapidata/api_client/docs/CompareWorkflowConfigReferee.md)
|
|
169
|
+
- [CompareWorkflowModel](rapidata/api_client/docs/CompareWorkflowModel.md)
|
|
170
|
+
- [ConditionalValidationRapidSelectionConfig](rapidata/api_client/docs/ConditionalValidationRapidSelectionConfig.md)
|
|
171
|
+
- [Coordinate](rapidata/api_client/docs/Coordinate.md)
|
|
172
|
+
- [CorrelatedRapidSelectionConfig](rapidata/api_client/docs/CorrelatedRapidSelectionConfig.md)
|
|
173
|
+
- [CountClassificationMetadataFilterConfig](rapidata/api_client/docs/CountClassificationMetadataFilterConfig.md)
|
|
174
|
+
- [CountMetadata](rapidata/api_client/docs/CountMetadata.md)
|
|
175
|
+
- [CountryUserFilterModel](rapidata/api_client/docs/CountryUserFilterModel.md)
|
|
176
|
+
- [CreateClientModel](rapidata/api_client/docs/CreateClientModel.md)
|
|
177
|
+
- [CreateComplexOrderModel](rapidata/api_client/docs/CreateComplexOrderModel.md)
|
|
178
|
+
- [CreateComplexOrderModelPipeline](rapidata/api_client/docs/CreateComplexOrderModelPipeline.md)
|
|
179
|
+
- [CreateComplexOrderResult](rapidata/api_client/docs/CreateComplexOrderResult.md)
|
|
180
|
+
- [CreateDatasetArtifactModel](rapidata/api_client/docs/CreateDatasetArtifactModel.md)
|
|
181
|
+
- [CreateDatasetArtifactModelDataset](rapidata/api_client/docs/CreateDatasetArtifactModelDataset.md)
|
|
182
|
+
- [CreateDefaultOrderModel](rapidata/api_client/docs/CreateDefaultOrderModel.md)
|
|
183
|
+
- [CreateDefaultOrderModelWorkflowConfig](rapidata/api_client/docs/CreateDefaultOrderModelWorkflowConfig.md)
|
|
184
|
+
- [CreateDemographicRapidModel](rapidata/api_client/docs/CreateDemographicRapidModel.md)
|
|
185
|
+
- [CreateEmptyValidationSetResult](rapidata/api_client/docs/CreateEmptyValidationSetResult.md)
|
|
186
|
+
- [CreateLegacyOrderResult](rapidata/api_client/docs/CreateLegacyOrderResult.md)
|
|
187
|
+
- [CreateOrderModel](rapidata/api_client/docs/CreateOrderModel.md)
|
|
188
|
+
- [CreateOrderModelReferee](rapidata/api_client/docs/CreateOrderModelReferee.md)
|
|
189
|
+
- [CreateOrderModelSelectionsInner](rapidata/api_client/docs/CreateOrderModelSelectionsInner.md)
|
|
190
|
+
- [CreateOrderModelUserFiltersInner](rapidata/api_client/docs/CreateOrderModelUserFiltersInner.md)
|
|
191
|
+
- [CreateOrderModelWorkflow](rapidata/api_client/docs/CreateOrderModelWorkflow.md)
|
|
192
|
+
- [CreateOrderResult](rapidata/api_client/docs/CreateOrderResult.md)
|
|
193
|
+
- [CreateSimplePipelineModel](rapidata/api_client/docs/CreateSimplePipelineModel.md)
|
|
194
|
+
- [CreateSimplePipelineModelArtifactsInner](rapidata/api_client/docs/CreateSimplePipelineModelArtifactsInner.md)
|
|
195
|
+
- [CreateSimplePipelineModelPipelineStepsInner](rapidata/api_client/docs/CreateSimplePipelineModelPipelineStepsInner.md)
|
|
196
|
+
- [CreateUnsupportedOrderModel](rapidata/api_client/docs/CreateUnsupportedOrderModel.md)
|
|
197
|
+
- [CustomerOrderModel](rapidata/api_client/docs/CustomerOrderModel.md)
|
|
198
|
+
- [CustomerOrderModelPagedResult](rapidata/api_client/docs/CustomerOrderModelPagedResult.md)
|
|
199
|
+
- [Datapoint](rapidata/api_client/docs/Datapoint.md)
|
|
200
|
+
- [DatapointAsset](rapidata/api_client/docs/DatapointAsset.md)
|
|
201
|
+
- [DatapointGetByIdGet200Response](rapidata/api_client/docs/DatapointGetByIdGet200Response.md)
|
|
202
|
+
- [DatapointMetadataModel](rapidata/api_client/docs/DatapointMetadataModel.md)
|
|
203
|
+
- [DatapointMetadataModelMetadataInner](rapidata/api_client/docs/DatapointMetadataModelMetadataInner.md)
|
|
204
|
+
- [DatapointModel](rapidata/api_client/docs/DatapointModel.md)
|
|
205
|
+
- [DatapointModelAsset](rapidata/api_client/docs/DatapointModelAsset.md)
|
|
206
|
+
- [DatasetEvaluationStepModel](rapidata/api_client/docs/DatasetEvaluationStepModel.md)
|
|
207
|
+
- [DemographicRapidSelectionConfig](rapidata/api_client/docs/DemographicRapidSelectionConfig.md)
|
|
208
|
+
- [DemographicSelection](rapidata/api_client/docs/DemographicSelection.md)
|
|
209
|
+
- [EarlyStoppingRefereeModel](rapidata/api_client/docs/EarlyStoppingRefereeModel.md)
|
|
210
|
+
- [EmptyValidationTruth](rapidata/api_client/docs/EmptyValidationTruth.md)
|
|
211
|
+
- [ErrorType](rapidata/api_client/docs/ErrorType.md)
|
|
212
|
+
- [FeatureFlag](rapidata/api_client/docs/FeatureFlag.md)
|
|
213
|
+
- [FeatureFlagModel](rapidata/api_client/docs/FeatureFlagModel.md)
|
|
214
|
+
- [FeedbackModel](rapidata/api_client/docs/FeedbackModel.md)
|
|
215
|
+
- [FileAsset](rapidata/api_client/docs/FileAsset.md)
|
|
216
|
+
- [FileAssetMetadataInner](rapidata/api_client/docs/FileAssetMetadataInner.md)
|
|
217
|
+
- [FileAssetModel](rapidata/api_client/docs/FileAssetModel.md)
|
|
218
|
+
- [Filter](rapidata/api_client/docs/Filter.md)
|
|
219
|
+
- [FilterOperator](rapidata/api_client/docs/FilterOperator.md)
|
|
220
|
+
- [FreeTextPayload](rapidata/api_client/docs/FreeTextPayload.md)
|
|
221
|
+
- [FreeTextRapidBlueprint](rapidata/api_client/docs/FreeTextRapidBlueprint.md)
|
|
222
|
+
- [FreeTextResult](rapidata/api_client/docs/FreeTextResult.md)
|
|
223
|
+
- [Gender](rapidata/api_client/docs/Gender.md)
|
|
224
|
+
- [GenderUserFilterModel](rapidata/api_client/docs/GenderUserFilterModel.md)
|
|
225
|
+
- [GetAvailableValidationSetsResult](rapidata/api_client/docs/GetAvailableValidationSetsResult.md)
|
|
226
|
+
- [GetDatapointsByDatasetIdResult](rapidata/api_client/docs/GetDatapointsByDatasetIdResult.md)
|
|
227
|
+
- [GetDatasetByIdResult](rapidata/api_client/docs/GetDatasetByIdResult.md)
|
|
228
|
+
- [GetOrderByIdResult](rapidata/api_client/docs/GetOrderByIdResult.md)
|
|
229
|
+
- [GetOrderResultsResult](rapidata/api_client/docs/GetOrderResultsResult.md)
|
|
230
|
+
- [GetPublicOrdersResult](rapidata/api_client/docs/GetPublicOrdersResult.md)
|
|
231
|
+
- [GetWorkflowConfigResult](rapidata/api_client/docs/GetWorkflowConfigResult.md)
|
|
232
|
+
- [GetWorkflowConfigResultWorkflowConfig](rapidata/api_client/docs/GetWorkflowConfigResultWorkflowConfig.md)
|
|
233
|
+
- [ImageDimensionMetadata](rapidata/api_client/docs/ImageDimensionMetadata.md)
|
|
234
|
+
- [ImportFromFileResult](rapidata/api_client/docs/ImportFromFileResult.md)
|
|
235
|
+
- [ImportValidationSetFromFileResult](rapidata/api_client/docs/ImportValidationSetFromFileResult.md)
|
|
236
|
+
- [IssueAuthTokenResult](rapidata/api_client/docs/IssueAuthTokenResult.md)
|
|
237
|
+
- [IssueClientAuthTokenResult](rapidata/api_client/docs/IssueClientAuthTokenResult.md)
|
|
238
|
+
- [LabelingSelection](rapidata/api_client/docs/LabelingSelection.md)
|
|
239
|
+
- [Line](rapidata/api_client/docs/Line.md)
|
|
240
|
+
- [LinePayload](rapidata/api_client/docs/LinePayload.md)
|
|
241
|
+
- [LinePoint](rapidata/api_client/docs/LinePoint.md)
|
|
242
|
+
- [LineRapidBlueprint](rapidata/api_client/docs/LineRapidBlueprint.md)
|
|
243
|
+
- [LineResult](rapidata/api_client/docs/LineResult.md)
|
|
244
|
+
- [LineTruth](rapidata/api_client/docs/LineTruth.md)
|
|
245
|
+
- [LocateBoxTruth](rapidata/api_client/docs/LocateBoxTruth.md)
|
|
246
|
+
- [LocateCoordinate](rapidata/api_client/docs/LocateCoordinate.md)
|
|
247
|
+
- [LocatePayload](rapidata/api_client/docs/LocatePayload.md)
|
|
248
|
+
- [LocateRapidBlueprint](rapidata/api_client/docs/LocateRapidBlueprint.md)
|
|
249
|
+
- [LocateResult](rapidata/api_client/docs/LocateResult.md)
|
|
250
|
+
- [LocationMetadata](rapidata/api_client/docs/LocationMetadata.md)
|
|
251
|
+
- [LocationMetadataExistsFilterConfig](rapidata/api_client/docs/LocationMetadataExistsFilterConfig.md)
|
|
252
|
+
- [LogicOperator](rapidata/api_client/docs/LogicOperator.md)
|
|
253
|
+
- [LoginModel](rapidata/api_client/docs/LoginModel.md)
|
|
254
|
+
- [MetadataVisibilities](rapidata/api_client/docs/MetadataVisibilities.md)
|
|
255
|
+
- [MultiAsset](rapidata/api_client/docs/MultiAsset.md)
|
|
256
|
+
- [MultiAssetModel](rapidata/api_client/docs/MultiAssetModel.md)
|
|
257
|
+
- [NaiveRefereeConfig](rapidata/api_client/docs/NaiveRefereeConfig.md)
|
|
258
|
+
- [NaiveRefereeModel](rapidata/api_client/docs/NaiveRefereeModel.md)
|
|
259
|
+
- [NamedClassification](rapidata/api_client/docs/NamedClassification.md)
|
|
260
|
+
- [NamedEntityPayload](rapidata/api_client/docs/NamedEntityPayload.md)
|
|
261
|
+
- [NamedEntityRapidBlueprint](rapidata/api_client/docs/NamedEntityRapidBlueprint.md)
|
|
262
|
+
- [NamedEntityResult](rapidata/api_client/docs/NamedEntityResult.md)
|
|
263
|
+
- [NamedEntityTruth](rapidata/api_client/docs/NamedEntityTruth.md)
|
|
264
|
+
- [NeverEndingRefereeConfig](rapidata/api_client/docs/NeverEndingRefereeConfig.md)
|
|
265
|
+
- [NewsletterModel](rapidata/api_client/docs/NewsletterModel.md)
|
|
266
|
+
- [NoValidationWorkflowRapidSelectionConfig](rapidata/api_client/docs/NoValidationWorkflowRapidSelectionConfig.md)
|
|
267
|
+
- [NullAsset](rapidata/api_client/docs/NullAsset.md)
|
|
268
|
+
- [NullAssetModel](rapidata/api_client/docs/NullAssetModel.md)
|
|
269
|
+
- [OnlyValidationWorkflowRapidSelectionConfig](rapidata/api_client/docs/OnlyValidationWorkflowRapidSelectionConfig.md)
|
|
270
|
+
- [OrderModel](rapidata/api_client/docs/OrderModel.md)
|
|
271
|
+
- [OrderQueryGet200Response](rapidata/api_client/docs/OrderQueryGet200Response.md)
|
|
272
|
+
- [OriginalFilenameMetadata](rapidata/api_client/docs/OriginalFilenameMetadata.md)
|
|
273
|
+
- [PageInfo](rapidata/api_client/docs/PageInfo.md)
|
|
274
|
+
- [PolygonPayload](rapidata/api_client/docs/PolygonPayload.md)
|
|
275
|
+
- [PolygonRapidBlueprint](rapidata/api_client/docs/PolygonRapidBlueprint.md)
|
|
276
|
+
- [PolygonResult](rapidata/api_client/docs/PolygonResult.md)
|
|
277
|
+
- [PolygonTruth](rapidata/api_client/docs/PolygonTruth.md)
|
|
278
|
+
- [PrivateTextMetadataInput](rapidata/api_client/docs/PrivateTextMetadataInput.md)
|
|
279
|
+
- [ProbabilisticAttachCategoryRefereeConfig](rapidata/api_client/docs/ProbabilisticAttachCategoryRefereeConfig.md)
|
|
280
|
+
- [PromptMetadata](rapidata/api_client/docs/PromptMetadata.md)
|
|
281
|
+
- [PromptMetadataInput](rapidata/api_client/docs/PromptMetadataInput.md)
|
|
282
|
+
- [PublicTextMetadataInput](rapidata/api_client/docs/PublicTextMetadataInput.md)
|
|
283
|
+
- [QueryModel](rapidata/api_client/docs/QueryModel.md)
|
|
284
|
+
- [QueryOrdersModel](rapidata/api_client/docs/QueryOrdersModel.md)
|
|
285
|
+
- [QueryValidationRapidsResult](rapidata/api_client/docs/QueryValidationRapidsResult.md)
|
|
286
|
+
- [QueryValidationRapidsResultAsset](rapidata/api_client/docs/QueryValidationRapidsResultAsset.md)
|
|
287
|
+
- [QueryValidationRapidsResultPagedResult](rapidata/api_client/docs/QueryValidationRapidsResultPagedResult.md)
|
|
288
|
+
- [QueryValidationSetModel](rapidata/api_client/docs/QueryValidationSetModel.md)
|
|
289
|
+
- [RapidResultModel](rapidata/api_client/docs/RapidResultModel.md)
|
|
290
|
+
- [RapidResultModelResult](rapidata/api_client/docs/RapidResultModelResult.md)
|
|
291
|
+
- [RapidSkippedModel](rapidata/api_client/docs/RapidSkippedModel.md)
|
|
292
|
+
- [RequestPasswordResetCommand](rapidata/api_client/docs/RequestPasswordResetCommand.md)
|
|
293
|
+
- [RootFilter](rapidata/api_client/docs/RootFilter.md)
|
|
294
|
+
- [SendCompletionMailStepModel](rapidata/api_client/docs/SendCompletionMailStepModel.md)
|
|
295
|
+
- [Shape](rapidata/api_client/docs/Shape.md)
|
|
296
|
+
- [SignupCustomerModel](rapidata/api_client/docs/SignupCustomerModel.md)
|
|
297
|
+
- [SignupShadowCustomerModel](rapidata/api_client/docs/SignupShadowCustomerModel.md)
|
|
298
|
+
- [SimpleWorkflowConfig](rapidata/api_client/docs/SimpleWorkflowConfig.md)
|
|
299
|
+
- [SimpleWorkflowConfigBlueprint](rapidata/api_client/docs/SimpleWorkflowConfigBlueprint.md)
|
|
300
|
+
- [SimpleWorkflowModel](rapidata/api_client/docs/SimpleWorkflowModel.md)
|
|
301
|
+
- [SimpleWorkflowModelBlueprint](rapidata/api_client/docs/SimpleWorkflowModelBlueprint.md)
|
|
302
|
+
- [SkipResult](rapidata/api_client/docs/SkipResult.md)
|
|
303
|
+
- [SortCriterion](rapidata/api_client/docs/SortCriterion.md)
|
|
304
|
+
- [SortDirection](rapidata/api_client/docs/SortDirection.md)
|
|
305
|
+
- [StaticRapidSelectionConfig](rapidata/api_client/docs/StaticRapidSelectionConfig.md)
|
|
306
|
+
- [SubmitCocoModel](rapidata/api_client/docs/SubmitCocoModel.md)
|
|
307
|
+
- [SubmitCocoResult](rapidata/api_client/docs/SubmitCocoResult.md)
|
|
308
|
+
- [SubmitPasswordResetCommand](rapidata/api_client/docs/SubmitPasswordResetCommand.md)
|
|
309
|
+
- [TextAsset](rapidata/api_client/docs/TextAsset.md)
|
|
310
|
+
- [TextAssetModel](rapidata/api_client/docs/TextAssetModel.md)
|
|
311
|
+
- [TextMetadata](rapidata/api_client/docs/TextMetadata.md)
|
|
312
|
+
- [TranscriptionMetadata](rapidata/api_client/docs/TranscriptionMetadata.md)
|
|
313
|
+
- [TranscriptionMetadataInput](rapidata/api_client/docs/TranscriptionMetadataInput.md)
|
|
314
|
+
- [TranscriptionPayload](rapidata/api_client/docs/TranscriptionPayload.md)
|
|
315
|
+
- [TranscriptionRapidBlueprint](rapidata/api_client/docs/TranscriptionRapidBlueprint.md)
|
|
316
|
+
- [TranscriptionResult](rapidata/api_client/docs/TranscriptionResult.md)
|
|
317
|
+
- [TranscriptionTruth](rapidata/api_client/docs/TranscriptionTruth.md)
|
|
318
|
+
- [TranscriptionWord](rapidata/api_client/docs/TranscriptionWord.md)
|
|
319
|
+
- [UnlockOrderResult](rapidata/api_client/docs/UnlockOrderResult.md)
|
|
320
|
+
- [UpdateAccessModel](rapidata/api_client/docs/UpdateAccessModel.md)
|
|
321
|
+
- [UpdateOrderModel](rapidata/api_client/docs/UpdateOrderModel.md)
|
|
322
|
+
- [UpdateWorkflowConfigModel](rapidata/api_client/docs/UpdateWorkflowConfigModel.md)
|
|
323
|
+
- [UpdateWorkflowConfigModelWorkflowConfig](rapidata/api_client/docs/UpdateWorkflowConfigModelWorkflowConfig.md)
|
|
324
|
+
- [UploadCocoResult](rapidata/api_client/docs/UploadCocoResult.md)
|
|
325
|
+
- [UploadDatapointsResult](rapidata/api_client/docs/UploadDatapointsResult.md)
|
|
326
|
+
- [UploadFilesFromS3BucketModel](rapidata/api_client/docs/UploadFilesFromS3BucketModel.md)
|
|
327
|
+
- [UploadTextSourcesToDatasetModel](rapidata/api_client/docs/UploadTextSourcesToDatasetModel.md)
|
|
328
|
+
- [ValidationChance](rapidata/api_client/docs/ValidationChance.md)
|
|
329
|
+
- [ValidationImportPostRequestBlueprint](rapidata/api_client/docs/ValidationImportPostRequestBlueprint.md)
|
|
330
|
+
- [ValidationRapidSelectionConfig](rapidata/api_client/docs/ValidationRapidSelectionConfig.md)
|
|
331
|
+
- [ValidationSelection](rapidata/api_client/docs/ValidationSelection.md)
|
|
332
|
+
- [ValidationSet](rapidata/api_client/docs/ValidationSet.md)
|
|
333
|
+
- [ValidationSetOverviewModel](rapidata/api_client/docs/ValidationSetOverviewModel.md)
|
|
334
|
+
- [ValidationSetPagedResult](rapidata/api_client/docs/ValidationSetPagedResult.md)
|
|
335
|
+
- [WorkflowAggregationStepModel](rapidata/api_client/docs/WorkflowAggregationStepModel.md)
|
|
336
|
+
- [WorkflowLabelingStepModel](rapidata/api_client/docs/WorkflowLabelingStepModel.md)
|
|
337
|
+
- [WorkflowSplitModel](rapidata/api_client/docs/WorkflowSplitModel.md)
|
|
338
|
+
- [WorkflowSplitModelFilterConfigsInner](rapidata/api_client/docs/WorkflowSplitModelFilterConfigsInner.md)
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
<a id="documentation-for-authorization"></a>
|
|
342
|
+
## Documentation For Authorization
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
Authentication schemes defined for the API:
|
|
346
|
+
<a id="bearer"></a>
|
|
347
|
+
### bearer
|
|
348
|
+
|
|
349
|
+
- **Type**: API key
|
|
350
|
+
- **API key parameter name**: Authorization
|
|
351
|
+
- **Location**: HTTP header
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
## Author
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
from .rapidata_client import RapidataClient
|
|
1
|
+
from .rapidata_client import RapidataClient
|
|
@@ -14,7 +14,9 @@ from rapidata.api_client.models.bounding_box_truth import BoundingBoxTruth
|
|
|
14
14
|
from rapidata.api_client.models.classify_payload import ClassifyPayload
|
|
15
15
|
from rapidata.api_client.models.compare_payload import ComparePayload
|
|
16
16
|
from rapidata.api_client.models.compare_truth import CompareTruth
|
|
17
|
-
from rapidata.api_client.models.datapoint_metadata_model_metadata_inner import
|
|
17
|
+
from rapidata.api_client.models.datapoint_metadata_model_metadata_inner import (
|
|
18
|
+
DatapointMetadataModelMetadataInner,
|
|
19
|
+
)
|
|
18
20
|
from rapidata.api_client.models.empty_validation_truth import EmptyValidationTruth
|
|
19
21
|
from rapidata.api_client.models.free_text_payload import FreeTextPayload
|
|
20
22
|
from rapidata.api_client.models.line_payload import LinePayload
|
|
@@ -27,12 +29,15 @@ from rapidata.api_client.models.polygon_payload import PolygonPayload
|
|
|
27
29
|
from rapidata.api_client.models.polygon_truth import PolygonTruth
|
|
28
30
|
from rapidata.api_client.models.transcription_payload import TranscriptionPayload
|
|
29
31
|
from rapidata.api_client.models.transcription_truth import TranscriptionTruth
|
|
30
|
-
from rapidata.rapidata_client.dataset.validation_rapid_parts import ValidatioRapidParts
|
|
31
32
|
from rapidata.rapidata_client.metadata.base_metadata import Metadata
|
|
32
33
|
from rapidata.service.openapi_service import OpenAPIService
|
|
33
34
|
|
|
34
35
|
|
|
35
36
|
class RapidataValidationSet:
|
|
37
|
+
"""A class for interacting with a Rapidata validation set.
|
|
38
|
+
|
|
39
|
+
Get a `ValidationSet` either by using `rapi.get_validation_set(id)` to get an exisitng validation set or by using `rapi.new_validation_set(name)` to create a new validation set.
|
|
40
|
+
"""
|
|
36
41
|
|
|
37
42
|
def __init__(self, validation_set_id, openapi_service: OpenAPIService):
|
|
38
43
|
self.id = validation_set_id
|
|
@@ -66,11 +71,23 @@ class RapidataValidationSet:
|
|
|
66
71
|
media_paths: str | list[str],
|
|
67
72
|
randomCorrectProbability: float,
|
|
68
73
|
):
|
|
74
|
+
"""Add a validation rapid to the validation set.
|
|
75
|
+
|
|
76
|
+
Args:
|
|
77
|
+
payload (BoundingBoxPayload | ClassifyPayload | ComparePayload | FreeTextPayload | LinePayload | LocatePayload | NamedEntityPayload | PolygonPayload | TranscriptionPayload): The payload for the rapid.
|
|
78
|
+
truths (AttachCategoryTruth | BoundingBoxTruth | CompareTruth | EmptyValidationTruth | LineTruth | LocateBoxTruth | NamedEntityTruth | PolygonTruth | TranscriptionTruth): The truths for the rapid.
|
|
79
|
+
metadata (list[Metadata]): The metadata for the rapid.
|
|
80
|
+
media_paths (str | list[str]): The media paths for the rapid.
|
|
81
|
+
randomCorrectProbability (float): The random correct probability for the rapid.
|
|
82
|
+
"""
|
|
69
83
|
model = AddValidationRapidModel(
|
|
70
84
|
validationSetId=self.id,
|
|
71
85
|
payload=AddValidationRapidModelPayload(payload),
|
|
72
86
|
truth=AddValidationRapidModelTruth(truths),
|
|
73
|
-
metadata=[
|
|
87
|
+
metadata=[
|
|
88
|
+
DatapointMetadataModelMetadataInner(meta.to_model())
|
|
89
|
+
for meta in metadata
|
|
90
|
+
],
|
|
74
91
|
randomCorrectProbability=randomCorrectProbability,
|
|
75
92
|
)
|
|
76
93
|
|
|
@@ -15,6 +15,10 @@ from rapidata.service.openapi_service import OpenAPIService
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class ValidationSetBuilder:
|
|
18
|
+
"""The ValidationSetBuilder is used to build a validation set.
|
|
19
|
+
Give the validation set a name and then add classify, compare or transcription rapid parts to it.
|
|
20
|
+
Get a `ValidationSetBuilder` by calling [`rapi.new_validation_set()`](../rapidata_client.md/#rapidata.rapidata_client.rapidata_client.RapidataClient.new_validation_set).
|
|
21
|
+
"""
|
|
18
22
|
|
|
19
23
|
def __init__(self, name: str, openapi_service: OpenAPIService):
|
|
20
24
|
self.name = name
|
|
@@ -23,6 +27,11 @@ class ValidationSetBuilder:
|
|
|
23
27
|
self._rapid_parts: list[ValidatioRapidParts] = []
|
|
24
28
|
|
|
25
29
|
def create(self):
|
|
30
|
+
"""This creates the validation set by executing all http requests. This should be the last method called on the builder.
|
|
31
|
+
|
|
32
|
+
Returns:
|
|
33
|
+
RapidataValidationSet: A RapidataValidationSet instance.
|
|
34
|
+
"""
|
|
26
35
|
result = (
|
|
27
36
|
self.openapi_service.validation_api.validation_create_validation_set_post(
|
|
28
37
|
name=self.name
|
|
@@ -57,6 +66,18 @@ class ValidationSetBuilder:
|
|
|
57
66
|
truths: list[str],
|
|
58
67
|
metadata: list[Metadata] = [],
|
|
59
68
|
):
|
|
69
|
+
"""Add a classify rapid to the validation set.
|
|
70
|
+
|
|
71
|
+
Args:
|
|
72
|
+
media_path (str): The path to the media file.
|
|
73
|
+
question (str): The question for the rapid.
|
|
74
|
+
categories (list[str]): The list of categories for the rapid.
|
|
75
|
+
truths (list[str]): The list of truths for the rapid.
|
|
76
|
+
metadata (list[Metadata], optional): The metadata for the rapid.
|
|
77
|
+
|
|
78
|
+
Returns:
|
|
79
|
+
ValidationSetBuilder: The ValidationSetBuilder instance.
|
|
80
|
+
"""
|
|
60
81
|
payload = ClassifyPayload(
|
|
61
82
|
_t="ClassifyPayload", possibleCategories=categories, title=question
|
|
62
83
|
)
|
|
@@ -84,6 +105,17 @@ class ValidationSetBuilder:
|
|
|
84
105
|
truth: str,
|
|
85
106
|
metadata: list[Metadata] = [],
|
|
86
107
|
):
|
|
108
|
+
"""Add a compare rapid to the validation set.
|
|
109
|
+
|
|
110
|
+
Args:
|
|
111
|
+
media_paths (list[str]): The list of media paths for the rapid.
|
|
112
|
+
question (str): The question for the rapid.
|
|
113
|
+
truth (str): The path to the truth file.
|
|
114
|
+
metadata (list[Metadata], optional): The metadata for the rapid.
|
|
115
|
+
|
|
116
|
+
Returns:
|
|
117
|
+
ValidationSetBuilder: The ValidationSetBuilder instance.
|
|
118
|
+
"""
|
|
87
119
|
payload = ComparePayload(_t="ComparePayload", criteria=question)
|
|
88
120
|
# take only last part of truth path
|
|
89
121
|
truth = os.path.basename(truth)
|
|
@@ -119,6 +151,19 @@ class ValidationSetBuilder:
|
|
|
119
151
|
strict_grading: bool | None = None,
|
|
120
152
|
metadata: list[Metadata] = [],
|
|
121
153
|
):
|
|
154
|
+
"""Add a transcription rapid to the validation set.
|
|
155
|
+
|
|
156
|
+
Args:
|
|
157
|
+
media_path (str): The path to the media file.
|
|
158
|
+
question (str): The question for the rapid.
|
|
159
|
+
transcription (list[str]): The transcription for the rapid.
|
|
160
|
+
correct_words (list[str]): The list of correct words for the rapid.
|
|
161
|
+
strict_grading (bool | None, optional): The strict grading for the rapid. Defaults to None.
|
|
162
|
+
metadata (list[Metadata], optional): The metadata for the rapid.
|
|
163
|
+
|
|
164
|
+
Returns:
|
|
165
|
+
ValidationSetBuilder: The ValidationSetBuilder instance.
|
|
166
|
+
"""
|
|
122
167
|
transcription_words = [
|
|
123
168
|
TranscriptionWord(word=word, wordIndex=i)
|
|
124
169
|
for i, word in enumerate(transcription)
|
|
@@ -2,32 +2,97 @@ from rapidata.api_client.models.feature_flag_model import FeatureFlagModel
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
class FeatureFlags:
|
|
5
|
+
"""A class to manage feature flags.
|
|
6
|
+
|
|
7
|
+
This class provides methods to set and manage various feature flags
|
|
8
|
+
used in the application.
|
|
9
|
+
|
|
10
|
+
Attributes:
|
|
11
|
+
_flags (dict[str, str]): A dictionary to store feature flags.
|
|
12
|
+
"""
|
|
13
|
+
|
|
5
14
|
def __init__(self):
|
|
15
|
+
"""Initialize the FeatureFlags object with an empty flags dictionary."""
|
|
6
16
|
self._flags: dict[str, str] = {}
|
|
7
17
|
|
|
8
18
|
def to_list(self) -> list[FeatureFlagModel]:
|
|
19
|
+
"""Convert the feature flags to a list of FeatureFlagModel objects.
|
|
20
|
+
|
|
21
|
+
Returns:
|
|
22
|
+
list[FeatureFlagModel]: A list of FeatureFlagModel objects
|
|
23
|
+
representing the current feature flags.
|
|
24
|
+
"""
|
|
9
25
|
return [FeatureFlagModel(key=name, value=value) for name, value in self._flags.items()]
|
|
10
26
|
|
|
11
27
|
def alert_on_fast_response(self, value: int):
|
|
28
|
+
"""Gives an alert as a pop up on the UI when the response time is less than the threshold.
|
|
29
|
+
|
|
30
|
+
Args:
|
|
31
|
+
value (int): The threshold value for fast response alerts.
|
|
32
|
+
|
|
33
|
+
Returns:
|
|
34
|
+
FeatureFlags: The current FeatureFlags instance for method chaining.
|
|
35
|
+
"""
|
|
12
36
|
self._flags["alert_on_fast_response"] = str(value)
|
|
13
37
|
return self
|
|
14
38
|
|
|
15
39
|
def disable_translation(self, value: bool = True):
|
|
40
|
+
"""Disable automatic translation of all texts in the UI.
|
|
41
|
+
|
|
42
|
+
Args:
|
|
43
|
+
value (bool, optional): Whether to disable translation. Defaults to True.
|
|
44
|
+
|
|
45
|
+
Returns:
|
|
46
|
+
FeatureFlags: The current FeatureFlags instance for method chaining.
|
|
47
|
+
"""
|
|
16
48
|
self._flags["disable_translation"] = str(value)
|
|
17
49
|
return self
|
|
18
50
|
|
|
19
51
|
def free_text_minimum_characters(self, value: int):
|
|
52
|
+
"""Set the minimum number of characters a user has to type before the task can be successfully submitted.
|
|
53
|
+
|
|
54
|
+
Args:
|
|
55
|
+
value (int): The minimum number of characters for free text.
|
|
56
|
+
|
|
57
|
+
Returns:
|
|
58
|
+
FeatureFlags: The current FeatureFlags instance for method chaining.
|
|
59
|
+
"""
|
|
20
60
|
self._flags["free_text_minimum_characters"] = str(value)
|
|
21
61
|
return self
|
|
22
62
|
|
|
23
63
|
def no_shuffle(self, value: bool = True):
|
|
64
|
+
"""Only for classify tasks. If true, the order of the categories will be the same as the one in the workflow.
|
|
65
|
+
|
|
66
|
+
Args:
|
|
67
|
+
value (bool, optional): Whether to disable shuffling. Defaults to True.
|
|
68
|
+
|
|
69
|
+
Returns:
|
|
70
|
+
FeatureFlags: The current FeatureFlags instance for method chaining.
|
|
71
|
+
"""
|
|
24
72
|
self._flags["no_shuffle"] = str(value)
|
|
25
73
|
return self
|
|
26
|
-
|
|
27
|
-
def
|
|
74
|
+
|
|
75
|
+
def compare_with_prompt_design(self, value: bool = True):
|
|
76
|
+
"""A special design to compare two texts/images based on a criteria and a given prompt.
|
|
77
|
+
|
|
78
|
+
Args:
|
|
79
|
+
value (bool, optional): Whether to enable compare with prompt design. Defaults to True.
|
|
80
|
+
|
|
81
|
+
Returns:
|
|
82
|
+
FeatureFlags: The current FeatureFlags instance for method chaining.
|
|
83
|
+
"""
|
|
28
84
|
self._flags["claire"] = str(value)
|
|
29
85
|
return self
|
|
30
|
-
|
|
86
|
+
|
|
31
87
|
def key_value(self, key: str, value: str):
|
|
88
|
+
"""Set a custom feature flag with the given key and value. Use this to enable features that do not have a dedicated method (yet).
|
|
89
|
+
|
|
90
|
+
Args:
|
|
91
|
+
key (str): The key for the custom feature flag.
|
|
92
|
+
value (str): The value for the custom feature flag.
|
|
93
|
+
|
|
94
|
+
Returns:
|
|
95
|
+
FeatureFlags: The current FeatureFlags instance for method chaining.
|
|
96
|
+
"""
|
|
32
97
|
self._flags[key] = value
|
|
33
98
|
return self
|
|
@@ -18,7 +18,6 @@ from rapidata.rapidata_client.metadata.base_metadata import Metadata
|
|
|
18
18
|
from rapidata.rapidata_client.dataset.rapidata_dataset import RapidataDataset
|
|
19
19
|
from rapidata.rapidata_client.referee.naive_referee import NaiveReferee
|
|
20
20
|
from rapidata.rapidata_client.selection.base_selection import Selection
|
|
21
|
-
from rapidata.rapidata_client.selection.labeling_selection import LabelingSelection
|
|
22
21
|
from rapidata.rapidata_client.workflow import Workflow
|
|
23
22
|
from rapidata.rapidata_client.order.rapidata_order import RapidataOrder
|
|
24
23
|
from rapidata.rapidata_client.referee import Referee
|
|
@@ -26,15 +25,13 @@ from rapidata.service.openapi_service import OpenAPIService
|
|
|
26
25
|
|
|
27
26
|
|
|
28
27
|
class RapidataOrderBuilder:
|
|
29
|
-
"""
|
|
30
|
-
Builder object for creating Rapidata orders.
|
|
28
|
+
"""Builder object for creating Rapidata orders.
|
|
31
29
|
|
|
32
30
|
Use the fluent interface to set the desired configuration. Add a workflow to the order using `.workflow()` and finally call `.create()` to create the order.
|
|
33
31
|
|
|
34
|
-
:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
:type name: str
|
|
32
|
+
Args:
|
|
33
|
+
openapi_service (OpenAPIService): The OpenAPIService instance.
|
|
34
|
+
name (str): The name of the order.
|
|
38
35
|
"""
|
|
39
36
|
|
|
40
37
|
def __init__(
|
|
@@ -91,12 +88,16 @@ class RapidataOrderBuilder:
|
|
|
91
88
|
)
|
|
92
89
|
|
|
93
90
|
def create(self, submit=True) -> RapidataOrder:
|
|
94
|
-
"""
|
|
95
|
-
|
|
91
|
+
"""Actually makes the API calls to create the order based on how the order builder was configured.
|
|
92
|
+
|
|
93
|
+
Args:
|
|
94
|
+
submit (bool, optional): Whether to submit the order. Defaults to True.
|
|
95
|
+
|
|
96
|
+
Returns:
|
|
97
|
+
RapidataOrder: The created RapidataOrder instance.
|
|
96
98
|
|
|
97
|
-
:
|
|
98
|
-
|
|
99
|
-
:raises ValueError: If no workflow is provided.
|
|
99
|
+
Raises:
|
|
100
|
+
ValueError: If no workflow is provided.
|
|
100
101
|
"""
|
|
101
102
|
order_model = self._to_model()
|
|
102
103
|
|
|
@@ -120,25 +121,25 @@ class RapidataOrderBuilder:
|
|
|
120
121
|
return order
|
|
121
122
|
|
|
122
123
|
def workflow(self, workflow: Workflow):
|
|
123
|
-
"""
|
|
124
|
-
|
|
124
|
+
"""Set the workflow for the order.
|
|
125
|
+
|
|
126
|
+
Args:
|
|
127
|
+
workflow (Workflow): The workflow to be set.
|
|
125
128
|
|
|
126
|
-
:
|
|
127
|
-
|
|
128
|
-
:return: The updated RapidataOrderBuilder instance.
|
|
129
|
-
:rtype: RapidataOrderBuilder
|
|
129
|
+
Returns:
|
|
130
|
+
RapidataOrderBuilder: The updated RapidataOrderBuilder instance.
|
|
130
131
|
"""
|
|
131
132
|
self._workflow = workflow
|
|
132
133
|
return self
|
|
133
134
|
|
|
134
135
|
def referee(self, referee: Referee):
|
|
135
|
-
"""
|
|
136
|
-
Set the referee for the order.
|
|
136
|
+
"""Set the referee for the order.
|
|
137
137
|
|
|
138
|
-
:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
:
|
|
138
|
+
Args:
|
|
139
|
+
referee (Referee): The referee to be set.
|
|
140
|
+
|
|
141
|
+
Returns:
|
|
142
|
+
RapidataOrderBuilder: The updated RapidataOrderBuilder instance.
|
|
142
143
|
"""
|
|
143
144
|
self._referee = referee
|
|
144
145
|
return self
|
|
@@ -148,76 +149,89 @@ class RapidataOrderBuilder:
|
|
|
148
149
|
media_paths: list[str | list[str]],
|
|
149
150
|
metadata: list[Metadata] | None = None,
|
|
150
151
|
):
|
|
151
|
-
"""
|
|
152
|
-
|
|
152
|
+
"""Set the media assets for the order.
|
|
153
|
+
|
|
154
|
+
Args:
|
|
155
|
+
media_paths (list[str | list[str]]): The paths of the media assets to be set.
|
|
156
|
+
metadata (list[Metadata] | None, optional): Metadata for the media assets. Defaults to None.
|
|
153
157
|
|
|
154
|
-
:
|
|
155
|
-
|
|
156
|
-
:return: The updated RapidataOrderBuilder instance.
|
|
157
|
-
:rtype: RapidataOrderBuilder
|
|
158
|
+
Returns:
|
|
159
|
+
RapidataOrderBuilder: The updated RapidataOrderBuilder instance.
|
|
158
160
|
"""
|
|
159
161
|
self._media_paths = media_paths
|
|
160
162
|
self._metadata = metadata
|
|
161
163
|
return self
|
|
162
164
|
|
|
163
165
|
def feature_flags(self, feature_flags: FeatureFlags):
|
|
164
|
-
"""
|
|
165
|
-
|
|
166
|
+
"""Set the feature flags for the order.
|
|
167
|
+
|
|
168
|
+
Args:
|
|
169
|
+
feature_flags (FeatureFlags): The feature flags to be set.
|
|
166
170
|
|
|
167
|
-
:
|
|
168
|
-
|
|
169
|
-
:return: The updated RapidataOrderBuilder instance.
|
|
170
|
-
:rtype: RapidataOrderBuilder
|
|
171
|
+
Returns:
|
|
172
|
+
RapidataOrderBuilder: The updated RapidataOrderBuilder instance.
|
|
171
173
|
"""
|
|
172
174
|
self._feature_flags = feature_flags
|
|
173
175
|
return self
|
|
174
176
|
|
|
175
177
|
def country_filter(self, country_codes: list[str]):
|
|
176
|
-
"""
|
|
177
|
-
Set the target country codes for the order.
|
|
178
|
+
"""Set the target country codes for the order.
|
|
178
179
|
|
|
179
|
-
:
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
:
|
|
180
|
+
Args:
|
|
181
|
+
country_codes (list[str]): The country codes to be set.
|
|
182
|
+
|
|
183
|
+
Returns:
|
|
184
|
+
RapidataOrderBuilder: The updated RapidataOrderBuilder instance.
|
|
183
185
|
"""
|
|
184
186
|
self._country_codes = country_codes
|
|
185
187
|
return self
|
|
186
188
|
|
|
187
189
|
def aggregator(self, aggregator: AggregatorType):
|
|
188
|
-
"""
|
|
189
|
-
|
|
190
|
+
"""Set the aggregator for the order.
|
|
191
|
+
|
|
192
|
+
Args:
|
|
193
|
+
aggregator (AggregatorType): The aggregator to be set.
|
|
190
194
|
|
|
191
|
-
:
|
|
192
|
-
|
|
193
|
-
:return: The updated RapidataOrderBuilder instance.
|
|
194
|
-
:rtype: RapidataOrderBuilder
|
|
195
|
+
Returns:
|
|
196
|
+
RapidataOrderBuilder: The updated RapidataOrderBuilder instance.
|
|
195
197
|
"""
|
|
196
198
|
self._aggregator = aggregator
|
|
197
199
|
return self
|
|
198
200
|
|
|
199
201
|
def validation_set_id(self, validation_set_id: str):
|
|
200
|
-
"""
|
|
201
|
-
|
|
202
|
+
"""Set the validation set for the order.
|
|
203
|
+
|
|
204
|
+
Args:
|
|
205
|
+
validation_set_id (str): The validation set ID to be set.
|
|
202
206
|
|
|
203
|
-
:
|
|
204
|
-
|
|
205
|
-
:return: The updated RapidataOrderBuilder instance.
|
|
206
|
-
:rtype: RapidataOrderBuilder
|
|
207
|
+
Returns:
|
|
208
|
+
RapidataOrderBuilder: The updated RapidataOrderBuilder instance.
|
|
207
209
|
"""
|
|
208
210
|
self._validation_set_id = validation_set_id
|
|
209
211
|
return self
|
|
210
212
|
|
|
211
213
|
def rapids_per_bag(self, amount: int):
|
|
212
|
-
"""
|
|
213
|
-
Defines the number of tasks a user sees in a single session. The default is 3.
|
|
214
|
+
"""Defines the number of tasks a user sees in a single session.
|
|
214
215
|
|
|
215
|
-
:
|
|
216
|
-
|
|
217
|
-
|
|
216
|
+
Args:
|
|
217
|
+
amount (int): The number of tasks a user sees in a single session.
|
|
218
|
+
|
|
219
|
+
Returns:
|
|
220
|
+
RapidataOrderBuilder: The updated RapidataOrderBuilder instance.
|
|
221
|
+
|
|
222
|
+
Raises:
|
|
223
|
+
NotImplementedError: This method is not implemented yet.
|
|
218
224
|
"""
|
|
219
225
|
raise NotImplementedError("Not implemented yet.")
|
|
220
226
|
|
|
221
227
|
def selections(self, selections: list[Selection]):
|
|
228
|
+
"""Set the selections for the order.
|
|
229
|
+
|
|
230
|
+
Args:
|
|
231
|
+
selections (list[Selection]): The selections to be set.
|
|
232
|
+
|
|
233
|
+
Returns:
|
|
234
|
+
RapidataOrderBuilder: The updated RapidataOrderBuilder instance.
|
|
235
|
+
"""
|
|
222
236
|
self._selections = selections
|
|
223
|
-
return
|
|
237
|
+
return self
|
|
@@ -8,9 +8,7 @@ from rapidata.service.openapi_service import OpenAPIService
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class RapidataClient:
|
|
11
|
-
"""
|
|
12
|
-
A client for interacting with the Rapidata API.
|
|
13
|
-
"""
|
|
11
|
+
"""The Rapidata client is the main entry point for interacting with the Rapidata API. It allows you to create orders and validation sets. For creating a new order, check out `new_order()`. For creating a new validation set, check out `new_validation_set()`."""
|
|
14
12
|
|
|
15
13
|
def __init__(
|
|
16
14
|
self,
|
|
@@ -18,44 +16,55 @@ class RapidataClient:
|
|
|
18
16
|
client_secret: str,
|
|
19
17
|
endpoint: str = "https://api.app.rapidata.ai",
|
|
20
18
|
):
|
|
21
|
-
"""
|
|
22
|
-
Initialize the RapidataClient.
|
|
19
|
+
"""Initialize the RapidataClient. Best practice is to store the client ID and client secret in environment variables. Ask your Rapidata representative for the client ID and client secret.
|
|
23
20
|
|
|
24
|
-
:
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
Args:
|
|
22
|
+
client_id (str): The client ID for authentication.
|
|
23
|
+
client_secret (str): The client secret for authentication.
|
|
24
|
+
endpoint (str, optional): The API endpoint URL.
|
|
27
25
|
"""
|
|
28
26
|
self.openapi_service = OpenAPIService(
|
|
29
27
|
client_id=client_id, client_secret=client_secret, endpoint=endpoint
|
|
30
28
|
)
|
|
31
29
|
|
|
32
30
|
def new_order(self, name: str) -> RapidataOrderBuilder:
|
|
33
|
-
"""
|
|
34
|
-
|
|
31
|
+
"""Create a new order using a RapidataOrderBuilder instance.
|
|
32
|
+
|
|
33
|
+
Args:
|
|
34
|
+
name (str): The name of the order.
|
|
35
35
|
|
|
36
|
-
:
|
|
37
|
-
|
|
36
|
+
Returns:
|
|
37
|
+
RapidataOrderBuilder: A RapidataOrderBuilder instance.
|
|
38
38
|
"""
|
|
39
39
|
return RapidataOrderBuilder(openapi_service=self.openapi_service, name=name)
|
|
40
40
|
|
|
41
41
|
def new_validation_set(self, name: str) -> ValidationSetBuilder:
|
|
42
|
-
"""
|
|
43
|
-
|
|
42
|
+
"""Create a new validation set using a ValidationDatasetBuilder instance.
|
|
43
|
+
|
|
44
|
+
Args:
|
|
45
|
+
name (str): The name of the validation set.
|
|
44
46
|
|
|
45
|
-
:
|
|
46
|
-
|
|
47
|
+
Returns:
|
|
48
|
+
ValidationSetBuilder: A ValidationDatasetBuilder instance.
|
|
47
49
|
"""
|
|
48
50
|
return ValidationSetBuilder(name=name, openapi_service=self.openapi_service)
|
|
49
51
|
|
|
50
52
|
def get_validation_set(self, validation_set_id: str) -> RapidataValidationSet:
|
|
51
|
-
"""
|
|
52
|
-
|
|
53
|
+
"""Get a validation set by ID.
|
|
54
|
+
|
|
55
|
+
Args:
|
|
56
|
+
validation_set_id (str): The ID of the validation set.
|
|
53
57
|
|
|
54
|
-
:
|
|
55
|
-
|
|
58
|
+
Returns:
|
|
59
|
+
RapidataValidationSet: The ValidationSet instance.
|
|
56
60
|
"""
|
|
57
61
|
return RapidataValidationSet(validation_set_id, self.openapi_service)
|
|
58
62
|
|
|
59
63
|
@property
|
|
60
|
-
def utils(self):
|
|
61
|
-
|
|
64
|
+
def utils(self) -> Utils:
|
|
65
|
+
"""Get the Utils instance.
|
|
66
|
+
|
|
67
|
+
Returns:
|
|
68
|
+
Utils: The Utils instance associated with this client.
|
|
69
|
+
"""
|
|
70
|
+
return Utils(openapi_service=self.openapi_service)
|
|
@@ -1,16 +1,34 @@
|
|
|
1
1
|
from typing import Any
|
|
2
2
|
from rapidata.rapidata_client.referee.base_referee import Referee
|
|
3
|
-
from rapidata.api_client.models.early_stopping_referee_model import
|
|
3
|
+
from rapidata.api_client.models.early_stopping_referee_model import (
|
|
4
|
+
EarlyStoppingRefereeModel,
|
|
5
|
+
)
|
|
4
6
|
|
|
5
7
|
|
|
6
8
|
class ClassifyEarlyStoppingReferee(Referee):
|
|
7
|
-
"""
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
"""A referee that stops the task when confidence in the winning category exceeds a threshold.
|
|
10
|
+
|
|
11
|
+
This referee implements an early stopping mechanism for classification tasks.
|
|
12
|
+
It terminates the task when the confidence in the leading category surpasses
|
|
13
|
+
a specified threshold or when the maximum number of votes is reached.
|
|
14
|
+
|
|
15
|
+
The threshold behaves logarithmically, meaning small increments (e.g., from 0.99
|
|
16
|
+
to 0.999) can significantly impact the stopping criteria.
|
|
17
|
+
|
|
18
|
+
Attributes:
|
|
19
|
+
threshold (float): The confidence threshold for early stopping.
|
|
20
|
+
max_vote_count (int): The maximum number of votes allowed before stopping.
|
|
11
21
|
"""
|
|
12
22
|
|
|
13
23
|
def __init__(self, threshold: float = 0.999, max_vote_count: int = 100):
|
|
24
|
+
"""Initialize the ClassifyEarlyStoppingReferee.
|
|
25
|
+
|
|
26
|
+
Args:
|
|
27
|
+
threshold (float, optional): The confidence threshold for early stopping.
|
|
28
|
+
Defaults to 0.999.
|
|
29
|
+
max_vote_count (int, optional): The maximum number of votes allowed
|
|
30
|
+
before stopping. Defaults to 100.
|
|
31
|
+
"""
|
|
14
32
|
self.threshold = threshold
|
|
15
33
|
self.max_vote_count = max_vote_count
|
|
16
34
|
|
|
@@ -25,5 +43,5 @@ class ClassifyEarlyStoppingReferee(Referee):
|
|
|
25
43
|
return EarlyStoppingRefereeModel(
|
|
26
44
|
_t="EarlyStoppingReferee",
|
|
27
45
|
threshold=self.threshold,
|
|
28
|
-
|
|
46
|
+
maxVotes=self.max_vote_count,
|
|
29
47
|
)
|
|
@@ -3,12 +3,23 @@ from rapidata.rapidata_client.referee.base_referee import Referee
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
class NaiveReferee(Referee):
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
"""A simple referee that completes a task after a fixed number of guesses.
|
|
7
|
+
|
|
8
|
+
This referee implements a straightforward approach to task completion,
|
|
9
|
+
where the task is considered finished after a predetermined number of
|
|
10
|
+
guesses have been made, regardless of the content or quality of those guesses.
|
|
11
|
+
|
|
12
|
+
Attributes:
|
|
13
|
+
required_guesses (int): The number of guesses required to complete the task.
|
|
9
14
|
"""
|
|
10
15
|
|
|
11
16
|
def __init__(self, required_guesses: int = 10):
|
|
17
|
+
"""Initialize the NaiveReferee.
|
|
18
|
+
|
|
19
|
+
Args:
|
|
20
|
+
required_guesses (int, optional): The number of guesses required
|
|
21
|
+
to complete the task. Defaults to 10.
|
|
22
|
+
"""
|
|
12
23
|
super().__init__()
|
|
13
24
|
self.required_guesses = required_guesses
|
|
14
25
|
|
|
File without changes
|
|
@@ -4,7 +4,6 @@ from typing import Any
|
|
|
4
4
|
from rapidata.api_client.models.simple_workflow_model import SimpleWorkflowModel
|
|
5
5
|
from rapidata.rapidata_client.feature_flags import FeatureFlags
|
|
6
6
|
from rapidata.rapidata_client.referee.base_referee import Referee
|
|
7
|
-
from rapidata.rapidata_client.referee.naive_referee import NaiveReferee
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
class Workflow(ABC):
|
|
@@ -36,4 +35,4 @@ class Workflow(ABC):
|
|
|
36
35
|
|
|
37
36
|
def feature_flags(self, feature_flags: FeatureFlags):
|
|
38
37
|
self._feature_flags = feature_flags
|
|
39
|
-
return self
|
|
38
|
+
return self
|
|
@@ -6,6 +6,21 @@ from rapidata.rapidata_client.workflow import Workflow
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class ClassifyWorkflow(Workflow):
|
|
9
|
+
"""
|
|
10
|
+
A workflow for classification tasks.
|
|
11
|
+
|
|
12
|
+
This class represents a classification workflow where a question is presented
|
|
13
|
+
along with a list of possible options for classification.
|
|
14
|
+
|
|
15
|
+
Args:
|
|
16
|
+
question (str): The classification question to be presented.
|
|
17
|
+
options (list[str]): A list of possible classification options.
|
|
18
|
+
|
|
19
|
+
Attributes:
|
|
20
|
+
_question (str): The classification question.
|
|
21
|
+
_options (list[str]): The list of classification options.
|
|
22
|
+
"""
|
|
23
|
+
|
|
9
24
|
def __init__(self, question: str, options: list[str]):
|
|
10
25
|
super().__init__(type="SimpleWorkflowConfig")
|
|
11
26
|
self._question = question
|
|
@@ -6,7 +6,26 @@ from rapidata.api_client.models.simple_workflow_model import SimpleWorkflowModel
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class CompareWorkflow(Workflow):
|
|
9
|
+
"""
|
|
10
|
+
A workflow for comparison tasks.
|
|
11
|
+
|
|
12
|
+
This class represents a comparison workflow where items are compared based on
|
|
13
|
+
specified criteria.
|
|
14
|
+
|
|
15
|
+
Attributes:
|
|
16
|
+
_criteria (str): The criteria used for comparison.
|
|
17
|
+
|
|
18
|
+
Args:
|
|
19
|
+
criteria (str): The criteria to be used for comparison.
|
|
20
|
+
"""
|
|
21
|
+
|
|
9
22
|
def __init__(self, criteria: str):
|
|
23
|
+
"""
|
|
24
|
+
Initialize a CompareWorkflow instance.
|
|
25
|
+
|
|
26
|
+
Args:
|
|
27
|
+
criteria (str): The criteria to be used for comparison.
|
|
28
|
+
"""
|
|
10
29
|
super().__init__(type="CompareWorkflowConfig")
|
|
11
30
|
self._criteria = criteria
|
|
12
31
|
|
|
@@ -15,7 +34,7 @@ class CompareWorkflow(Workflow):
|
|
|
15
34
|
**super().to_dict(),
|
|
16
35
|
"criteria": self._criteria,
|
|
17
36
|
}
|
|
18
|
-
|
|
37
|
+
|
|
19
38
|
def to_model(self) -> SimpleWorkflowModel:
|
|
20
39
|
blueprint = CompareRapidBlueprint(
|
|
21
40
|
_t="CompareBlueprint",
|
|
@@ -26,4 +45,3 @@ class CompareWorkflow(Workflow):
|
|
|
26
45
|
_t="SimpleWorkflow",
|
|
27
46
|
blueprint=SimpleWorkflowModelBlueprint(blueprint),
|
|
28
47
|
)
|
|
29
|
-
|
|
@@ -6,7 +6,26 @@ from rapidata.api_client.models.free_text_rapid_blueprint import FreeTextRapidBl
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class FreeTextWorkflow(Workflow):
|
|
9
|
+
"""
|
|
10
|
+
A workflow for free text input tasks.
|
|
11
|
+
|
|
12
|
+
This class represents a workflow where users can provide free-form text responses
|
|
13
|
+
to a given question.
|
|
14
|
+
|
|
15
|
+
Attributes:
|
|
16
|
+
_question (str): The question to be answered with free text.
|
|
17
|
+
|
|
18
|
+
Args:
|
|
19
|
+
question (str): The question to be presented for free text input.
|
|
20
|
+
"""
|
|
21
|
+
|
|
9
22
|
def __init__(self, question: str):
|
|
23
|
+
"""
|
|
24
|
+
Initialize a FreeTextWorkflow instance.
|
|
25
|
+
|
|
26
|
+
Args:
|
|
27
|
+
question (str): The question to be presented for free text input.
|
|
28
|
+
"""
|
|
10
29
|
super().__init__(type="SimpleWorkflowConfig")
|
|
11
30
|
self._question = question
|
|
12
31
|
|
|
@@ -5,11 +5,29 @@ from rapidata.rapidata_client.workflow.base_workflow import Workflow
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class TranscriptionWorkflow(Workflow):
|
|
8
|
+
"""
|
|
9
|
+
A workflow for transcription tasks.
|
|
10
|
+
|
|
11
|
+
This class represents a transcription workflow where audio or video content
|
|
12
|
+
is transcribed based on given instructions.
|
|
13
|
+
|
|
14
|
+
Attributes:
|
|
15
|
+
_instruction (str): The instruction for the transcription task.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
instruction (str): The instruction to be provided for the transcription task.
|
|
19
|
+
"""
|
|
8
20
|
|
|
9
21
|
def __init__(self, instruction: str):
|
|
22
|
+
"""
|
|
23
|
+
Initialize a TranscriptionWorkflow instance.
|
|
24
|
+
|
|
25
|
+
Args:
|
|
26
|
+
instruction (str): The instruction to be provided for the transcription task.
|
|
27
|
+
"""
|
|
10
28
|
super().__init__(type="SimpleWorkflowConfig")
|
|
11
29
|
self._instruction = instruction
|
|
12
|
-
|
|
30
|
+
|
|
13
31
|
def to_model(self) -> SimpleWorkflowModel:
|
|
14
32
|
blueprint = TranscriptionRapidBlueprint(
|
|
15
33
|
_t="TranscriptionBlueprint",
|
|
@@ -19,4 +37,4 @@ class TranscriptionWorkflow(Workflow):
|
|
|
19
37
|
return SimpleWorkflowModel(
|
|
20
38
|
_t="SimpleWorkflow",
|
|
21
39
|
blueprint=SimpleWorkflowModelBlueprint(blueprint)
|
|
22
|
-
)
|
|
40
|
+
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
rapidata/__init__.py,sha256=
|
|
1
|
+
rapidata/__init__.py,sha256=iUiqnIukWZ4ygW9_TNt7hn1ZnDROoi6vlS5MfJq0OE4,51
|
|
2
2
|
rapidata/api_client/__init__.py,sha256=O7OF-B0_pcUkvSQG7koqvwS7S_IknSuSdWTotiV5-DQ,18513
|
|
3
3
|
rapidata/api_client/api/__init__.py,sha256=NmEdKcHiQlR8hn7KMT-V5CZv9H-uPlR8ZHJR27gUq2g,524
|
|
4
4
|
rapidata/api_client/api/coco_api.py,sha256=v5xYyQVlAv4ENgihWlji3BkbczQYKxLP0gnxfQLRmkI,24926
|
|
@@ -216,17 +216,18 @@ rapidata/api_client/models/workflow_labeling_step_model.py,sha256=iXeIb78bdMhGFj
|
|
|
216
216
|
rapidata/api_client/models/workflow_split_model.py,sha256=zthOSaUl8dbLhLymLK_lrPTBpeV1a4cODLxnHmNCAZw,4474
|
|
217
217
|
rapidata/api_client/models/workflow_split_model_filter_configs_inner.py,sha256=1Fx9uZtztiiAdMXkj7YeCqt7o6VkG9lKf7D7UP_h088,7447
|
|
218
218
|
rapidata/api_client/rest.py,sha256=A8BNcRsSo-Pn6sluvAOkTONtiA8gpulLjvGX93sQiAs,9419
|
|
219
|
-
rapidata/
|
|
219
|
+
rapidata/api_client_README.md,sha256=ii243wqzBshY07DoHzg_FAIQB_56Pk3g90moaXwUXfM,29712
|
|
220
|
+
rapidata/rapidata_client/__init__.py,sha256=JUnCWjIxuAROIKid96Fz-Kiul7PmtnNofzwhTclAU2I,43
|
|
220
221
|
rapidata/rapidata_client/config.py,sha256=tQLgN6k_ATOX1GzZh38At2rgBDLStV6rJ6z0vsTTPjg,186
|
|
221
222
|
rapidata/rapidata_client/country_codes/__init__.py,sha256=Y8qeG2IMjvMGvhaPydq0nhwRQHb6dQqilctlEXu0_PE,55
|
|
222
223
|
rapidata/rapidata_client/country_codes/country_codes.py,sha256=Q0HMX7uHJQDeLCFPP5bq4iYi6pgcDWEcl2ONGhjgoeU,286
|
|
223
224
|
rapidata/rapidata_client/dataset/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
224
225
|
rapidata/rapidata_client/dataset/rapidata_dataset.py,sha256=J5jlSIbdswhqXHOq8Qf9gtzVF70cImq9sioDG7S9Mxs,2457
|
|
225
|
-
rapidata/rapidata_client/dataset/rapidata_validation_set.py,sha256=
|
|
226
|
+
rapidata/rapidata_client/dataset/rapidata_validation_set.py,sha256=oQUtAF9ouLWg9AXkHXlnbEsPb8w9zxeKTw2YbSIk3ic,4475
|
|
226
227
|
rapidata/rapidata_client/dataset/validation_rapid_parts.py,sha256=SIeQesEXPPOW5kclxYLNWaKllBXHm7DQKBdMU-GXnfc,2104
|
|
227
|
-
rapidata/rapidata_client/dataset/validation_set_builder.py,sha256=
|
|
228
|
+
rapidata/rapidata_client/dataset/validation_set_builder.py,sha256=_g7acP7lqYMI_5U9q1T6YHuUQ1ZDfZbLJ-QoqsGME4o,7463
|
|
228
229
|
rapidata/rapidata_client/feature_flags/__init__.py,sha256=BNG_NQ4CrrC61fAWliImr8r581pIvegrkepVVbxcBw8,55
|
|
229
|
-
rapidata/rapidata_client/feature_flags/feature_flags.py,sha256=
|
|
230
|
+
rapidata/rapidata_client/feature_flags/feature_flags.py,sha256=uQrLuH8X5XqBHARMiw6HsIdZuCtSgBAgtTHrNxljkSs,3529
|
|
230
231
|
rapidata/rapidata_client/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
231
232
|
rapidata/rapidata_client/metadata/base_metadata.py,sha256=BJoZT4lRs94lu7PE3__LcsMINHNDVKRKRART-EKzSaw,217
|
|
232
233
|
rapidata/rapidata_client/metadata/private_text_metadata.py,sha256=VJ_SJwp8OMFZLuUMRWvPeKOySXYJuGr-YgpwuLfTbmo,517
|
|
@@ -234,12 +235,13 @@ rapidata/rapidata_client/metadata/prompt_metadata.py,sha256=_FypjKWrC3iKUO_G2CVw
|
|
|
234
235
|
rapidata/rapidata_client/metadata/transcription_metadata.py,sha256=THtDEVCON4UlcXHmXrjilaOLHys4TrktUOPGWnXaCcc,631
|
|
235
236
|
rapidata/rapidata_client/order/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
236
237
|
rapidata/rapidata_client/order/rapidata_order.py,sha256=VRDLTPBf2k6UihF0DnWq3nfBLWExfWHzh3T-cJgFF1w,2437
|
|
237
|
-
rapidata/rapidata_client/order/rapidata_order_builder.py,sha256=
|
|
238
|
-
rapidata/rapidata_client/rapidata_client.py,sha256=
|
|
238
|
+
rapidata/rapidata_client/order/rapidata_order_builder.py,sha256=qGfdmO3wdQMDwlW5NTM8x5ll8YmC0UUuUkGtyzGMObU,8105
|
|
239
|
+
rapidata/rapidata_client/rapidata_client.py,sha256=z3vz5_GNivnShj7kqii-eUff16rvwSy62zwi8WZqAWo,2776
|
|
239
240
|
rapidata/rapidata_client/referee/__init__.py,sha256=x0AxGCsR6TlDjfqQ00lB9V7QVS9EZCJzweNEIzx42PI,207
|
|
240
241
|
rapidata/rapidata_client/referee/base_referee.py,sha256=bMy7cw0a-pGNbFu6u_1_Jplu0A483Ubj4oDQzh8vu8k,493
|
|
241
|
-
rapidata/rapidata_client/referee/classify_early_stopping_referee.py,sha256=
|
|
242
|
-
rapidata/rapidata_client/referee/naive_referee.py,sha256=
|
|
242
|
+
rapidata/rapidata_client/referee/classify_early_stopping_referee.py,sha256=B5wsqKM3_Oc1TU_MFGiIyiXjwK1LcmaVjhzLdaL8Cgw,1797
|
|
243
|
+
rapidata/rapidata_client/referee/naive_referee.py,sha256=KWMLSc73gOdM8YT_ciFhfN7J4eKgtOFphBG9tIra9g0,1179
|
|
244
|
+
rapidata/rapidata_client/selection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
243
245
|
rapidata/rapidata_client/selection/base_selection.py,sha256=Y3HkROPm4I4HLNiR0HuHKpvk236KkRlsoDxQATm_chY,138
|
|
244
246
|
rapidata/rapidata_client/selection/demographic_selection.py,sha256=DU8YvAj-WFALMAQJgjvBm1_ruIdPg2JVuKw07f7nDuA,453
|
|
245
247
|
rapidata/rapidata_client/selection/labeling_selection.py,sha256=cqDMQEXfQGMmgIvPgGOYgIGaXflV_J7LZsGOsakLXqo,425
|
|
@@ -247,17 +249,17 @@ rapidata/rapidata_client/selection/validation_selection.py,sha256=HswzD2SvZZWisN
|
|
|
247
249
|
rapidata/rapidata_client/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
248
250
|
rapidata/rapidata_client/utils/utils.py,sha256=Fl99gCnh_HnieIp099xEvEv4g2kEIKiFcUp0G2iz6x8,815
|
|
249
251
|
rapidata/rapidata_client/workflow/__init__.py,sha256=CDG8bKOBhLV4A0uBlqOd__79fH9KW3-UlZsR1RANLf0,250
|
|
250
|
-
rapidata/rapidata_client/workflow/base_workflow.py,sha256=
|
|
251
|
-
rapidata/rapidata_client/workflow/classify_workflow.py,sha256=
|
|
252
|
-
rapidata/rapidata_client/workflow/compare_workflow.py,sha256=
|
|
253
|
-
rapidata/rapidata_client/workflow/free_text_workflow.py,sha256=
|
|
254
|
-
rapidata/rapidata_client/workflow/transcription_workflow.py,sha256=
|
|
252
|
+
rapidata/rapidata_client/workflow/base_workflow.py,sha256=VoZtNIFoylTrylMWC7CqzuSCLfG2yEGCmenf-HBzYOI,1196
|
|
253
|
+
rapidata/rapidata_client/workflow/classify_workflow.py,sha256=NkyyBrlCDqYVQaCARR9EHYuREEtXond69kD6jbzcN3M,1713
|
|
254
|
+
rapidata/rapidata_client/workflow/compare_workflow.py,sha256=nqrgtohlXBfgHh_cRPOFAlwdI8wVc7PUsH0FDM7wIjg,1431
|
|
255
|
+
rapidata/rapidata_client/workflow/free_text_workflow.py,sha256=VaypoG3yKgsbtVyqxta3W28eDwdnGebCy2xDWPCBMyo,1566
|
|
256
|
+
rapidata/rapidata_client/workflow/transcription_workflow.py,sha256=_KDtGCdRhauJm3jQHpwhY-Hq79CLg5I8q2RgOz5lo1g,1404
|
|
255
257
|
rapidata/service/__init__.py,sha256=s9bS1AJZaWIhLtJX_ZA40_CK39rAAkwdAmymTMbeWl4,68
|
|
256
258
|
rapidata/service/local_file_service.py,sha256=pgorvlWcx52Uh3cEG6VrdMK_t__7dacQ_5AnfY14BW8,877
|
|
257
259
|
rapidata/service/openapi_service.py,sha256=-vrM2jEzQxr9KAerOYkVhpvMEeHwjzRwm9L_VFyzOT0,1537
|
|
258
260
|
rapidata/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
259
261
|
rapidata/utils/image_utils.py,sha256=TldO3eJWG8IhfJjm5MfNGO0mEDm1mQTsRoA0HLU1Uxs,404
|
|
260
|
-
rapidata-0.1.
|
|
261
|
-
rapidata-0.1.
|
|
262
|
-
rapidata-0.1.
|
|
263
|
-
rapidata-0.1.
|
|
262
|
+
rapidata-0.1.23.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
263
|
+
rapidata-0.1.23.dist-info/METADATA,sha256=KwJViXo2Zd925MIu9HXnXhJr9aNfHXHiLzrUfZENBww,924
|
|
264
|
+
rapidata-0.1.23.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
265
|
+
rapidata-0.1.23.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|