rapidata 2.29.1__py3-none-any.whl → 2.30.0__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/api_client/__init__.py +5 -0
- rapidata/api_client/api/benchmark_api.py +283 -0
- rapidata/api_client/api/leaderboard_api.py +562 -0
- rapidata/api_client/models/__init__.py +5 -0
- rapidata/api_client/models/file_type.py +1 -0
- rapidata/api_client/models/file_type_metadata.py +2 -2
- rapidata/api_client/models/file_type_metadata_model.py +2 -2
- rapidata/api_client/models/prompt_by_benchmark_result.py +19 -3
- rapidata/api_client/models/run_status.py +39 -0
- rapidata/api_client/models/runs_by_leaderboard_result.py +110 -0
- rapidata/api_client/models/runs_by_leaderboard_result_paged_result.py +105 -0
- rapidata/api_client/models/update_benchmark_name_model.py +87 -0
- rapidata/api_client/models/update_leaderboard_name_model.py +87 -0
- rapidata/api_client_README.md +8 -0
- rapidata/rapidata_client/benchmark/leaderboard/rapidata_leaderboard.py +9 -0
- rapidata/rapidata_client/benchmark/rapidata_benchmark.py +66 -12
- rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py +24 -6
- rapidata/rapidata_client/order/_rapidata_order_builder.py +13 -9
- rapidata/rapidata_client/order/rapidata_order_manager.py +2 -13
- {rapidata-2.29.1.dist-info → rapidata-2.30.0.dist-info}/METADATA +1 -1
- {rapidata-2.29.1.dist-info → rapidata-2.30.0.dist-info}/RECORD +24 -19
- {rapidata-2.29.1.dist-info → rapidata-2.30.0.dist-info}/LICENSE +0 -0
- {rapidata-2.29.1.dist-info → rapidata-2.30.0.dist-info}/WHEEL +0 -0
rapidata/__init__.py
CHANGED
rapidata/api_client/__init__.py
CHANGED
|
@@ -338,6 +338,9 @@ from rapidata.api_client.models.report_model import ReportModel
|
|
|
338
338
|
from rapidata.api_client.models.response_count_user_filter_model import ResponseCountUserFilterModel
|
|
339
339
|
from rapidata.api_client.models.retrieval_mode import RetrievalMode
|
|
340
340
|
from rapidata.api_client.models.root_filter import RootFilter
|
|
341
|
+
from rapidata.api_client.models.run_status import RunStatus
|
|
342
|
+
from rapidata.api_client.models.runs_by_leaderboard_result import RunsByLeaderboardResult
|
|
343
|
+
from rapidata.api_client.models.runs_by_leaderboard_result_paged_result import RunsByLeaderboardResultPagedResult
|
|
341
344
|
from rapidata.api_client.models.scrub_payload import ScrubPayload
|
|
342
345
|
from rapidata.api_client.models.scrub_range import ScrubRange
|
|
343
346
|
from rapidata.api_client.models.scrub_rapid_blueprint import ScrubRapidBlueprint
|
|
@@ -387,9 +390,11 @@ from rapidata.api_client.models.transcription_word import TranscriptionWord
|
|
|
387
390
|
from rapidata.api_client.models.translated_prompt_metadata_model import TranslatedPromptMetadataModel
|
|
388
391
|
from rapidata.api_client.models.translated_string import TranslatedString
|
|
389
392
|
from rapidata.api_client.models.unlock_order_result import UnlockOrderResult
|
|
393
|
+
from rapidata.api_client.models.update_benchmark_name_model import UpdateBenchmarkNameModel
|
|
390
394
|
from rapidata.api_client.models.update_campaign_model import UpdateCampaignModel
|
|
391
395
|
from rapidata.api_client.models.update_dataset_name_model import UpdateDatasetNameModel
|
|
392
396
|
from rapidata.api_client.models.update_dimensions_model import UpdateDimensionsModel
|
|
397
|
+
from rapidata.api_client.models.update_leaderboard_name_model import UpdateLeaderboardNameModel
|
|
393
398
|
from rapidata.api_client.models.update_order_name_model import UpdateOrderNameModel
|
|
394
399
|
from rapidata.api_client.models.update_validation_rapid_model import UpdateValidationRapidModel
|
|
395
400
|
from rapidata.api_client.models.update_validation_rapid_model_truth import UpdateValidationRapidModelTruth
|
|
@@ -31,6 +31,7 @@ from rapidata.api_client.models.prompt_by_benchmark_result_paged_result import P
|
|
|
31
31
|
from rapidata.api_client.models.query_model import QueryModel
|
|
32
32
|
from rapidata.api_client.models.submit_participant_result import SubmitParticipantResult
|
|
33
33
|
from rapidata.api_client.models.submit_prompt_model import SubmitPromptModel
|
|
34
|
+
from rapidata.api_client.models.update_benchmark_name_model import UpdateBenchmarkNameModel
|
|
34
35
|
|
|
35
36
|
from rapidata.api_client.api_client import ApiClient, RequestSerialized
|
|
36
37
|
from rapidata.api_client.api_response import ApiResponse
|
|
@@ -563,6 +564,288 @@ class BenchmarkApi:
|
|
|
563
564
|
|
|
564
565
|
|
|
565
566
|
|
|
567
|
+
@validate_call
|
|
568
|
+
def benchmark_benchmark_id_name_put(
|
|
569
|
+
self,
|
|
570
|
+
benchmark_id: StrictStr,
|
|
571
|
+
update_benchmark_name_model: Optional[UpdateBenchmarkNameModel] = None,
|
|
572
|
+
_request_timeout: Union[
|
|
573
|
+
None,
|
|
574
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
575
|
+
Tuple[
|
|
576
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
577
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
578
|
+
]
|
|
579
|
+
] = None,
|
|
580
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
581
|
+
_content_type: Optional[StrictStr] = None,
|
|
582
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
583
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
584
|
+
) -> None:
|
|
585
|
+
"""Updates the name of a benchmark.
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
:param benchmark_id: (required)
|
|
589
|
+
:type benchmark_id: str
|
|
590
|
+
:param update_benchmark_name_model:
|
|
591
|
+
:type update_benchmark_name_model: UpdateBenchmarkNameModel
|
|
592
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
593
|
+
number provided, it will be total request
|
|
594
|
+
timeout. It can also be a pair (tuple) of
|
|
595
|
+
(connection, read) timeouts.
|
|
596
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
597
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
598
|
+
request; this effectively ignores the
|
|
599
|
+
authentication in the spec for a single request.
|
|
600
|
+
:type _request_auth: dict, optional
|
|
601
|
+
:param _content_type: force content-type for the request.
|
|
602
|
+
:type _content_type: str, Optional
|
|
603
|
+
:param _headers: set to override the headers for a single
|
|
604
|
+
request; this effectively ignores the headers
|
|
605
|
+
in the spec for a single request.
|
|
606
|
+
:type _headers: dict, optional
|
|
607
|
+
:param _host_index: set to override the host_index for a single
|
|
608
|
+
request; this effectively ignores the host_index
|
|
609
|
+
in the spec for a single request.
|
|
610
|
+
:type _host_index: int, optional
|
|
611
|
+
:return: Returns the result object.
|
|
612
|
+
""" # noqa: E501
|
|
613
|
+
|
|
614
|
+
_param = self._benchmark_benchmark_id_name_put_serialize(
|
|
615
|
+
benchmark_id=benchmark_id,
|
|
616
|
+
update_benchmark_name_model=update_benchmark_name_model,
|
|
617
|
+
_request_auth=_request_auth,
|
|
618
|
+
_content_type=_content_type,
|
|
619
|
+
_headers=_headers,
|
|
620
|
+
_host_index=_host_index
|
|
621
|
+
)
|
|
622
|
+
|
|
623
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
624
|
+
'204': None,
|
|
625
|
+
}
|
|
626
|
+
response_data = self.api_client.call_api(
|
|
627
|
+
*_param,
|
|
628
|
+
_request_timeout=_request_timeout
|
|
629
|
+
)
|
|
630
|
+
response_data.read()
|
|
631
|
+
return self.api_client.response_deserialize(
|
|
632
|
+
response_data=response_data,
|
|
633
|
+
response_types_map=_response_types_map,
|
|
634
|
+
).data
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
@validate_call
|
|
638
|
+
def benchmark_benchmark_id_name_put_with_http_info(
|
|
639
|
+
self,
|
|
640
|
+
benchmark_id: StrictStr,
|
|
641
|
+
update_benchmark_name_model: Optional[UpdateBenchmarkNameModel] = None,
|
|
642
|
+
_request_timeout: Union[
|
|
643
|
+
None,
|
|
644
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
645
|
+
Tuple[
|
|
646
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
647
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
648
|
+
]
|
|
649
|
+
] = None,
|
|
650
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
651
|
+
_content_type: Optional[StrictStr] = None,
|
|
652
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
653
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
654
|
+
) -> ApiResponse[None]:
|
|
655
|
+
"""Updates the name of a benchmark.
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
:param benchmark_id: (required)
|
|
659
|
+
:type benchmark_id: str
|
|
660
|
+
:param update_benchmark_name_model:
|
|
661
|
+
:type update_benchmark_name_model: UpdateBenchmarkNameModel
|
|
662
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
663
|
+
number provided, it will be total request
|
|
664
|
+
timeout. It can also be a pair (tuple) of
|
|
665
|
+
(connection, read) timeouts.
|
|
666
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
667
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
668
|
+
request; this effectively ignores the
|
|
669
|
+
authentication in the spec for a single request.
|
|
670
|
+
:type _request_auth: dict, optional
|
|
671
|
+
:param _content_type: force content-type for the request.
|
|
672
|
+
:type _content_type: str, Optional
|
|
673
|
+
:param _headers: set to override the headers for a single
|
|
674
|
+
request; this effectively ignores the headers
|
|
675
|
+
in the spec for a single request.
|
|
676
|
+
:type _headers: dict, optional
|
|
677
|
+
:param _host_index: set to override the host_index for a single
|
|
678
|
+
request; this effectively ignores the host_index
|
|
679
|
+
in the spec for a single request.
|
|
680
|
+
:type _host_index: int, optional
|
|
681
|
+
:return: Returns the result object.
|
|
682
|
+
""" # noqa: E501
|
|
683
|
+
|
|
684
|
+
_param = self._benchmark_benchmark_id_name_put_serialize(
|
|
685
|
+
benchmark_id=benchmark_id,
|
|
686
|
+
update_benchmark_name_model=update_benchmark_name_model,
|
|
687
|
+
_request_auth=_request_auth,
|
|
688
|
+
_content_type=_content_type,
|
|
689
|
+
_headers=_headers,
|
|
690
|
+
_host_index=_host_index
|
|
691
|
+
)
|
|
692
|
+
|
|
693
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
694
|
+
'204': None,
|
|
695
|
+
}
|
|
696
|
+
response_data = self.api_client.call_api(
|
|
697
|
+
*_param,
|
|
698
|
+
_request_timeout=_request_timeout
|
|
699
|
+
)
|
|
700
|
+
response_data.read()
|
|
701
|
+
return self.api_client.response_deserialize(
|
|
702
|
+
response_data=response_data,
|
|
703
|
+
response_types_map=_response_types_map,
|
|
704
|
+
)
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
@validate_call
|
|
708
|
+
def benchmark_benchmark_id_name_put_without_preload_content(
|
|
709
|
+
self,
|
|
710
|
+
benchmark_id: StrictStr,
|
|
711
|
+
update_benchmark_name_model: Optional[UpdateBenchmarkNameModel] = None,
|
|
712
|
+
_request_timeout: Union[
|
|
713
|
+
None,
|
|
714
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
715
|
+
Tuple[
|
|
716
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
717
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
718
|
+
]
|
|
719
|
+
] = None,
|
|
720
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
721
|
+
_content_type: Optional[StrictStr] = None,
|
|
722
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
723
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
724
|
+
) -> RESTResponseType:
|
|
725
|
+
"""Updates the name of a benchmark.
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
:param benchmark_id: (required)
|
|
729
|
+
:type benchmark_id: str
|
|
730
|
+
:param update_benchmark_name_model:
|
|
731
|
+
:type update_benchmark_name_model: UpdateBenchmarkNameModel
|
|
732
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
733
|
+
number provided, it will be total request
|
|
734
|
+
timeout. It can also be a pair (tuple) of
|
|
735
|
+
(connection, read) timeouts.
|
|
736
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
737
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
738
|
+
request; this effectively ignores the
|
|
739
|
+
authentication in the spec for a single request.
|
|
740
|
+
:type _request_auth: dict, optional
|
|
741
|
+
:param _content_type: force content-type for the request.
|
|
742
|
+
:type _content_type: str, Optional
|
|
743
|
+
:param _headers: set to override the headers for a single
|
|
744
|
+
request; this effectively ignores the headers
|
|
745
|
+
in the spec for a single request.
|
|
746
|
+
:type _headers: dict, optional
|
|
747
|
+
:param _host_index: set to override the host_index for a single
|
|
748
|
+
request; this effectively ignores the host_index
|
|
749
|
+
in the spec for a single request.
|
|
750
|
+
:type _host_index: int, optional
|
|
751
|
+
:return: Returns the result object.
|
|
752
|
+
""" # noqa: E501
|
|
753
|
+
|
|
754
|
+
_param = self._benchmark_benchmark_id_name_put_serialize(
|
|
755
|
+
benchmark_id=benchmark_id,
|
|
756
|
+
update_benchmark_name_model=update_benchmark_name_model,
|
|
757
|
+
_request_auth=_request_auth,
|
|
758
|
+
_content_type=_content_type,
|
|
759
|
+
_headers=_headers,
|
|
760
|
+
_host_index=_host_index
|
|
761
|
+
)
|
|
762
|
+
|
|
763
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
764
|
+
'204': None,
|
|
765
|
+
}
|
|
766
|
+
response_data = self.api_client.call_api(
|
|
767
|
+
*_param,
|
|
768
|
+
_request_timeout=_request_timeout
|
|
769
|
+
)
|
|
770
|
+
return response_data.response
|
|
771
|
+
|
|
772
|
+
|
|
773
|
+
def _benchmark_benchmark_id_name_put_serialize(
|
|
774
|
+
self,
|
|
775
|
+
benchmark_id,
|
|
776
|
+
update_benchmark_name_model,
|
|
777
|
+
_request_auth,
|
|
778
|
+
_content_type,
|
|
779
|
+
_headers,
|
|
780
|
+
_host_index,
|
|
781
|
+
) -> RequestSerialized:
|
|
782
|
+
|
|
783
|
+
_host = None
|
|
784
|
+
|
|
785
|
+
_collection_formats: Dict[str, str] = {
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
_path_params: Dict[str, str] = {}
|
|
789
|
+
_query_params: List[Tuple[str, str]] = []
|
|
790
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
791
|
+
_form_params: List[Tuple[str, str]] = []
|
|
792
|
+
_files: Dict[
|
|
793
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
794
|
+
] = {}
|
|
795
|
+
_body_params: Optional[bytes] = None
|
|
796
|
+
|
|
797
|
+
# process the path parameters
|
|
798
|
+
if benchmark_id is not None:
|
|
799
|
+
_path_params['benchmarkId'] = benchmark_id
|
|
800
|
+
# process the query parameters
|
|
801
|
+
# process the header parameters
|
|
802
|
+
# process the form parameters
|
|
803
|
+
# process the body parameter
|
|
804
|
+
if update_benchmark_name_model is not None:
|
|
805
|
+
_body_params = update_benchmark_name_model
|
|
806
|
+
|
|
807
|
+
|
|
808
|
+
|
|
809
|
+
# set the HTTP header `Content-Type`
|
|
810
|
+
if _content_type:
|
|
811
|
+
_header_params['Content-Type'] = _content_type
|
|
812
|
+
else:
|
|
813
|
+
_default_content_type = (
|
|
814
|
+
self.api_client.select_header_content_type(
|
|
815
|
+
[
|
|
816
|
+
'application/json',
|
|
817
|
+
'text/json',
|
|
818
|
+
'application/*+json'
|
|
819
|
+
]
|
|
820
|
+
)
|
|
821
|
+
)
|
|
822
|
+
if _default_content_type is not None:
|
|
823
|
+
_header_params['Content-Type'] = _default_content_type
|
|
824
|
+
|
|
825
|
+
# authentication setting
|
|
826
|
+
_auth_settings: List[str] = [
|
|
827
|
+
'bearer',
|
|
828
|
+
'oauth2'
|
|
829
|
+
]
|
|
830
|
+
|
|
831
|
+
return self.api_client.param_serialize(
|
|
832
|
+
method='PUT',
|
|
833
|
+
resource_path='/benchmark/{benchmarkId}/name',
|
|
834
|
+
path_params=_path_params,
|
|
835
|
+
query_params=_query_params,
|
|
836
|
+
header_params=_header_params,
|
|
837
|
+
body=_body_params,
|
|
838
|
+
post_params=_form_params,
|
|
839
|
+
files=_files,
|
|
840
|
+
auth_settings=_auth_settings,
|
|
841
|
+
collection_formats=_collection_formats,
|
|
842
|
+
_host=_host,
|
|
843
|
+
_request_auth=_request_auth
|
|
844
|
+
)
|
|
845
|
+
|
|
846
|
+
|
|
847
|
+
|
|
848
|
+
|
|
566
849
|
@validate_call
|
|
567
850
|
def benchmark_benchmark_id_participant_participant_id_delete(
|
|
568
851
|
self,
|