rapidata 2.29.1__py3-none-any.whl → 2.31.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 +550 -0
- rapidata/api_client/api/dataset_api.py +14 -14
- rapidata/api_client/api/leaderboard_api.py +562 -0
- rapidata/api_client/api/validation_set_api.py +349 -6
- 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/get_standing_by_id_result.py +4 -2
- rapidata/api_client/models/participant_by_benchmark.py +2 -2
- rapidata/api_client/models/participant_status.py +1 -0
- 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/standing_by_leaderboard.py +5 -3
- 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 +10 -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/filter/__init__.py +1 -0
- rapidata/rapidata_client/filter/_base_filter.py +20 -0
- rapidata/rapidata_client/filter/and_filter.py +30 -0
- rapidata/rapidata_client/filter/rapidata_filters.py +6 -3
- rapidata/rapidata_client/order/_rapidata_order_builder.py +13 -9
- rapidata/rapidata_client/order/rapidata_order_manager.py +2 -13
- rapidata/rapidata_client/validation/rapids/rapids.py +29 -47
- rapidata/rapidata_client/validation/validation_set_manager.py +10 -3
- {rapidata-2.29.1.dist-info → rapidata-2.31.0.dist-info}/METADATA +1 -1
- {rapidata-2.29.1.dist-info → rapidata-2.31.0.dist-info}/RECORD +36 -30
- {rapidata-2.29.1.dist-info → rapidata-2.31.0.dist-info}/LICENSE +0 -0
- {rapidata-2.29.1.dist-info → rapidata-2.31.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,
|
|
@@ -1367,6 +1650,273 @@ class BenchmarkApi:
|
|
|
1367
1650
|
|
|
1368
1651
|
|
|
1369
1652
|
|
|
1653
|
+
@validate_call
|
|
1654
|
+
def benchmark_benchmark_id_participants_participant_id_disable_post(
|
|
1655
|
+
self,
|
|
1656
|
+
benchmark_id: Annotated[StrictStr, Field(description="The benchmark the participant belongs to")],
|
|
1657
|
+
participant_id: Annotated[StrictStr, Field(description="The id of the participant to be disabled")],
|
|
1658
|
+
_request_timeout: Union[
|
|
1659
|
+
None,
|
|
1660
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1661
|
+
Tuple[
|
|
1662
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1663
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1664
|
+
]
|
|
1665
|
+
] = None,
|
|
1666
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1667
|
+
_content_type: Optional[StrictStr] = None,
|
|
1668
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1669
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1670
|
+
) -> None:
|
|
1671
|
+
"""This endpoint disables a participant in a benchmark. this means that the participant will no longer actively be matched up against other participants and not collect further results. It will still be visible in the leaderboard.
|
|
1672
|
+
|
|
1673
|
+
|
|
1674
|
+
:param benchmark_id: The benchmark the participant belongs to (required)
|
|
1675
|
+
:type benchmark_id: str
|
|
1676
|
+
:param participant_id: The id of the participant to be disabled (required)
|
|
1677
|
+
:type participant_id: str
|
|
1678
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1679
|
+
number provided, it will be total request
|
|
1680
|
+
timeout. It can also be a pair (tuple) of
|
|
1681
|
+
(connection, read) timeouts.
|
|
1682
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1683
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1684
|
+
request; this effectively ignores the
|
|
1685
|
+
authentication in the spec for a single request.
|
|
1686
|
+
:type _request_auth: dict, optional
|
|
1687
|
+
:param _content_type: force content-type for the request.
|
|
1688
|
+
:type _content_type: str, Optional
|
|
1689
|
+
:param _headers: set to override the headers for a single
|
|
1690
|
+
request; this effectively ignores the headers
|
|
1691
|
+
in the spec for a single request.
|
|
1692
|
+
:type _headers: dict, optional
|
|
1693
|
+
:param _host_index: set to override the host_index for a single
|
|
1694
|
+
request; this effectively ignores the host_index
|
|
1695
|
+
in the spec for a single request.
|
|
1696
|
+
:type _host_index: int, optional
|
|
1697
|
+
:return: Returns the result object.
|
|
1698
|
+
""" # noqa: E501
|
|
1699
|
+
|
|
1700
|
+
_param = self._benchmark_benchmark_id_participants_participant_id_disable_post_serialize(
|
|
1701
|
+
benchmark_id=benchmark_id,
|
|
1702
|
+
participant_id=participant_id,
|
|
1703
|
+
_request_auth=_request_auth,
|
|
1704
|
+
_content_type=_content_type,
|
|
1705
|
+
_headers=_headers,
|
|
1706
|
+
_host_index=_host_index
|
|
1707
|
+
)
|
|
1708
|
+
|
|
1709
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1710
|
+
'200': None,
|
|
1711
|
+
}
|
|
1712
|
+
response_data = self.api_client.call_api(
|
|
1713
|
+
*_param,
|
|
1714
|
+
_request_timeout=_request_timeout
|
|
1715
|
+
)
|
|
1716
|
+
response_data.read()
|
|
1717
|
+
return self.api_client.response_deserialize(
|
|
1718
|
+
response_data=response_data,
|
|
1719
|
+
response_types_map=_response_types_map,
|
|
1720
|
+
).data
|
|
1721
|
+
|
|
1722
|
+
|
|
1723
|
+
@validate_call
|
|
1724
|
+
def benchmark_benchmark_id_participants_participant_id_disable_post_with_http_info(
|
|
1725
|
+
self,
|
|
1726
|
+
benchmark_id: Annotated[StrictStr, Field(description="The benchmark the participant belongs to")],
|
|
1727
|
+
participant_id: Annotated[StrictStr, Field(description="The id of the participant to be disabled")],
|
|
1728
|
+
_request_timeout: Union[
|
|
1729
|
+
None,
|
|
1730
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1731
|
+
Tuple[
|
|
1732
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1733
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1734
|
+
]
|
|
1735
|
+
] = None,
|
|
1736
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1737
|
+
_content_type: Optional[StrictStr] = None,
|
|
1738
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1739
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1740
|
+
) -> ApiResponse[None]:
|
|
1741
|
+
"""This endpoint disables a participant in a benchmark. this means that the participant will no longer actively be matched up against other participants and not collect further results. It will still be visible in the leaderboard.
|
|
1742
|
+
|
|
1743
|
+
|
|
1744
|
+
:param benchmark_id: The benchmark the participant belongs to (required)
|
|
1745
|
+
:type benchmark_id: str
|
|
1746
|
+
:param participant_id: The id of the participant to be disabled (required)
|
|
1747
|
+
:type participant_id: str
|
|
1748
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1749
|
+
number provided, it will be total request
|
|
1750
|
+
timeout. It can also be a pair (tuple) of
|
|
1751
|
+
(connection, read) timeouts.
|
|
1752
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1753
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1754
|
+
request; this effectively ignores the
|
|
1755
|
+
authentication in the spec for a single request.
|
|
1756
|
+
:type _request_auth: dict, optional
|
|
1757
|
+
:param _content_type: force content-type for the request.
|
|
1758
|
+
:type _content_type: str, Optional
|
|
1759
|
+
:param _headers: set to override the headers for a single
|
|
1760
|
+
request; this effectively ignores the headers
|
|
1761
|
+
in the spec for a single request.
|
|
1762
|
+
:type _headers: dict, optional
|
|
1763
|
+
:param _host_index: set to override the host_index for a single
|
|
1764
|
+
request; this effectively ignores the host_index
|
|
1765
|
+
in the spec for a single request.
|
|
1766
|
+
:type _host_index: int, optional
|
|
1767
|
+
:return: Returns the result object.
|
|
1768
|
+
""" # noqa: E501
|
|
1769
|
+
|
|
1770
|
+
_param = self._benchmark_benchmark_id_participants_participant_id_disable_post_serialize(
|
|
1771
|
+
benchmark_id=benchmark_id,
|
|
1772
|
+
participant_id=participant_id,
|
|
1773
|
+
_request_auth=_request_auth,
|
|
1774
|
+
_content_type=_content_type,
|
|
1775
|
+
_headers=_headers,
|
|
1776
|
+
_host_index=_host_index
|
|
1777
|
+
)
|
|
1778
|
+
|
|
1779
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1780
|
+
'200': None,
|
|
1781
|
+
}
|
|
1782
|
+
response_data = self.api_client.call_api(
|
|
1783
|
+
*_param,
|
|
1784
|
+
_request_timeout=_request_timeout
|
|
1785
|
+
)
|
|
1786
|
+
response_data.read()
|
|
1787
|
+
return self.api_client.response_deserialize(
|
|
1788
|
+
response_data=response_data,
|
|
1789
|
+
response_types_map=_response_types_map,
|
|
1790
|
+
)
|
|
1791
|
+
|
|
1792
|
+
|
|
1793
|
+
@validate_call
|
|
1794
|
+
def benchmark_benchmark_id_participants_participant_id_disable_post_without_preload_content(
|
|
1795
|
+
self,
|
|
1796
|
+
benchmark_id: Annotated[StrictStr, Field(description="The benchmark the participant belongs to")],
|
|
1797
|
+
participant_id: Annotated[StrictStr, Field(description="The id of the participant to be disabled")],
|
|
1798
|
+
_request_timeout: Union[
|
|
1799
|
+
None,
|
|
1800
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1801
|
+
Tuple[
|
|
1802
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1803
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1804
|
+
]
|
|
1805
|
+
] = None,
|
|
1806
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1807
|
+
_content_type: Optional[StrictStr] = None,
|
|
1808
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1809
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1810
|
+
) -> RESTResponseType:
|
|
1811
|
+
"""This endpoint disables a participant in a benchmark. this means that the participant will no longer actively be matched up against other participants and not collect further results. It will still be visible in the leaderboard.
|
|
1812
|
+
|
|
1813
|
+
|
|
1814
|
+
:param benchmark_id: The benchmark the participant belongs to (required)
|
|
1815
|
+
:type benchmark_id: str
|
|
1816
|
+
:param participant_id: The id of the participant to be disabled (required)
|
|
1817
|
+
:type participant_id: str
|
|
1818
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1819
|
+
number provided, it will be total request
|
|
1820
|
+
timeout. It can also be a pair (tuple) of
|
|
1821
|
+
(connection, read) timeouts.
|
|
1822
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1823
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1824
|
+
request; this effectively ignores the
|
|
1825
|
+
authentication in the spec for a single request.
|
|
1826
|
+
:type _request_auth: dict, optional
|
|
1827
|
+
:param _content_type: force content-type for the request.
|
|
1828
|
+
:type _content_type: str, Optional
|
|
1829
|
+
:param _headers: set to override the headers for a single
|
|
1830
|
+
request; this effectively ignores the headers
|
|
1831
|
+
in the spec for a single request.
|
|
1832
|
+
:type _headers: dict, optional
|
|
1833
|
+
:param _host_index: set to override the host_index for a single
|
|
1834
|
+
request; this effectively ignores the host_index
|
|
1835
|
+
in the spec for a single request.
|
|
1836
|
+
:type _host_index: int, optional
|
|
1837
|
+
:return: Returns the result object.
|
|
1838
|
+
""" # noqa: E501
|
|
1839
|
+
|
|
1840
|
+
_param = self._benchmark_benchmark_id_participants_participant_id_disable_post_serialize(
|
|
1841
|
+
benchmark_id=benchmark_id,
|
|
1842
|
+
participant_id=participant_id,
|
|
1843
|
+
_request_auth=_request_auth,
|
|
1844
|
+
_content_type=_content_type,
|
|
1845
|
+
_headers=_headers,
|
|
1846
|
+
_host_index=_host_index
|
|
1847
|
+
)
|
|
1848
|
+
|
|
1849
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1850
|
+
'200': None,
|
|
1851
|
+
}
|
|
1852
|
+
response_data = self.api_client.call_api(
|
|
1853
|
+
*_param,
|
|
1854
|
+
_request_timeout=_request_timeout
|
|
1855
|
+
)
|
|
1856
|
+
return response_data.response
|
|
1857
|
+
|
|
1858
|
+
|
|
1859
|
+
def _benchmark_benchmark_id_participants_participant_id_disable_post_serialize(
|
|
1860
|
+
self,
|
|
1861
|
+
benchmark_id,
|
|
1862
|
+
participant_id,
|
|
1863
|
+
_request_auth,
|
|
1864
|
+
_content_type,
|
|
1865
|
+
_headers,
|
|
1866
|
+
_host_index,
|
|
1867
|
+
) -> RequestSerialized:
|
|
1868
|
+
|
|
1869
|
+
_host = None
|
|
1870
|
+
|
|
1871
|
+
_collection_formats: Dict[str, str] = {
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
_path_params: Dict[str, str] = {}
|
|
1875
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1876
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1877
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1878
|
+
_files: Dict[
|
|
1879
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1880
|
+
] = {}
|
|
1881
|
+
_body_params: Optional[bytes] = None
|
|
1882
|
+
|
|
1883
|
+
# process the path parameters
|
|
1884
|
+
if benchmark_id is not None:
|
|
1885
|
+
_path_params['benchmarkId'] = benchmark_id
|
|
1886
|
+
if participant_id is not None:
|
|
1887
|
+
_path_params['participantId'] = participant_id
|
|
1888
|
+
# process the query parameters
|
|
1889
|
+
# process the header parameters
|
|
1890
|
+
# process the form parameters
|
|
1891
|
+
# process the body parameter
|
|
1892
|
+
|
|
1893
|
+
|
|
1894
|
+
|
|
1895
|
+
|
|
1896
|
+
# authentication setting
|
|
1897
|
+
_auth_settings: List[str] = [
|
|
1898
|
+
'bearer',
|
|
1899
|
+
'oauth2'
|
|
1900
|
+
]
|
|
1901
|
+
|
|
1902
|
+
return self.api_client.param_serialize(
|
|
1903
|
+
method='POST',
|
|
1904
|
+
resource_path='/benchmark/{benchmarkId}/participants/{participantId}/disable',
|
|
1905
|
+
path_params=_path_params,
|
|
1906
|
+
query_params=_query_params,
|
|
1907
|
+
header_params=_header_params,
|
|
1908
|
+
body=_body_params,
|
|
1909
|
+
post_params=_form_params,
|
|
1910
|
+
files=_files,
|
|
1911
|
+
auth_settings=_auth_settings,
|
|
1912
|
+
collection_formats=_collection_formats,
|
|
1913
|
+
_host=_host,
|
|
1914
|
+
_request_auth=_request_auth
|
|
1915
|
+
)
|
|
1916
|
+
|
|
1917
|
+
|
|
1918
|
+
|
|
1919
|
+
|
|
1370
1920
|
@validate_call
|
|
1371
1921
|
def benchmark_benchmark_id_participants_participant_id_submit_post(
|
|
1372
1922
|
self,
|
|
@@ -1195,8 +1195,8 @@ class DatasetApi:
|
|
|
1195
1195
|
def dataset_dataset_id_datapoints_post(
|
|
1196
1196
|
self,
|
|
1197
1197
|
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset")],
|
|
1198
|
-
prompt_asset:
|
|
1199
|
-
file:
|
|
1198
|
+
prompt_asset: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
1199
|
+
file: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
1200
1200
|
text: Annotated[Optional[List[StrictStr]], Field(description="The texts to upload. The length limit is set at 256 characters per text.")] = None,
|
|
1201
1201
|
url: Annotated[Optional[List[StrictStr]], Field(description="Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>")] = None,
|
|
1202
1202
|
metadata: Annotated[Optional[List[DatasetDatasetIdDatapointsPostRequestMetadataInner]], Field(description="Optional metadata to attach to the datapoint.")] = None,
|
|
@@ -1220,9 +1220,9 @@ class DatasetApi:
|
|
|
1220
1220
|
|
|
1221
1221
|
:param dataset_id: The id of the dataset (required)
|
|
1222
1222
|
:type dataset_id: str
|
|
1223
|
-
:param prompt_asset:
|
|
1223
|
+
:param prompt_asset:
|
|
1224
1224
|
:type prompt_asset: List[bytearray]
|
|
1225
|
-
:param file:
|
|
1225
|
+
:param file:
|
|
1226
1226
|
:type file: List[bytearray]
|
|
1227
1227
|
:param text: The texts to upload. The length limit is set at 256 characters per text.
|
|
1228
1228
|
:type text: List[str]
|
|
@@ -1286,8 +1286,8 @@ class DatasetApi:
|
|
|
1286
1286
|
def dataset_dataset_id_datapoints_post_with_http_info(
|
|
1287
1287
|
self,
|
|
1288
1288
|
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset")],
|
|
1289
|
-
prompt_asset:
|
|
1290
|
-
file:
|
|
1289
|
+
prompt_asset: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
1290
|
+
file: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
1291
1291
|
text: Annotated[Optional[List[StrictStr]], Field(description="The texts to upload. The length limit is set at 256 characters per text.")] = None,
|
|
1292
1292
|
url: Annotated[Optional[List[StrictStr]], Field(description="Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>")] = None,
|
|
1293
1293
|
metadata: Annotated[Optional[List[DatasetDatasetIdDatapointsPostRequestMetadataInner]], Field(description="Optional metadata to attach to the datapoint.")] = None,
|
|
@@ -1311,9 +1311,9 @@ class DatasetApi:
|
|
|
1311
1311
|
|
|
1312
1312
|
:param dataset_id: The id of the dataset (required)
|
|
1313
1313
|
:type dataset_id: str
|
|
1314
|
-
:param prompt_asset:
|
|
1314
|
+
:param prompt_asset:
|
|
1315
1315
|
:type prompt_asset: List[bytearray]
|
|
1316
|
-
:param file:
|
|
1316
|
+
:param file:
|
|
1317
1317
|
:type file: List[bytearray]
|
|
1318
1318
|
:param text: The texts to upload. The length limit is set at 256 characters per text.
|
|
1319
1319
|
:type text: List[str]
|
|
@@ -1377,8 +1377,8 @@ class DatasetApi:
|
|
|
1377
1377
|
def dataset_dataset_id_datapoints_post_without_preload_content(
|
|
1378
1378
|
self,
|
|
1379
1379
|
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset")],
|
|
1380
|
-
prompt_asset:
|
|
1381
|
-
file:
|
|
1380
|
+
prompt_asset: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
1381
|
+
file: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
1382
1382
|
text: Annotated[Optional[List[StrictStr]], Field(description="The texts to upload. The length limit is set at 256 characters per text.")] = None,
|
|
1383
1383
|
url: Annotated[Optional[List[StrictStr]], Field(description="Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>")] = None,
|
|
1384
1384
|
metadata: Annotated[Optional[List[DatasetDatasetIdDatapointsPostRequestMetadataInner]], Field(description="Optional metadata to attach to the datapoint.")] = None,
|
|
@@ -1402,9 +1402,9 @@ class DatasetApi:
|
|
|
1402
1402
|
|
|
1403
1403
|
:param dataset_id: The id of the dataset (required)
|
|
1404
1404
|
:type dataset_id: str
|
|
1405
|
-
:param prompt_asset:
|
|
1405
|
+
:param prompt_asset:
|
|
1406
1406
|
:type prompt_asset: List[bytearray]
|
|
1407
|
-
:param file:
|
|
1407
|
+
:param file:
|
|
1408
1408
|
:type file: List[bytearray]
|
|
1409
1409
|
:param text: The texts to upload. The length limit is set at 256 characters per text.
|
|
1410
1410
|
:type text: List[str]
|
|
@@ -1478,8 +1478,8 @@ class DatasetApi:
|
|
|
1478
1478
|
_host = None
|
|
1479
1479
|
|
|
1480
1480
|
_collection_formats: Dict[str, str] = {
|
|
1481
|
-
'promptAsset': '
|
|
1482
|
-
'file': '
|
|
1481
|
+
'promptAsset': 'multi',
|
|
1482
|
+
'file': 'multi',
|
|
1483
1483
|
'text': 'multi',
|
|
1484
1484
|
'url': 'multi',
|
|
1485
1485
|
'metadata': 'multi',
|