rapidata 2.40.3__py3-none-any.whl → 2.40.5__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.40.3"
1
+ __version__ = "2.40.5"
2
2
 
3
3
  from .rapidata_client import (
4
4
  RapidataClient,
@@ -90,7 +90,6 @@ class RapidataTracer:
90
90
  )
91
91
 
92
92
  self._tracer_provider = TracerProvider(resource=resource)
93
- trace.set_tracer_provider(self._tracer_provider)
94
93
 
95
94
  exporter = OTLPSpanExporter(
96
95
  endpoint="https://otlp-sdk.rapidata.ai/v1/traces",
@@ -100,7 +99,7 @@ class RapidataTracer:
100
99
  span_processor = BatchSpanProcessor(exporter)
101
100
  self._tracer_provider.add_span_processor(span_processor)
102
101
 
103
- self._real_tracer = trace.get_tracer(self._name)
102
+ self._real_tracer = self._tracer_provider.get_tracer(self._name)
104
103
  self._otlp_initialized = True
105
104
 
106
105
  except Exception as e:
@@ -92,6 +92,11 @@ class RapidataOrderManager:
92
92
  if media_contexts and len(media_contexts) != len(assets):
93
93
  raise ValueError("Number of media contexts must match number of datapoints")
94
94
 
95
+ if media_contexts:
96
+ for media_context in media_contexts:
97
+ if not media_context.startswith("http"):
98
+ raise ValueError("Media contexts must all be URLs")
99
+
95
100
  if sentences and len(sentences) != len(assets):
96
101
  raise ValueError("Number of sentences must match number of datapoints")
97
102
 
@@ -419,6 +424,9 @@ class RapidataOrderManager:
419
424
  """
420
425
 
421
426
  with tracer.start_as_current_span("RapidataOrderManager.create_ranking_order"):
427
+ if len(datapoints) < 2:
428
+ raise ValueError("At least two datapoints are required")
429
+
422
430
  if data_type == "media":
423
431
  assets = [MediaAsset(path=path) for path in datapoints]
424
432
  elif data_type == "text":
@@ -89,8 +89,6 @@ class RapidataClient:
89
89
  logger.debug("Initializing RapidataBenchmarkManager")
90
90
  self.mri = RapidataBenchmarkManager(openapi_service=self._openapi_service)
91
91
 
92
- self._check_beta_features()
93
-
94
92
  def reset_credentials(self):
95
93
  """Reset the credentials saved in the configuration file for the current environment."""
96
94
  self._openapi_service.reset_credentials()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: rapidata
3
- Version: 2.40.3
3
+ Version: 2.40.5
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
@@ -1,4 +1,4 @@
1
- rapidata/__init__.py,sha256=gptg5UE0WwAeX8240QsUFhS-lQFHXQui1t08HArcW-s,917
1
+ rapidata/__init__.py,sha256=bmnaWulsFcvMQ08yPv4qNBuAeGDtJXCbMlHQrtjibmY,917
2
2
  rapidata/api_client/__init__.py,sha256=utY2iWepKJQO_iGz6aIg_qSoqoDkV9pBMAA58pIFE4M,36016
3
3
  rapidata/api_client/api/__init__.py,sha256=07qqwzQiBYt5V2BtnzbXhZL2cmVHATyZmCSGshIXLck,1603
4
4
  rapidata/api_client/api/benchmark_api.py,sha256=Mlx2qDDJcgPjWvaBnps9dxvVd0re1knG0SyoLUiHKSc,119756
@@ -586,7 +586,7 @@ rapidata/rapidata_client/config/logging_config.py,sha256=ePCh7X6v0Yzkgq1MhFNsHwL
586
586
  rapidata/rapidata_client/config/managed_print.py,sha256=2T6dwgR1EZzFAdOEyPp_BBUsa-qrEuhOXgFhsSQKvRo,185
587
587
  rapidata/rapidata_client/config/order_config.py,sha256=XxRZERzUUA9md6-PVlV__eCw8DD2kPbT_UmMwG1mAS4,615
588
588
  rapidata/rapidata_client/config/rapidata_config.py,sha256=mURnKdl5-2sE4e_IYY9-aBkix6a12t47otEErGE_q0c,1507
589
- rapidata/rapidata_client/config/tracer.py,sha256=h3GXzaX79HPcip4fBhLaLW0mRlXttR7D3KA78ZT0KVw,4736
589
+ rapidata/rapidata_client/config/tracer.py,sha256=9P27QybtkjJ0U5ocPkIu58DUQB-MgVksQOMhuwKHKcY,4687
590
590
  rapidata/rapidata_client/config/upload_config.py,sha256=hjefl-w9WaCNeCEe6hdnrAQEMjgDy-r1zgUUIFR68wk,473
591
591
  rapidata/rapidata_client/country_codes/__init__.py,sha256=FB9Dcks44J6C6YBSYmTmNZ71tE130x6NO_3aLJ8fKzQ,40
592
592
  rapidata/rapidata_client/country_codes/country_codes.py,sha256=ePHqeb7y9DWQZAnddBzPx1puYBcrgUjdR2sbFijuFD8,283
@@ -635,9 +635,9 @@ rapidata/rapidata_client/order/_rapidata_order_builder.py,sha256=C-TbKELNuLjQiZt
635
635
  rapidata/rapidata_client/order/dataset/_progress_tracker.py,sha256=2e9aVMwpdBSO9P3LYn5lygNbtIGzOaJD3b9J7jYaxko,3570
636
636
  rapidata/rapidata_client/order/dataset/_rapidata_dataset.py,sha256=ONH56htEvoVZvkSItuTi3_88kaDWohmYYABSoAPEn4Q,10724
637
637
  rapidata/rapidata_client/order/rapidata_order.py,sha256=FvZi3t4dARRNsKWvYiNxVvM50AzPwQYR3AzI4utD6OI,14497
638
- rapidata/rapidata_client/order/rapidata_order_manager.py,sha256=XiV_BpJxG6d8o0rFDYhnB3_mb576CQG5hY-qVXlJZKY,42592
638
+ rapidata/rapidata_client/order/rapidata_order_manager.py,sha256=_liKhfS7vH0tilkSOeGJV5Mq3-8Nc8Vw1auXJeP7MyM,42908
639
639
  rapidata/rapidata_client/order/rapidata_results.py,sha256=weL4S14fzug3ZOJbQk9Oj-4tv2jx5aZAMp7VJ-a6Qq4,8437
640
- rapidata/rapidata_client/rapidata_client.py,sha256=Dm7ZW2tv0QNL1pMk8NHY79vpFXyPeKU6s0WMFHHIH20,5728
640
+ rapidata/rapidata_client/rapidata_client.py,sha256=yEwUsxR0OZbCb2B6QXS23WEVfNZPxRTMi2Hxto2hynw,5687
641
641
  rapidata/rapidata_client/referee/__init__.py,sha256=J8oZJNUduPr-Tmn8iJwR-qBiSv7owhUFcEzXTRETecw,155
642
642
  rapidata/rapidata_client/referee/_base_referee.py,sha256=aoH3Werw-AtQo2TncG69OmCVvnbXYJBfsRCQry_Pll0,497
643
643
  rapidata/rapidata_client/referee/_early_stopping_referee.py,sha256=_JyFcTpncI0PrLf7Ix78FtLto31sdyGDS-2QbVTuvr8,2079
@@ -690,7 +690,7 @@ rapidata/service/credential_manager.py,sha256=T3yL4tXVnibRytxjQkOC-ex3kFGQR5KcKU
690
690
  rapidata/service/local_file_service.py,sha256=0Q4LdoEtPFKzgXK2oZ1cQ-X7FipakscjGnnBH8dRFRQ,855
691
691
  rapidata/service/openapi_service.py,sha256=k3V4eMNcAjBcxEv17lDivK8LV5TEjRTL9B_5KBlhcas,5482
692
692
  rapidata/types/__init__.py,sha256=gSGrmWV5gEA6pPfAR5vwSy_DvibO5IjCZDiB7LtlMOQ,6134
693
- rapidata-2.40.3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
694
- rapidata-2.40.3.dist-info/METADATA,sha256=6hbAMN-hwKhPKu7APD4_GaZ0dBr6GDVCmEMJ2XgRv1Q,1406
695
- rapidata-2.40.3.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
696
- rapidata-2.40.3.dist-info/RECORD,,
693
+ rapidata-2.40.5.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
694
+ rapidata-2.40.5.dist-info/METADATA,sha256=fg4jX_993ZJhN7pVU31RYnQn7D_l1Wu21KJ_OSU3iug,1406
695
+ rapidata-2.40.5.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
696
+ rapidata-2.40.5.dist-info/RECORD,,