rapidata 2.42.0__py3-none-any.whl → 2.42.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 CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "2.42.0"
1
+ __version__ = "2.42.1"
2
2
 
3
3
  from .rapidata_client import (
4
4
  RapidataClient,
@@ -130,11 +130,10 @@ class BenchmarkParticipant:
130
130
  successful_id, failed_id = future.result()
131
131
  if successful_id:
132
132
  successful_uploads.append(successful_id)
133
+ pbar.update(1)
133
134
  if failed_id:
134
135
  failed_uploads.append(failed_id)
135
136
  except Exception as e:
136
137
  logger.error(f"Future execution failed: {str(e)}")
137
138
 
138
- pbar.update(1)
139
-
140
139
  return successful_uploads, failed_uploads
@@ -87,9 +87,7 @@ class RapidataDataset:
87
87
  chunk_successful, chunk_failed = future.result()
88
88
  successful_uploads.extend(chunk_successful)
89
89
  failed_uploads.extend(chunk_failed)
90
- progress_bar.update(
91
- len(chunk_successful) + len(chunk_failed)
92
- )
90
+ progress_bar.update(len(chunk_successful))
93
91
  except Exception as e:
94
92
  logger.error("Future execution failed: %s", str(e))
95
93
 
@@ -394,8 +394,12 @@ class RapidataOrderManager:
394
394
 
395
395
  metadatas: list[Metadata] = []
396
396
  if context:
397
+ if not isinstance(context, str) or context == "":
398
+ raise ValueError("Context must be a non-empty string")
397
399
  metadatas.append(PromptMetadata(context))
398
400
  if media_context:
401
+ if not isinstance(media_context, str) or media_context == "":
402
+ raise ValueError("Media context must be a non-empty string")
399
403
  metadatas.append(
400
404
  MediaAssetMetadata(
401
405
  self.__asset_uploader.upload_asset(media_context)
@@ -68,6 +68,7 @@ class ValidationSetManager:
68
68
  payload=workflow._to_payload(datapoint),
69
69
  context=datapoint.context,
70
70
  media_context=datapoint.media_context,
71
+ data_type=datapoint.data_type,
71
72
  settings=settings,
72
73
  )
73
74
  )
@@ -602,16 +603,27 @@ class ValidationSetManager:
602
603
  with tracer.start_as_current_span("Adding rapids to validation set"):
603
604
  logger.debug("Adding rapids to validation set")
604
605
  failed_rapids = []
605
- for rapid in tqdm(
606
- rapids,
606
+
607
+ progress_bar = tqdm(
608
+ total=len(rapids),
607
609
  desc="Uploading validation tasks",
608
610
  disable=rapidata_config.logging.silent_mode,
609
- ):
611
+ )
612
+
613
+ for rapid in rapids:
610
614
  try:
611
615
  validation_set.add_rapid(rapid)
612
- except Exception:
616
+ progress_bar.update(1)
617
+ except Exception as e:
618
+ logger.error(
619
+ "Failed to add rapid %s to validation set.\nError: %s",
620
+ rapid.asset,
621
+ str(e),
622
+ )
613
623
  failed_rapids.append(rapid.asset)
614
624
 
625
+ progress_bar.close()
626
+
615
627
  if failed_rapids:
616
628
  logger.error(
617
629
  "Failed to add %s datapoints to validation set: %s",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rapidata
3
- Version: 2.42.0
3
+ Version: 2.42.1
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
  License-File: LICENSE
@@ -1,4 +1,4 @@
1
- rapidata/__init__.py,sha256=roL01zFnKWgCl3QC0K9IZXbVXJlhD3Zetm-KvzZuADU,875
1
+ rapidata/__init__.py,sha256=xehd_ZwEeDJiyi16vxESrbmquLe0M-xJ7EnOeEoYyx8,875
2
2
  rapidata/api_client/__init__.py,sha256=XPkW8ICNg5gdm9W2XAsN0362A4p9VP00dgMlK_Ajurs,36360
3
3
  rapidata/api_client/api/__init__.py,sha256=Bu7flZpOz939kSgx0YPid9wdKtougs9MMd8hSnJvM2s,1658
4
4
  rapidata/api_client/api/asset_api.py,sha256=buYMBGvg5_SLkJ7aG07c7_1rT6TXTCqoLfoV8O2nJhM,34442
@@ -599,7 +599,7 @@ rapidata/rapidata_client/benchmark/_detail_mapper.py,sha256=HmzJwR2dojs0c2PaEJ5l
599
599
  rapidata/rapidata_client/benchmark/leaderboard/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
600
600
  rapidata/rapidata_client/benchmark/leaderboard/rapidata_leaderboard.py,sha256=BPNTrKeEGvISdzAe_OpIIUtdX4tYgh_2g9w7YOnytA4,7840
601
601
  rapidata/rapidata_client/benchmark/participant/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
602
- rapidata/rapidata_client/benchmark/participant/_participant.py,sha256=R06eOMt-BSJkULwypU-z-sQhKDw9uswfp-rMeZhjndU,5337
602
+ rapidata/rapidata_client/benchmark/participant/_participant.py,sha256=rrjWkH8MO-Jow0Tpg4ejMmhyD2h-_s1-YzM2Seeu_Z8,5344
603
603
  rapidata/rapidata_client/benchmark/rapidata_benchmark.py,sha256=9Xk7WhuD8C7gPv2C4QVR_EdyKlIxjPiddHM6s3-dBT0,19925
604
604
  rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py,sha256=5f7tLU39wyOt8rc-3MEqVdc6ANmP2j6hfzAupTCbHD0,8870
605
605
  rapidata/rapidata_client/config/__init__.py,sha256=AdL9mKlOa_xm3spFKPBBdTYzhioQh7-UvXd6t84wlDk,238
@@ -650,9 +650,9 @@ rapidata/rapidata_client/filter/response_count_filter.py,sha256=i2u2YQD3_RLQRZyq
650
650
  rapidata/rapidata_client/filter/user_score_filter.py,sha256=4B3Zzp7aosDFmte3nLPTlXMN4zatT6Wcq5QLIoXqhgI,1910
651
651
  rapidata/rapidata_client/order/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
652
652
  rapidata/rapidata_client/order/_rapidata_order_builder.py,sha256=RZwRyPzxR_D3aVZU-K98-FqIbOpzXNmmkJzzmYwYJnU,16828
653
- rapidata/rapidata_client/order/dataset/_rapidata_dataset.py,sha256=QrDs57WJ7PsSKduLwDCvvzY2gKy3ISvkJeGkCA_Izo4,6427
653
+ rapidata/rapidata_client/order/dataset/_rapidata_dataset.py,sha256=8EhoRVBxWMbp1mtS56Uogg2dwFC2vySw5hNqTPDTHzM,6345
654
654
  rapidata/rapidata_client/order/rapidata_order.py,sha256=FvZi3t4dARRNsKWvYiNxVvM50AzPwQYR3AzI4utD6OI,14497
655
- rapidata/rapidata_client/order/rapidata_order_manager.py,sha256=5gN4g8O7vy5X2KXvoJ79O_DrJScYCkgz3MVupOYwyV4,41065
655
+ rapidata/rapidata_client/order/rapidata_order_manager.py,sha256=VgiqCUuPQ4bWVubLTOFmr7_DPdClsoGw3LPHLr3hRhA,41365
656
656
  rapidata/rapidata_client/order/rapidata_results.py,sha256=weL4S14fzug3ZOJbQk9Oj-4tv2jx5aZAMp7VJ-a6Qq4,8437
657
657
  rapidata/rapidata_client/rapidata_client.py,sha256=5BJMstjJFmBwkflC_YnzlhoOF3SKP3u2wQ56G_hvB3Q,5862
658
658
  rapidata/rapidata_client/referee/__init__.py,sha256=J8oZJNUduPr-Tmn8iJwR-qBiSv7owhUFcEzXTRETecw,155
@@ -692,7 +692,7 @@ rapidata/rapidata_client/validation/rapids/_validation_rapid_uploader.py,sha256=
692
692
  rapidata/rapidata_client/validation/rapids/box.py,sha256=sJbxOpz86MplXmZl6gquzgQzpFIW8fw-F0eyQY4ClDo,1486
693
693
  rapidata/rapidata_client/validation/rapids/rapids.py,sha256=W1RmASR33GP0C8r9iaPzFV6InI7_fz0VmU6ry3YKfdA,1002
694
694
  rapidata/rapidata_client/validation/rapids/rapids_manager.py,sha256=YqGxnqJ2vYfAywXJDujQEBrYnlf0URdLxQ7hTR1JeOI,16225
695
- rapidata/rapidata_client/validation/validation_set_manager.py,sha256=pSJtDOXUOSF6EvtDGkCvBH8yWLqnVDI-sMMy27o_Odg,34679
695
+ rapidata/rapidata_client/validation/validation_set_manager.py,sha256=3HWFh3q0ykWGg1XK3TGr7AydLdYvIPMo1IofhI-ygGA,35068
696
696
  rapidata/rapidata_client/workflow/__init__.py,sha256=6kfMN7TQVpiQNGjNHg3X7KdnCyYe3K2TIq7ZVEatQcU,476
697
697
  rapidata/rapidata_client/workflow/_base_workflow.py,sha256=iuWomsy1zIcIxLzYTBKmAHs4sQ_D4xQkMaNWqf57y3E,1461
698
698
  rapidata/rapidata_client/workflow/_classify_workflow.py,sha256=gJ-Us3bCzbgiTyIKWLFjCJQS6ClqAnObLtZgCJGUASI,2546
@@ -709,7 +709,7 @@ rapidata/service/credential_manager.py,sha256=T3yL4tXVnibRytxjQkOC-ex3kFGQR5KcKU
709
709
  rapidata/service/local_file_service.py,sha256=0Q4LdoEtPFKzgXK2oZ1cQ-X7FipakscjGnnBH8dRFRQ,855
710
710
  rapidata/service/openapi_service.py,sha256=E2zVagI_ri15PK06ITO_VNKYDJ0VZQG1YQ1T6bEIVsY,5566
711
711
  rapidata/types/__init__.py,sha256=gSGrmWV5gEA6pPfAR5vwSy_DvibO5IjCZDiB7LtlMOQ,6134
712
- rapidata-2.42.0.dist-info/METADATA,sha256=pOYML-smhuxiQ7YqVTtT0COMEk3QuZVcj6HLKVukUcM,1479
713
- rapidata-2.42.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
714
- rapidata-2.42.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
715
- rapidata-2.42.0.dist-info/RECORD,,
712
+ rapidata-2.42.1.dist-info/METADATA,sha256=FMRDd6u609MTV71EUQQKT4s3cbFa6aUlpdqxXJyMw0g,1479
713
+ rapidata-2.42.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
714
+ rapidata-2.42.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
715
+ rapidata-2.42.1.dist-info/RECORD,,