rapidata 2.27.0__py3-none-any.whl → 2.27.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.
Potentially problematic release.
This version of rapidata might be problematic. Click here for more details.
- rapidata/__init__.py +1 -1
- rapidata/rapidata_client/order/rapidata_order_manager.py +3 -0
- rapidata/service/credential_manager.py +6 -6
- {rapidata-2.27.0.dist-info → rapidata-2.27.1.dist-info}/METADATA +1 -1
- {rapidata-2.27.0.dist-info → rapidata-2.27.1.dist-info}/RECORD +7 -7
- {rapidata-2.27.0.dist-info → rapidata-2.27.1.dist-info}/LICENSE +0 -0
- {rapidata-2.27.0.dist-info → rapidata-2.27.1.dist-info}/WHEEL +0 -0
rapidata/__init__.py
CHANGED
|
@@ -77,6 +77,9 @@ class RapidataOrderManager:
|
|
|
77
77
|
private_notes: list[str] | None = None,
|
|
78
78
|
default_labeling_amount: int = 3
|
|
79
79
|
) -> RapidataOrder:
|
|
80
|
+
|
|
81
|
+
if not assets:
|
|
82
|
+
raise ValueError("No datapoints provided")
|
|
80
83
|
|
|
81
84
|
if contexts and len(contexts) != len(assets):
|
|
82
85
|
raise ValueError("Number of contexts must match number of datapoints")
|
|
@@ -81,7 +81,9 @@ class CredentialManager:
|
|
|
81
81
|
|
|
82
82
|
# Ensure file is only readable by the user
|
|
83
83
|
os.chmod(self.config_path, 0o600)
|
|
84
|
-
logger.debug(
|
|
84
|
+
logger.debug(
|
|
85
|
+
f"Set permissions for {self.config_path} to read/write for user only."
|
|
86
|
+
)
|
|
85
87
|
|
|
86
88
|
def _store_credential(self, credential: ClientCredential) -> None:
|
|
87
89
|
credentials = self._read_credentials()
|
|
@@ -128,16 +130,14 @@ class CredentialManager:
|
|
|
128
130
|
if self.endpoint in credentials:
|
|
129
131
|
del credentials[self.endpoint]
|
|
130
132
|
self._write_credentials(credentials)
|
|
131
|
-
logger.info(
|
|
132
|
-
f"Credentials for {self.endpoint} have been reset."
|
|
133
|
-
)
|
|
133
|
+
logger.info(f"Credentials for {self.endpoint} have been reset.")
|
|
134
134
|
|
|
135
135
|
def _get_bridge_tokens(self) -> Optional[BridgeToken]:
|
|
136
136
|
"""Get bridge tokens from the identity endpoint."""
|
|
137
137
|
logger.debug("Getting bridge tokens")
|
|
138
138
|
try:
|
|
139
139
|
bridge_endpoint = (
|
|
140
|
-
f"{self.endpoint}/
|
|
140
|
+
f"{self.endpoint}/identity/bridge-token?clientId=rapidata-cli"
|
|
141
141
|
)
|
|
142
142
|
response = requests.post(bridge_endpoint, verify=self.cert_path)
|
|
143
143
|
if not response.ok:
|
|
@@ -152,7 +152,7 @@ class CredentialManager:
|
|
|
152
152
|
|
|
153
153
|
def _poll_read_key(self, read_key: str) -> Optional[str]:
|
|
154
154
|
"""Poll the read key endpoint until we get an access token."""
|
|
155
|
-
read_endpoint = f"{self.endpoint}/
|
|
155
|
+
read_endpoint = f"{self.endpoint}/identity/bridge-token"
|
|
156
156
|
start_time = time.time()
|
|
157
157
|
|
|
158
158
|
while time.time() - start_time < self.poll_timeout:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
rapidata/__init__.py,sha256=
|
|
1
|
+
rapidata/__init__.py,sha256=P4_FhQ7RXT8JMZ40uVa-5pgfgP_ybIgZKQBWkb5hfVI,812
|
|
2
2
|
rapidata/api_client/__init__.py,sha256=OKVtwJHhPEDMHcdwyS0T5ly3puaJL8jr3X6xUH48cSY,28120
|
|
3
3
|
rapidata/api_client/api/__init__.py,sha256=Dv6v1tCJS4BLVM5BN9k5iRMNMyglhqZ4n8vyoqkLZZw,1292
|
|
4
4
|
rapidata/api_client/api/campaign_api.py,sha256=1ajX0hSnA4O5GacJLIGkAgorPlNDRVaEZY029Pkutl4,71353
|
|
@@ -482,7 +482,7 @@ rapidata/rapidata_client/order/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
|
|
|
482
482
|
rapidata/rapidata_client/order/_rapidata_dataset.py,sha256=JVGsiBa_BL0E7UZOHZ4uABr1jDVpbTiAQFO9pF2isVA,18891
|
|
483
483
|
rapidata/rapidata_client/order/_rapidata_order_builder.py,sha256=x-2lpW6Jwlq-9XRz91beWNv2TgdEA-q4b_RhOSr7vhQ,14405
|
|
484
484
|
rapidata/rapidata_client/order/rapidata_order.py,sha256=s-UslcdNqhVgZc38cFXFuJMXsRbMHgXOB7XO4dYQzd0,12476
|
|
485
|
-
rapidata/rapidata_client/order/rapidata_order_manager.py,sha256=
|
|
485
|
+
rapidata/rapidata_client/order/rapidata_order_manager.py,sha256=6UmqD8k8Q0M4_w1G-Jzn1LNFokC3o43LQNdiKSbW2f0,38291
|
|
486
486
|
rapidata/rapidata_client/order/rapidata_results.py,sha256=UllYpuqpm2inKdRNhClaUwApuxsMLrvrGDsrHA5KqbY,8111
|
|
487
487
|
rapidata/rapidata_client/rapidata_client.py,sha256=iAycSS8Dyt0_xnILpU5N9DoeGlB3v2UtlinmxcFh-eo,4029
|
|
488
488
|
rapidata/rapidata_client/referee/__init__.py,sha256=q0Hv9nmfEpyChejtyMLT8hWKL0vTTf_UgUXPYNJ-H6M,153
|
|
@@ -531,10 +531,10 @@ rapidata/rapidata_client/workflow/_ranking_workflow.py,sha256=Qn15Y3BlrA735v5prO
|
|
|
531
531
|
rapidata/rapidata_client/workflow/_select_words_workflow.py,sha256=juTW4TPnnSeBWP3K2QfO092t0u1W8I1ksY6aAtPZOi0,1225
|
|
532
532
|
rapidata/rapidata_client/workflow/_timestamp_workflow.py,sha256=tPi2zu1-SlE_ppbGbMz6MM_2LUSWxM-GA0CZRlB0qFo,1176
|
|
533
533
|
rapidata/service/__init__.py,sha256=s9bS1AJZaWIhLtJX_ZA40_CK39rAAkwdAmymTMbeWl4,68
|
|
534
|
-
rapidata/service/credential_manager.py,sha256=
|
|
534
|
+
rapidata/service/credential_manager.py,sha256=pUEEtp6VrFWYhfUUtyqmS0AlRqe2Y0kFkY6o22IT4KM,8682
|
|
535
535
|
rapidata/service/local_file_service.py,sha256=pgorvlWcx52Uh3cEG6VrdMK_t__7dacQ_5AnfY14BW8,877
|
|
536
536
|
rapidata/service/openapi_service.py,sha256=J07TB4P3cz9KCU7k_fwuMQwGXlq_nJx_m1_xHbZoCg0,4867
|
|
537
|
-
rapidata-2.27.
|
|
538
|
-
rapidata-2.27.
|
|
539
|
-
rapidata-2.27.
|
|
540
|
-
rapidata-2.27.
|
|
537
|
+
rapidata-2.27.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
538
|
+
rapidata-2.27.1.dist-info/METADATA,sha256=yxfQMFaVNypS2M_YAJdQKFJr9E6RwHtI6VR2hplC1YI,1268
|
|
539
|
+
rapidata-2.27.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
540
|
+
rapidata-2.27.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|