rapidata 2.29.0__py3-none-any.whl → 2.29.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 +1 -1
- rapidata/api_client/__init__.py +4 -0
- rapidata/api_client/api/benchmark_api.py +267 -0
- rapidata/api_client/models/__init__.py +4 -0
- rapidata/api_client/models/create_leaderboard_model.py +3 -1
- rapidata/api_client/models/create_leaderboard_result.py +13 -3
- rapidata/api_client/models/file_asset_input3.py +104 -0
- rapidata/api_client/models/get_leaderboard_by_id_result.py +11 -3
- rapidata/api_client/models/leaderboard_query_result.py +11 -3
- rapidata/api_client/models/multi_asset_input3.py +110 -0
- rapidata/api_client/models/multi_asset_input3_assets_inner.py +170 -0
- rapidata/api_client/models/submit_prompt_model.py +20 -4
- rapidata/api_client/models/submit_prompt_model_prompt_asset.py +174 -0
- rapidata/api_client_README.md +5 -0
- rapidata/rapidata_client/benchmark/leaderboard/rapidata_leaderboard.py +57 -4
- rapidata/rapidata_client/benchmark/rapidata_benchmark.py +31 -2
- {rapidata-2.29.0.dist-info → rapidata-2.29.1.dist-info}/METADATA +1 -1
- {rapidata-2.29.0.dist-info → rapidata-2.29.1.dist-info}/RECORD +20 -16
- {rapidata-2.29.0.dist-info → rapidata-2.29.1.dist-info}/LICENSE +0 -0
- {rapidata-2.29.0.dist-info → rapidata-2.29.1.dist-info}/WHEEL +0 -0
rapidata/__init__.py
CHANGED
rapidata/api_client/__init__.py
CHANGED
|
@@ -181,6 +181,7 @@ from rapidata.api_client.models.file_asset_input import FileAssetInput
|
|
|
181
181
|
from rapidata.api_client.models.file_asset_input1 import FileAssetInput1
|
|
182
182
|
from rapidata.api_client.models.file_asset_input1_file import FileAssetInput1File
|
|
183
183
|
from rapidata.api_client.models.file_asset_input2 import FileAssetInput2
|
|
184
|
+
from rapidata.api_client.models.file_asset_input3 import FileAssetInput3
|
|
184
185
|
from rapidata.api_client.models.file_asset_input_file import FileAssetInputFile
|
|
185
186
|
from rapidata.api_client.models.file_asset_model import FileAssetModel
|
|
186
187
|
from rapidata.api_client.models.file_asset_model_metadata_value import FileAssetModelMetadataValue
|
|
@@ -261,6 +262,8 @@ from rapidata.api_client.models.multi_asset_input import MultiAssetInput
|
|
|
261
262
|
from rapidata.api_client.models.multi_asset_input1 import MultiAssetInput1
|
|
262
263
|
from rapidata.api_client.models.multi_asset_input1_assets_inner import MultiAssetInput1AssetsInner
|
|
263
264
|
from rapidata.api_client.models.multi_asset_input2 import MultiAssetInput2
|
|
265
|
+
from rapidata.api_client.models.multi_asset_input3 import MultiAssetInput3
|
|
266
|
+
from rapidata.api_client.models.multi_asset_input3_assets_inner import MultiAssetInput3AssetsInner
|
|
264
267
|
from rapidata.api_client.models.multi_asset_input_assets_inner import MultiAssetInputAssetsInner
|
|
265
268
|
from rapidata.api_client.models.multi_asset_model import MultiAssetModel
|
|
266
269
|
from rapidata.api_client.models.multi_compare_truth import MultiCompareTruth
|
|
@@ -367,6 +370,7 @@ from rapidata.api_client.models.submit_coco_model import SubmitCocoModel
|
|
|
367
370
|
from rapidata.api_client.models.submit_coco_result import SubmitCocoResult
|
|
368
371
|
from rapidata.api_client.models.submit_participant_result import SubmitParticipantResult
|
|
369
372
|
from rapidata.api_client.models.submit_prompt_model import SubmitPromptModel
|
|
373
|
+
from rapidata.api_client.models.submit_prompt_model_prompt_asset import SubmitPromptModelPromptAsset
|
|
370
374
|
from rapidata.api_client.models.text_asset import TextAsset
|
|
371
375
|
from rapidata.api_client.models.text_asset_input import TextAssetInput
|
|
372
376
|
from rapidata.api_client.models.text_asset_model import TextAssetModel
|
|
@@ -563,6 +563,273 @@ class BenchmarkApi:
|
|
|
563
563
|
|
|
564
564
|
|
|
565
565
|
|
|
566
|
+
@validate_call
|
|
567
|
+
def benchmark_benchmark_id_participant_participant_id_delete(
|
|
568
|
+
self,
|
|
569
|
+
benchmark_id: StrictStr,
|
|
570
|
+
participant_id: StrictStr,
|
|
571
|
+
_request_timeout: Union[
|
|
572
|
+
None,
|
|
573
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
574
|
+
Tuple[
|
|
575
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
576
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
577
|
+
]
|
|
578
|
+
] = None,
|
|
579
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
580
|
+
_content_type: Optional[StrictStr] = None,
|
|
581
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
582
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
583
|
+
) -> None:
|
|
584
|
+
"""Deletes a participant on a benchmark.
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
:param benchmark_id: (required)
|
|
588
|
+
:type benchmark_id: str
|
|
589
|
+
:param participant_id: (required)
|
|
590
|
+
:type participant_id: str
|
|
591
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
592
|
+
number provided, it will be total request
|
|
593
|
+
timeout. It can also be a pair (tuple) of
|
|
594
|
+
(connection, read) timeouts.
|
|
595
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
596
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
597
|
+
request; this effectively ignores the
|
|
598
|
+
authentication in the spec for a single request.
|
|
599
|
+
:type _request_auth: dict, optional
|
|
600
|
+
:param _content_type: force content-type for the request.
|
|
601
|
+
:type _content_type: str, Optional
|
|
602
|
+
:param _headers: set to override the headers for a single
|
|
603
|
+
request; this effectively ignores the headers
|
|
604
|
+
in the spec for a single request.
|
|
605
|
+
:type _headers: dict, optional
|
|
606
|
+
:param _host_index: set to override the host_index for a single
|
|
607
|
+
request; this effectively ignores the host_index
|
|
608
|
+
in the spec for a single request.
|
|
609
|
+
:type _host_index: int, optional
|
|
610
|
+
:return: Returns the result object.
|
|
611
|
+
""" # noqa: E501
|
|
612
|
+
|
|
613
|
+
_param = self._benchmark_benchmark_id_participant_participant_id_delete_serialize(
|
|
614
|
+
benchmark_id=benchmark_id,
|
|
615
|
+
participant_id=participant_id,
|
|
616
|
+
_request_auth=_request_auth,
|
|
617
|
+
_content_type=_content_type,
|
|
618
|
+
_headers=_headers,
|
|
619
|
+
_host_index=_host_index
|
|
620
|
+
)
|
|
621
|
+
|
|
622
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
623
|
+
'204': None,
|
|
624
|
+
}
|
|
625
|
+
response_data = self.api_client.call_api(
|
|
626
|
+
*_param,
|
|
627
|
+
_request_timeout=_request_timeout
|
|
628
|
+
)
|
|
629
|
+
response_data.read()
|
|
630
|
+
return self.api_client.response_deserialize(
|
|
631
|
+
response_data=response_data,
|
|
632
|
+
response_types_map=_response_types_map,
|
|
633
|
+
).data
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
@validate_call
|
|
637
|
+
def benchmark_benchmark_id_participant_participant_id_delete_with_http_info(
|
|
638
|
+
self,
|
|
639
|
+
benchmark_id: StrictStr,
|
|
640
|
+
participant_id: StrictStr,
|
|
641
|
+
_request_timeout: Union[
|
|
642
|
+
None,
|
|
643
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
644
|
+
Tuple[
|
|
645
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
646
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
647
|
+
]
|
|
648
|
+
] = None,
|
|
649
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
650
|
+
_content_type: Optional[StrictStr] = None,
|
|
651
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
652
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
653
|
+
) -> ApiResponse[None]:
|
|
654
|
+
"""Deletes a participant on a benchmark.
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
:param benchmark_id: (required)
|
|
658
|
+
:type benchmark_id: str
|
|
659
|
+
:param participant_id: (required)
|
|
660
|
+
:type participant_id: str
|
|
661
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
662
|
+
number provided, it will be total request
|
|
663
|
+
timeout. It can also be a pair (tuple) of
|
|
664
|
+
(connection, read) timeouts.
|
|
665
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
666
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
667
|
+
request; this effectively ignores the
|
|
668
|
+
authentication in the spec for a single request.
|
|
669
|
+
:type _request_auth: dict, optional
|
|
670
|
+
:param _content_type: force content-type for the request.
|
|
671
|
+
:type _content_type: str, Optional
|
|
672
|
+
:param _headers: set to override the headers for a single
|
|
673
|
+
request; this effectively ignores the headers
|
|
674
|
+
in the spec for a single request.
|
|
675
|
+
:type _headers: dict, optional
|
|
676
|
+
:param _host_index: set to override the host_index for a single
|
|
677
|
+
request; this effectively ignores the host_index
|
|
678
|
+
in the spec for a single request.
|
|
679
|
+
:type _host_index: int, optional
|
|
680
|
+
:return: Returns the result object.
|
|
681
|
+
""" # noqa: E501
|
|
682
|
+
|
|
683
|
+
_param = self._benchmark_benchmark_id_participant_participant_id_delete_serialize(
|
|
684
|
+
benchmark_id=benchmark_id,
|
|
685
|
+
participant_id=participant_id,
|
|
686
|
+
_request_auth=_request_auth,
|
|
687
|
+
_content_type=_content_type,
|
|
688
|
+
_headers=_headers,
|
|
689
|
+
_host_index=_host_index
|
|
690
|
+
)
|
|
691
|
+
|
|
692
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
693
|
+
'204': None,
|
|
694
|
+
}
|
|
695
|
+
response_data = self.api_client.call_api(
|
|
696
|
+
*_param,
|
|
697
|
+
_request_timeout=_request_timeout
|
|
698
|
+
)
|
|
699
|
+
response_data.read()
|
|
700
|
+
return self.api_client.response_deserialize(
|
|
701
|
+
response_data=response_data,
|
|
702
|
+
response_types_map=_response_types_map,
|
|
703
|
+
)
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
@validate_call
|
|
707
|
+
def benchmark_benchmark_id_participant_participant_id_delete_without_preload_content(
|
|
708
|
+
self,
|
|
709
|
+
benchmark_id: StrictStr,
|
|
710
|
+
participant_id: StrictStr,
|
|
711
|
+
_request_timeout: Union[
|
|
712
|
+
None,
|
|
713
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
714
|
+
Tuple[
|
|
715
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
716
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
717
|
+
]
|
|
718
|
+
] = None,
|
|
719
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
720
|
+
_content_type: Optional[StrictStr] = None,
|
|
721
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
722
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
723
|
+
) -> RESTResponseType:
|
|
724
|
+
"""Deletes a participant on a benchmark.
|
|
725
|
+
|
|
726
|
+
|
|
727
|
+
:param benchmark_id: (required)
|
|
728
|
+
:type benchmark_id: str
|
|
729
|
+
:param participant_id: (required)
|
|
730
|
+
:type participant_id: str
|
|
731
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
732
|
+
number provided, it will be total request
|
|
733
|
+
timeout. It can also be a pair (tuple) of
|
|
734
|
+
(connection, read) timeouts.
|
|
735
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
736
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
737
|
+
request; this effectively ignores the
|
|
738
|
+
authentication in the spec for a single request.
|
|
739
|
+
:type _request_auth: dict, optional
|
|
740
|
+
:param _content_type: force content-type for the request.
|
|
741
|
+
:type _content_type: str, Optional
|
|
742
|
+
:param _headers: set to override the headers for a single
|
|
743
|
+
request; this effectively ignores the headers
|
|
744
|
+
in the spec for a single request.
|
|
745
|
+
:type _headers: dict, optional
|
|
746
|
+
:param _host_index: set to override the host_index for a single
|
|
747
|
+
request; this effectively ignores the host_index
|
|
748
|
+
in the spec for a single request.
|
|
749
|
+
:type _host_index: int, optional
|
|
750
|
+
:return: Returns the result object.
|
|
751
|
+
""" # noqa: E501
|
|
752
|
+
|
|
753
|
+
_param = self._benchmark_benchmark_id_participant_participant_id_delete_serialize(
|
|
754
|
+
benchmark_id=benchmark_id,
|
|
755
|
+
participant_id=participant_id,
|
|
756
|
+
_request_auth=_request_auth,
|
|
757
|
+
_content_type=_content_type,
|
|
758
|
+
_headers=_headers,
|
|
759
|
+
_host_index=_host_index
|
|
760
|
+
)
|
|
761
|
+
|
|
762
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
763
|
+
'204': None,
|
|
764
|
+
}
|
|
765
|
+
response_data = self.api_client.call_api(
|
|
766
|
+
*_param,
|
|
767
|
+
_request_timeout=_request_timeout
|
|
768
|
+
)
|
|
769
|
+
return response_data.response
|
|
770
|
+
|
|
771
|
+
|
|
772
|
+
def _benchmark_benchmark_id_participant_participant_id_delete_serialize(
|
|
773
|
+
self,
|
|
774
|
+
benchmark_id,
|
|
775
|
+
participant_id,
|
|
776
|
+
_request_auth,
|
|
777
|
+
_content_type,
|
|
778
|
+
_headers,
|
|
779
|
+
_host_index,
|
|
780
|
+
) -> RequestSerialized:
|
|
781
|
+
|
|
782
|
+
_host = None
|
|
783
|
+
|
|
784
|
+
_collection_formats: Dict[str, str] = {
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
_path_params: Dict[str, str] = {}
|
|
788
|
+
_query_params: List[Tuple[str, str]] = []
|
|
789
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
790
|
+
_form_params: List[Tuple[str, str]] = []
|
|
791
|
+
_files: Dict[
|
|
792
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
793
|
+
] = {}
|
|
794
|
+
_body_params: Optional[bytes] = None
|
|
795
|
+
|
|
796
|
+
# process the path parameters
|
|
797
|
+
if benchmark_id is not None:
|
|
798
|
+
_path_params['benchmarkId'] = benchmark_id
|
|
799
|
+
if participant_id is not None:
|
|
800
|
+
_path_params['participantId'] = participant_id
|
|
801
|
+
# process the query parameters
|
|
802
|
+
# process the header parameters
|
|
803
|
+
# process the form parameters
|
|
804
|
+
# process the body parameter
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
|
|
808
|
+
|
|
809
|
+
# authentication setting
|
|
810
|
+
_auth_settings: List[str] = [
|
|
811
|
+
'bearer',
|
|
812
|
+
'oauth2'
|
|
813
|
+
]
|
|
814
|
+
|
|
815
|
+
return self.api_client.param_serialize(
|
|
816
|
+
method='DELETE',
|
|
817
|
+
resource_path='/benchmark/{benchmarkId}/participant/{participantId}',
|
|
818
|
+
path_params=_path_params,
|
|
819
|
+
query_params=_query_params,
|
|
820
|
+
header_params=_header_params,
|
|
821
|
+
body=_body_params,
|
|
822
|
+
post_params=_form_params,
|
|
823
|
+
files=_files,
|
|
824
|
+
auth_settings=_auth_settings,
|
|
825
|
+
collection_formats=_collection_formats,
|
|
826
|
+
_host=_host,
|
|
827
|
+
_request_auth=_request_auth
|
|
828
|
+
)
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
|
|
566
833
|
@validate_call
|
|
567
834
|
def benchmark_benchmark_id_participant_participant_id_get(
|
|
568
835
|
self,
|
|
@@ -144,6 +144,7 @@ from rapidata.api_client.models.file_asset_input import FileAssetInput
|
|
|
144
144
|
from rapidata.api_client.models.file_asset_input1 import FileAssetInput1
|
|
145
145
|
from rapidata.api_client.models.file_asset_input1_file import FileAssetInput1File
|
|
146
146
|
from rapidata.api_client.models.file_asset_input2 import FileAssetInput2
|
|
147
|
+
from rapidata.api_client.models.file_asset_input3 import FileAssetInput3
|
|
147
148
|
from rapidata.api_client.models.file_asset_input_file import FileAssetInputFile
|
|
148
149
|
from rapidata.api_client.models.file_asset_model import FileAssetModel
|
|
149
150
|
from rapidata.api_client.models.file_asset_model_metadata_value import FileAssetModelMetadataValue
|
|
@@ -224,6 +225,8 @@ from rapidata.api_client.models.multi_asset_input import MultiAssetInput
|
|
|
224
225
|
from rapidata.api_client.models.multi_asset_input1 import MultiAssetInput1
|
|
225
226
|
from rapidata.api_client.models.multi_asset_input1_assets_inner import MultiAssetInput1AssetsInner
|
|
226
227
|
from rapidata.api_client.models.multi_asset_input2 import MultiAssetInput2
|
|
228
|
+
from rapidata.api_client.models.multi_asset_input3 import MultiAssetInput3
|
|
229
|
+
from rapidata.api_client.models.multi_asset_input3_assets_inner import MultiAssetInput3AssetsInner
|
|
227
230
|
from rapidata.api_client.models.multi_asset_input_assets_inner import MultiAssetInputAssetsInner
|
|
228
231
|
from rapidata.api_client.models.multi_asset_model import MultiAssetModel
|
|
229
232
|
from rapidata.api_client.models.multi_compare_truth import MultiCompareTruth
|
|
@@ -330,6 +333,7 @@ from rapidata.api_client.models.submit_coco_model import SubmitCocoModel
|
|
|
330
333
|
from rapidata.api_client.models.submit_coco_result import SubmitCocoResult
|
|
331
334
|
from rapidata.api_client.models.submit_participant_result import SubmitParticipantResult
|
|
332
335
|
from rapidata.api_client.models.submit_prompt_model import SubmitPromptModel
|
|
336
|
+
from rapidata.api_client.models.submit_prompt_model_prompt_asset import SubmitPromptModelPromptAsset
|
|
333
337
|
from rapidata.api_client.models.text_asset import TextAsset
|
|
334
338
|
from rapidata.api_client.models.text_asset_input import TextAssetInput
|
|
335
339
|
from rapidata.api_client.models.text_asset_model import TextAssetModel
|
|
@@ -31,10 +31,11 @@ class CreateLeaderboardModel(BaseModel):
|
|
|
31
31
|
name: StrictStr = Field(description="The name of the leaderboard.")
|
|
32
32
|
instruction: StrictStr = Field(description="The instruction datapoints will be matched up against.")
|
|
33
33
|
show_prompt: StrictBool = Field(description="Indicates if the prompt is shown on the rapids.", alias="showPrompt")
|
|
34
|
+
show_prompt_asset: Optional[StrictBool] = Field(default=None, description="Whether the prompt asset should be shown on the rapids.", alias="showPromptAsset")
|
|
34
35
|
response_budget: Optional[StrictInt] = Field(default=None, description="Total amount of responses that get collected per run", alias="responseBudget")
|
|
35
36
|
min_responses: Optional[StrictInt] = Field(default=None, description="The minimum amount of responses that need to be collected per comparison.", alias="minResponses")
|
|
36
37
|
is_inversed: Optional[StrictBool] = Field(default=None, description="If the results should be inversed, meaning people should select the worse model.", alias="isInversed")
|
|
37
|
-
__properties: ClassVar[List[str]] = ["benchmarkId", "benchmarkName", "name", "instruction", "showPrompt", "responseBudget", "minResponses", "isInversed"]
|
|
38
|
+
__properties: ClassVar[List[str]] = ["benchmarkId", "benchmarkName", "name", "instruction", "showPrompt", "showPromptAsset", "responseBudget", "minResponses", "isInversed"]
|
|
38
39
|
|
|
39
40
|
model_config = ConfigDict(
|
|
40
41
|
populate_by_name=True,
|
|
@@ -102,6 +103,7 @@ class CreateLeaderboardModel(BaseModel):
|
|
|
102
103
|
"name": obj.get("name"),
|
|
103
104
|
"instruction": obj.get("instruction"),
|
|
104
105
|
"showPrompt": obj.get("showPrompt"),
|
|
106
|
+
"showPromptAsset": obj.get("showPromptAsset"),
|
|
105
107
|
"responseBudget": obj.get("responseBudget"),
|
|
106
108
|
"minResponses": obj.get("minResponses"),
|
|
107
109
|
"isInversed": obj.get("isInversed")
|
|
@@ -17,7 +17,7 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
@@ -28,7 +28,12 @@ class CreateLeaderboardResult(BaseModel):
|
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
id: StrictStr
|
|
30
30
|
benchmark_id: StrictStr = Field(alias="benchmarkId")
|
|
31
|
-
|
|
31
|
+
show_prompt: StrictBool = Field(alias="showPrompt")
|
|
32
|
+
show_prompt_asset: StrictBool = Field(alias="showPromptAsset")
|
|
33
|
+
response_budget: StrictInt = Field(alias="responseBudget")
|
|
34
|
+
min_responses: StrictInt = Field(alias="minResponses")
|
|
35
|
+
is_inversed: StrictBool = Field(alias="isInversed")
|
|
36
|
+
__properties: ClassVar[List[str]] = ["id", "benchmarkId", "showPrompt", "showPromptAsset", "responseBudget", "minResponses", "isInversed"]
|
|
32
37
|
|
|
33
38
|
model_config = ConfigDict(
|
|
34
39
|
populate_by_name=True,
|
|
@@ -82,7 +87,12 @@ class CreateLeaderboardResult(BaseModel):
|
|
|
82
87
|
|
|
83
88
|
_obj = cls.model_validate({
|
|
84
89
|
"id": obj.get("id"),
|
|
85
|
-
"benchmarkId": obj.get("benchmarkId")
|
|
90
|
+
"benchmarkId": obj.get("benchmarkId"),
|
|
91
|
+
"showPrompt": obj.get("showPrompt"),
|
|
92
|
+
"showPromptAsset": obj.get("showPromptAsset"),
|
|
93
|
+
"responseBudget": obj.get("responseBudget"),
|
|
94
|
+
"minResponses": obj.get("minResponses"),
|
|
95
|
+
"isInversed": obj.get("isInversed")
|
|
86
96
|
})
|
|
87
97
|
return _obj
|
|
88
98
|
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Rapidata.Dataset
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from rapidata.api_client.models.file_asset_input1_file import FileAssetInput1File
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class FileAssetInput3(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
FileAssetInput3
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
t: StrictStr = Field(description="Discriminator value for FileAssetInput", alias="_t")
|
|
31
|
+
file: FileAssetInput1File
|
|
32
|
+
identifier: Optional[StrictStr] = None
|
|
33
|
+
__properties: ClassVar[List[str]] = ["_t", "file", "identifier"]
|
|
34
|
+
|
|
35
|
+
@field_validator('t')
|
|
36
|
+
def t_validate_enum(cls, value):
|
|
37
|
+
"""Validates the enum"""
|
|
38
|
+
if value not in set(['FileAssetInput']):
|
|
39
|
+
raise ValueError("must be one of enum values ('FileAssetInput')")
|
|
40
|
+
return value
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
populate_by_name=True,
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
|
+
"""Create an instance of FileAssetInput3 from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
|
65
|
+
|
|
66
|
+
This has the following differences from calling pydantic's
|
|
67
|
+
`self.model_dump(by_alias=True)`:
|
|
68
|
+
|
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
|
70
|
+
were set at model initialization. Other fields with value `None`
|
|
71
|
+
are ignored.
|
|
72
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
73
|
+
"""
|
|
74
|
+
excluded_fields: Set[str] = set([
|
|
75
|
+
"identifier",
|
|
76
|
+
])
|
|
77
|
+
|
|
78
|
+
_dict = self.model_dump(
|
|
79
|
+
by_alias=True,
|
|
80
|
+
exclude=excluded_fields,
|
|
81
|
+
exclude_none=True,
|
|
82
|
+
)
|
|
83
|
+
# override the default output from pydantic by calling `to_dict()` of file
|
|
84
|
+
if self.file:
|
|
85
|
+
_dict['file'] = self.file.to_dict()
|
|
86
|
+
return _dict
|
|
87
|
+
|
|
88
|
+
@classmethod
|
|
89
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
90
|
+
"""Create an instance of FileAssetInput3 from a dict"""
|
|
91
|
+
if obj is None:
|
|
92
|
+
return None
|
|
93
|
+
|
|
94
|
+
if not isinstance(obj, dict):
|
|
95
|
+
return cls.model_validate(obj)
|
|
96
|
+
|
|
97
|
+
_obj = cls.model_validate({
|
|
98
|
+
"_t": obj.get("_t") if obj.get("_t") is not None else 'FileAssetInput',
|
|
99
|
+
"file": FileAssetInput1File.from_dict(obj["file"]) if obj.get("file") is not None else None,
|
|
100
|
+
"identifier": obj.get("identifier")
|
|
101
|
+
})
|
|
102
|
+
return _obj
|
|
103
|
+
|
|
104
|
+
|
|
@@ -17,7 +17,7 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
@@ -31,7 +31,11 @@ class GetLeaderboardByIdResult(BaseModel):
|
|
|
31
31
|
name: StrictStr
|
|
32
32
|
instruction: StrictStr
|
|
33
33
|
show_prompt: StrictBool = Field(alias="showPrompt")
|
|
34
|
-
|
|
34
|
+
show_prompt_asset: StrictBool = Field(alias="showPromptAsset")
|
|
35
|
+
is_inversed: StrictBool = Field(alias="isInversed")
|
|
36
|
+
response_budget: StrictInt = Field(alias="responseBudget")
|
|
37
|
+
min_responses: StrictInt = Field(alias="minResponses")
|
|
38
|
+
__properties: ClassVar[List[str]] = ["id", "orderId", "name", "instruction", "showPrompt", "showPromptAsset", "isInversed", "responseBudget", "minResponses"]
|
|
35
39
|
|
|
36
40
|
model_config = ConfigDict(
|
|
37
41
|
populate_by_name=True,
|
|
@@ -93,7 +97,11 @@ class GetLeaderboardByIdResult(BaseModel):
|
|
|
93
97
|
"orderId": obj.get("orderId"),
|
|
94
98
|
"name": obj.get("name"),
|
|
95
99
|
"instruction": obj.get("instruction"),
|
|
96
|
-
"showPrompt": obj.get("showPrompt")
|
|
100
|
+
"showPrompt": obj.get("showPrompt"),
|
|
101
|
+
"showPromptAsset": obj.get("showPromptAsset"),
|
|
102
|
+
"isInversed": obj.get("isInversed"),
|
|
103
|
+
"responseBudget": obj.get("responseBudget"),
|
|
104
|
+
"minResponses": obj.get("minResponses")
|
|
97
105
|
})
|
|
98
106
|
return _obj
|
|
99
107
|
|
|
@@ -17,7 +17,7 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
@@ -31,7 +31,11 @@ class LeaderboardQueryResult(BaseModel):
|
|
|
31
31
|
name: StrictStr
|
|
32
32
|
instruction: StrictStr
|
|
33
33
|
show_prompt: StrictBool = Field(alias="showPrompt")
|
|
34
|
-
|
|
34
|
+
show_prompt_asset: StrictBool = Field(alias="showPromptAsset")
|
|
35
|
+
is_inversed: StrictBool = Field(alias="isInversed")
|
|
36
|
+
response_budget: StrictInt = Field(alias="responseBudget")
|
|
37
|
+
min_responses: StrictInt = Field(alias="minResponses")
|
|
38
|
+
__properties: ClassVar[List[str]] = ["id", "orderId", "name", "instruction", "showPrompt", "showPromptAsset", "isInversed", "responseBudget", "minResponses"]
|
|
35
39
|
|
|
36
40
|
model_config = ConfigDict(
|
|
37
41
|
populate_by_name=True,
|
|
@@ -93,7 +97,11 @@ class LeaderboardQueryResult(BaseModel):
|
|
|
93
97
|
"orderId": obj.get("orderId"),
|
|
94
98
|
"name": obj.get("name"),
|
|
95
99
|
"instruction": obj.get("instruction"),
|
|
96
|
-
"showPrompt": obj.get("showPrompt")
|
|
100
|
+
"showPrompt": obj.get("showPrompt"),
|
|
101
|
+
"showPromptAsset": obj.get("showPromptAsset"),
|
|
102
|
+
"isInversed": obj.get("isInversed"),
|
|
103
|
+
"responseBudget": obj.get("responseBudget"),
|
|
104
|
+
"minResponses": obj.get("minResponses")
|
|
97
105
|
})
|
|
98
106
|
return _obj
|
|
99
107
|
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Rapidata.Dataset
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class MultiAssetInput3(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
MultiAssetInput3
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
t: StrictStr = Field(description="Discriminator value for MultiAssetInput", alias="_t")
|
|
30
|
+
assets: List[MultiAssetInput3AssetsInner]
|
|
31
|
+
identifier: Optional[StrictStr] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["_t", "assets", "identifier"]
|
|
33
|
+
|
|
34
|
+
@field_validator('t')
|
|
35
|
+
def t_validate_enum(cls, value):
|
|
36
|
+
"""Validates the enum"""
|
|
37
|
+
if value not in set(['MultiAssetInput']):
|
|
38
|
+
raise ValueError("must be one of enum values ('MultiAssetInput')")
|
|
39
|
+
return value
|
|
40
|
+
|
|
41
|
+
model_config = ConfigDict(
|
|
42
|
+
populate_by_name=True,
|
|
43
|
+
validate_assignment=True,
|
|
44
|
+
protected_namespaces=(),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def to_str(self) -> str:
|
|
49
|
+
"""Returns the string representation of the model using alias"""
|
|
50
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
51
|
+
|
|
52
|
+
def to_json(self) -> str:
|
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
|
54
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
55
|
+
return json.dumps(self.to_dict())
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
|
+
"""Create an instance of MultiAssetInput3 from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
61
|
+
|
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
|
64
|
+
|
|
65
|
+
This has the following differences from calling pydantic's
|
|
66
|
+
`self.model_dump(by_alias=True)`:
|
|
67
|
+
|
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
|
69
|
+
were set at model initialization. Other fields with value `None`
|
|
70
|
+
are ignored.
|
|
71
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
72
|
+
"""
|
|
73
|
+
excluded_fields: Set[str] = set([
|
|
74
|
+
"identifier",
|
|
75
|
+
])
|
|
76
|
+
|
|
77
|
+
_dict = self.model_dump(
|
|
78
|
+
by_alias=True,
|
|
79
|
+
exclude=excluded_fields,
|
|
80
|
+
exclude_none=True,
|
|
81
|
+
)
|
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of each item in assets (list)
|
|
83
|
+
_items = []
|
|
84
|
+
if self.assets:
|
|
85
|
+
for _item_assets in self.assets:
|
|
86
|
+
if _item_assets:
|
|
87
|
+
_items.append(_item_assets.to_dict())
|
|
88
|
+
_dict['assets'] = _items
|
|
89
|
+
return _dict
|
|
90
|
+
|
|
91
|
+
@classmethod
|
|
92
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
93
|
+
"""Create an instance of MultiAssetInput3 from a dict"""
|
|
94
|
+
if obj is None:
|
|
95
|
+
return None
|
|
96
|
+
|
|
97
|
+
if not isinstance(obj, dict):
|
|
98
|
+
return cls.model_validate(obj)
|
|
99
|
+
|
|
100
|
+
_obj = cls.model_validate({
|
|
101
|
+
"_t": obj.get("_t") if obj.get("_t") is not None else 'MultiAssetInput',
|
|
102
|
+
"assets": [MultiAssetInput3AssetsInner.from_dict(_item) for _item in obj["assets"]] if obj.get("assets") is not None else None,
|
|
103
|
+
"identifier": obj.get("identifier")
|
|
104
|
+
})
|
|
105
|
+
return _obj
|
|
106
|
+
|
|
107
|
+
from rapidata.api_client.models.multi_asset_input3_assets_inner import MultiAssetInput3AssetsInner
|
|
108
|
+
# TODO: Rewrite to not use raise_errors
|
|
109
|
+
MultiAssetInput3.model_rebuild(raise_errors=False)
|
|
110
|
+
|