rapidata 2.1.1__py3-none-any.whl → 2.1.3__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.

@@ -332,7 +332,7 @@ class RapidataOrderManager:
332
332
 
333
333
  def create_locate_order(self,
334
334
  name: str,
335
- target: str,
335
+ instruction: str,
336
336
  datapoints: list[str],
337
337
  responses_per_datapoint: int = 10,
338
338
  contexts: list[str] | None = None,
@@ -345,7 +345,7 @@ class RapidataOrderManager:
345
345
 
346
346
  Args:
347
347
  name (str): The name of the order.
348
- target (str): The target what should be located. Will be shown along side each datapoint.
348
+ instruction (str): The instruction what should be located. Will be shown along side each datapoint.
349
349
  datapoints (list[str]): The list of datapoints for the locate - each datapoint will be labeled.
350
350
  responses_per_datapoint (int, optional): The number of responses that will be collected per datapoint. Defaults to 10.
351
351
  contexts (list[str], optional): The list of contexts for the comparison. Defaults to None.\n
@@ -362,7 +362,7 @@ class RapidataOrderManager:
362
362
 
363
363
  return self.__create_general_order(
364
364
  name=name,
365
- workflow=LocateWorkflow(target=target),
365
+ workflow=LocateWorkflow(target=instruction),
366
366
  assets=assets,
367
367
  responses_per_datapoint=responses_per_datapoint,
368
368
  contexts=contexts,
@@ -374,7 +374,7 @@ class RapidataOrderManager:
374
374
 
375
375
  def create_draw_order(self,
376
376
  name: str,
377
- target: str,
377
+ instruction: str,
378
378
  datapoints: list[str],
379
379
  responses_per_datapoint: int = 10,
380
380
  contexts: list[str] | None = None,
@@ -387,7 +387,7 @@ class RapidataOrderManager:
387
387
 
388
388
  Args:
389
389
  name (str): The name of the order.
390
- target (str): The target for how the lines should be drawn. Will be shown along side each datapoint.
390
+ instruction (str): The instruction for how the lines should be drawn. Will be shown along side each datapoint.
391
391
  datapoints (list[str]): The list of datapoints for the draw lines - each datapoint will be labeled.
392
392
  responses_per_datapoint (int, optional): The number of responses that will be collected per datapoint. Defaults to 10.
393
393
  contexts (list[str], optional): The list of contexts for the comparison. Defaults to None.\n
@@ -404,7 +404,7 @@ class RapidataOrderManager:
404
404
 
405
405
  return self.__create_general_order(
406
406
  name=name,
407
- workflow=DrawWorkflow(target=target),
407
+ workflow=DrawWorkflow(target=instruction),
408
408
  assets=assets,
409
409
  responses_per_datapoint=responses_per_datapoint,
410
410
  contexts=contexts,
@@ -62,6 +62,10 @@ class ValidationSetManager:
62
62
 
63
63
  if len(datapoints) != len(truths):
64
64
  raise ValueError("The number of datapoints and truths must be equal")
65
+
66
+ if not all([isinstance(truth, list) for truth in truths]):
67
+ raise ValueError("Truths must be a list of lists")
68
+
65
69
  if contexts and len(contexts) != len(datapoints):
66
70
  raise ValueError("The number of contexts and datapoints must be equal")
67
71
 
@@ -115,6 +119,9 @@ class ValidationSetManager:
115
119
  if len(datapoints) != len(truths):
116
120
  raise ValueError("The number of datapoints and truths must be equal")
117
121
 
122
+ if not all([isinstance(truth, list) for truth in truths]):
123
+ raise ValueError("Truths must be a list of lists")
124
+
118
125
  if contexts and len(contexts) != len(datapoints):
119
126
  raise ValueError("The number of contexts and datapoints must be equal")
120
127
 
@@ -164,6 +171,9 @@ class ValidationSetManager:
164
171
  print_confirmation (bool, optional): Whether to print a confirmation message that validation set has been created. Defaults to True.
165
172
  """
166
173
 
174
+ if not all([isinstance(truth, list) for truth in truths]):
175
+ raise ValueError("Truths must be a list of lists")
176
+
167
177
  if len(datapoints) != len(truths) or len(datapoints) != len(sentences):
168
178
  raise ValueError("The number of datapoints, truths, and sentences must be equal")
169
179
 
@@ -210,6 +220,9 @@ class ValidationSetManager:
210
220
  if len(datapoints) != len(truths):
211
221
  raise ValueError("The number of datapoints and truths must be equal")
212
222
 
223
+ if not all([isinstance(truth, list) for truth in truths]):
224
+ raise ValueError("Truths must be a list of lists")
225
+
213
226
  if contexts and len(contexts) != len(datapoints):
214
227
  raise ValueError("The number of contexts and datapoints must be equal")
215
228
 
@@ -255,6 +268,9 @@ class ValidationSetManager:
255
268
  if len(datapoints) != len(truths):
256
269
  raise ValueError("The number of datapoints and truths must be equal")
257
270
 
271
+ if not all([isinstance(truth, list) for truth in truths]):
272
+ raise ValueError("Truths must be a list of lists")
273
+
258
274
  if contexts and len(contexts) != len(datapoints):
259
275
  raise ValueError("The number of contexts and datapoints must be equal")
260
276
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: rapidata
3
- Version: 2.1.1
3
+ Version: 2.1.3
4
4
  Summary: Rapidata package containing the Rapidata Python Client to interact with the Rapidata Web API in an easy way.
5
5
  License: Apache-2.0
6
6
  Author: Rapidata AG
@@ -369,7 +369,7 @@ rapidata/rapidata_client/order/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
369
369
  rapidata/rapidata_client/order/_rapidata_dataset.py,sha256=IU0N2_LksyEDlvLq56vCkiSR45kA9I6q4pqDoEpWmMw,5240
370
370
  rapidata/rapidata_client/order/_rapidata_order_builder.py,sha256=R4iOWy8nfIHpzqqqQcQhLgpdB8z_tUrkL2M_8rZUw9M,13121
371
371
  rapidata/rapidata_client/order/rapidata_order.py,sha256=e7ZMllbOaBFqPDVApL-kemAnFLbzF9rNWyTGOKuU8Qc,5741
372
- rapidata/rapidata_client/order/rapidata_order_manager.py,sha256=cafGE546QQn0j-GBbKRCprZl6qz1jhFWuaEoDHU9Pu4,24551
372
+ rapidata/rapidata_client/order/rapidata_order_manager.py,sha256=ZTygrv5x7dWjWxXOgFcdtyei_ap6J33SJWuWB_AwXeg,24591
373
373
  rapidata/rapidata_client/rapidata_client.py,sha256=9SMOouDBwe-aIi9rnPtnL2vrqnlQHDKxOUpw-Eh3Fsg,1782
374
374
  rapidata/rapidata_client/referee/__init__.py,sha256=q0Hv9nmfEpyChejtyMLT8hWKL0vTTf_UgUXPYNJ-H6M,153
375
375
  rapidata/rapidata_client/referee/_base_referee.py,sha256=MdFOhdxt3sRnWXLDKLJZKFdVpjBGn9jypPnWWQ6msQA,496
@@ -402,7 +402,7 @@ rapidata/rapidata_client/validation/rapids/__init__.py,sha256=WU5PPwtTJlte6U90MD
402
402
  rapidata/rapidata_client/validation/rapids/box.py,sha256=t3_Kn6doKXdnJdtbwefXnYKPiTKHneJl9E2inkDSqL8,589
403
403
  rapidata/rapidata_client/validation/rapids/rapids.py,sha256=d66Z2wbLCDanT9nHDPbyYsnoBhtYQm_O1vQbn7GogBw,4214
404
404
  rapidata/rapidata_client/validation/rapids/rapids_manager.py,sha256=XkPvR4ho6wM8sbqdhY3_us4QQIbBkCwNhVbGrBrAQx0,6400
405
- rapidata/rapidata_client/validation/validation_set_manager.py,sha256=NklKsohdbkSqCWSQ2ZLd0mjuulrKdqXN6Zb3gTT851Y,16530
405
+ rapidata/rapidata_client/validation/validation_set_manager.py,sha256=kJnXVS1NqwZTvpG98f1uQGBkN17k2ncptTQhRfCEM8A,17218
406
406
  rapidata/rapidata_client/workflow/__init__.py,sha256=dpzq5EsMRmt8Q-AwFVtWethc8uhJFrqtNKqwcn0qRFY,379
407
407
  rapidata/rapidata_client/workflow/_base_workflow.py,sha256=XyIZFKS_RxAuwIHS848S3AyLEHqd07oTD_5jm2oUbsw,762
408
408
  rapidata/rapidata_client/workflow/_classify_workflow.py,sha256=9bT54wxVJgxC-zLk6MVNbseFpzYrvFPjt7DHvxqYfnk,1736
@@ -417,7 +417,7 @@ rapidata/service/credential_manager.py,sha256=Of0BQs_V1T7rkrWX9groLX790nOknaARwn
417
417
  rapidata/service/local_file_service.py,sha256=pgorvlWcx52Uh3cEG6VrdMK_t__7dacQ_5AnfY14BW8,877
418
418
  rapidata/service/openapi_service.py,sha256=Z4NrAuilLlIWBdGOv6otz36tHS_vvU36w5jmvOUTmqo,3198
419
419
  rapidata/service/token_manager.py,sha256=JZ5YbR5Di8dO3H4kK11d0kzWlrXxjgCmeNkHA4AapCM,6425
420
- rapidata-2.1.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
421
- rapidata-2.1.1.dist-info/METADATA,sha256=pkkjH7KXUPIDAjznVH_3B2ih6X3G44rzU0kjDQAISBA,1067
422
- rapidata-2.1.1.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
423
- rapidata-2.1.1.dist-info/RECORD,,
420
+ rapidata-2.1.3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
421
+ rapidata-2.1.3.dist-info/METADATA,sha256=qtAlYurcVv92pq9I3LzFMppkg2RpmJAGg7CruP5rW50,1067
422
+ rapidata-2.1.3.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
423
+ rapidata-2.1.3.dist-info/RECORD,,