rapidata 2.40.6__py3-none-any.whl → 2.41.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 +2 -1
- rapidata/api_client/__init__.py +5 -3
- rapidata/api_client/api/benchmark_api.py +610 -7
- rapidata/api_client/api/campaign_api.py +283 -0
- rapidata/api_client/api/evaluation_workflow_api.py +18 -72
- rapidata/api_client/api/identity_api.py +0 -278
- rapidata/api_client/api/leaderboard_api.py +9 -9
- rapidata/api_client/api/validation_set_api.py +5 -15
- rapidata/api_client/models/__init__.py +5 -3
- rapidata/api_client/models/benchmark_query_result.py +3 -1
- rapidata/api_client/models/create_benchmark_participant_result.py +2 -2
- rapidata/api_client/models/create_benchmark_prompt_result.py +87 -0
- rapidata/api_client/models/get_benchmark_by_id_result.py +4 -2
- rapidata/api_client/models/get_evaluation_workflow_results_model.py +114 -0
- rapidata/api_client/models/get_participant_by_id_result.py +2 -4
- rapidata/api_client/models/get_standing_by_id_result.py +2 -9
- rapidata/api_client/models/labeling_selection.py +9 -2
- rapidata/api_client/models/participant_by_benchmark.py +1 -3
- rapidata/api_client/models/standing_by_benchmark.py +113 -0
- rapidata/api_client/models/standing_by_leaderboard.py +1 -3
- rapidata/api_client/models/standings_by_benchmark_result.py +95 -0
- rapidata/api_client/models/sticky_state.py +1 -0
- rapidata/api_client/models/update_benchmark_model.py +5 -3
- rapidata/api_client/models/update_priority_model.py +87 -0
- rapidata/api_client/models/validation_set_model.py +32 -2
- rapidata/api_client_README.md +9 -5
- rapidata/rapidata_client/__init__.py +1 -0
- rapidata/rapidata_client/api/rapidata_api_client.py +3 -3
- rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py +3 -3
- rapidata/rapidata_client/settings/__init__.py +1 -0
- rapidata/rapidata_client/settings/rapidata_settings.py +3 -0
- rapidata/rapidata_client/settings/swap_context_instruction.py +20 -0
- rapidata/rapidata_client/validation/rapids/rapids.py +13 -0
- {rapidata-2.40.6.dist-info → rapidata-2.41.0.dist-info}/METADATA +1 -1
- {rapidata-2.40.6.dist-info → rapidata-2.41.0.dist-info}/RECORD +37 -31
- {rapidata-2.40.6.dist-info → rapidata-2.41.0.dist-info}/LICENSE +0 -0
- {rapidata-2.40.6.dist-info → rapidata-2.41.0.dist-info}/WHEEL +0 -0
|
@@ -16,19 +16,22 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
|
16
16
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
17
|
from typing_extensions import Annotated
|
|
18
18
|
|
|
19
|
-
from pydantic import Field, StrictStr
|
|
20
|
-
from typing import Optional
|
|
19
|
+
from pydantic import Field, StrictBool, StrictStr
|
|
20
|
+
from typing import List, Optional
|
|
21
21
|
from typing_extensions import Annotated
|
|
22
22
|
from rapidata.api_client.models.benchmark_query_result_paged_result import BenchmarkQueryResultPagedResult
|
|
23
23
|
from rapidata.api_client.models.create_benchmark_model import CreateBenchmarkModel
|
|
24
24
|
from rapidata.api_client.models.create_benchmark_participant_model import CreateBenchmarkParticipantModel
|
|
25
25
|
from rapidata.api_client.models.create_benchmark_participant_result import CreateBenchmarkParticipantResult
|
|
26
|
+
from rapidata.api_client.models.create_benchmark_prompt_result import CreateBenchmarkPromptResult
|
|
26
27
|
from rapidata.api_client.models.create_benchmark_result import CreateBenchmarkResult
|
|
27
28
|
from rapidata.api_client.models.get_benchmark_by_id_result import GetBenchmarkByIdResult
|
|
29
|
+
from rapidata.api_client.models.leaderboard_query_result_paged_result import LeaderboardQueryResultPagedResult
|
|
28
30
|
from rapidata.api_client.models.participant_by_benchmark_paged_result import ParticipantByBenchmarkPagedResult
|
|
29
31
|
from rapidata.api_client.models.prompt_by_benchmark_result_paged_result import PromptByBenchmarkResultPagedResult
|
|
30
32
|
from rapidata.api_client.models.query_model import QueryModel
|
|
31
33
|
from rapidata.api_client.models.sample_by_identifier_paged_result import SampleByIdentifierPagedResult
|
|
34
|
+
from rapidata.api_client.models.standings_by_benchmark_result import StandingsByBenchmarkResult
|
|
32
35
|
from rapidata.api_client.models.submit_prompt_model import SubmitPromptModel
|
|
33
36
|
from rapidata.api_client.models.tags_by_benchmark_result import TagsByBenchmarkResult
|
|
34
37
|
from rapidata.api_client.models.update_benchmark_model import UpdateBenchmarkModel
|
|
@@ -564,6 +567,284 @@ class BenchmarkApi:
|
|
|
564
567
|
|
|
565
568
|
|
|
566
569
|
|
|
570
|
+
@validate_call
|
|
571
|
+
def benchmark_benchmark_id_leaderboards_get(
|
|
572
|
+
self,
|
|
573
|
+
benchmark_id: Annotated[StrictStr, Field(description="The Id of the benchmark whoms leaderboards will be returned")],
|
|
574
|
+
request: Annotated[Optional[QueryModel], Field(description="Query parameters")] = None,
|
|
575
|
+
_request_timeout: Union[
|
|
576
|
+
None,
|
|
577
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
578
|
+
Tuple[
|
|
579
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
580
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
581
|
+
]
|
|
582
|
+
] = None,
|
|
583
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
584
|
+
_content_type: Optional[StrictStr] = None,
|
|
585
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
586
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
587
|
+
) -> LeaderboardQueryResultPagedResult:
|
|
588
|
+
"""Queries all leaderboards for the current user's benchmarks.
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
:param benchmark_id: The Id of the benchmark whoms leaderboards will be returned (required)
|
|
592
|
+
:type benchmark_id: str
|
|
593
|
+
:param request: Query parameters
|
|
594
|
+
:type request: QueryModel
|
|
595
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
596
|
+
number provided, it will be total request
|
|
597
|
+
timeout. It can also be a pair (tuple) of
|
|
598
|
+
(connection, read) timeouts.
|
|
599
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
600
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
601
|
+
request; this effectively ignores the
|
|
602
|
+
authentication in the spec for a single request.
|
|
603
|
+
:type _request_auth: dict, optional
|
|
604
|
+
:param _content_type: force content-type for the request.
|
|
605
|
+
:type _content_type: str, Optional
|
|
606
|
+
:param _headers: set to override the headers for a single
|
|
607
|
+
request; this effectively ignores the headers
|
|
608
|
+
in the spec for a single request.
|
|
609
|
+
:type _headers: dict, optional
|
|
610
|
+
:param _host_index: set to override the host_index for a single
|
|
611
|
+
request; this effectively ignores the host_index
|
|
612
|
+
in the spec for a single request.
|
|
613
|
+
:type _host_index: int, optional
|
|
614
|
+
:return: Returns the result object.
|
|
615
|
+
""" # noqa: E501
|
|
616
|
+
|
|
617
|
+
_param = self._benchmark_benchmark_id_leaderboards_get_serialize(
|
|
618
|
+
benchmark_id=benchmark_id,
|
|
619
|
+
request=request,
|
|
620
|
+
_request_auth=_request_auth,
|
|
621
|
+
_content_type=_content_type,
|
|
622
|
+
_headers=_headers,
|
|
623
|
+
_host_index=_host_index
|
|
624
|
+
)
|
|
625
|
+
|
|
626
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
627
|
+
'200': "LeaderboardQueryResultPagedResult",
|
|
628
|
+
}
|
|
629
|
+
response_data = self.api_client.call_api(
|
|
630
|
+
*_param,
|
|
631
|
+
_request_timeout=_request_timeout
|
|
632
|
+
)
|
|
633
|
+
response_data.read()
|
|
634
|
+
return self.api_client.response_deserialize(
|
|
635
|
+
response_data=response_data,
|
|
636
|
+
response_types_map=_response_types_map,
|
|
637
|
+
).data
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
@validate_call
|
|
641
|
+
def benchmark_benchmark_id_leaderboards_get_with_http_info(
|
|
642
|
+
self,
|
|
643
|
+
benchmark_id: Annotated[StrictStr, Field(description="The Id of the benchmark whoms leaderboards will be returned")],
|
|
644
|
+
request: Annotated[Optional[QueryModel], Field(description="Query parameters")] = None,
|
|
645
|
+
_request_timeout: Union[
|
|
646
|
+
None,
|
|
647
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
648
|
+
Tuple[
|
|
649
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
650
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
651
|
+
]
|
|
652
|
+
] = None,
|
|
653
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
654
|
+
_content_type: Optional[StrictStr] = None,
|
|
655
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
656
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
657
|
+
) -> ApiResponse[LeaderboardQueryResultPagedResult]:
|
|
658
|
+
"""Queries all leaderboards for the current user's benchmarks.
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
:param benchmark_id: The Id of the benchmark whoms leaderboards will be returned (required)
|
|
662
|
+
:type benchmark_id: str
|
|
663
|
+
:param request: Query parameters
|
|
664
|
+
:type request: QueryModel
|
|
665
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
666
|
+
number provided, it will be total request
|
|
667
|
+
timeout. It can also be a pair (tuple) of
|
|
668
|
+
(connection, read) timeouts.
|
|
669
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
670
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
671
|
+
request; this effectively ignores the
|
|
672
|
+
authentication in the spec for a single request.
|
|
673
|
+
:type _request_auth: dict, optional
|
|
674
|
+
:param _content_type: force content-type for the request.
|
|
675
|
+
:type _content_type: str, Optional
|
|
676
|
+
:param _headers: set to override the headers for a single
|
|
677
|
+
request; this effectively ignores the headers
|
|
678
|
+
in the spec for a single request.
|
|
679
|
+
:type _headers: dict, optional
|
|
680
|
+
:param _host_index: set to override the host_index for a single
|
|
681
|
+
request; this effectively ignores the host_index
|
|
682
|
+
in the spec for a single request.
|
|
683
|
+
:type _host_index: int, optional
|
|
684
|
+
:return: Returns the result object.
|
|
685
|
+
""" # noqa: E501
|
|
686
|
+
|
|
687
|
+
_param = self._benchmark_benchmark_id_leaderboards_get_serialize(
|
|
688
|
+
benchmark_id=benchmark_id,
|
|
689
|
+
request=request,
|
|
690
|
+
_request_auth=_request_auth,
|
|
691
|
+
_content_type=_content_type,
|
|
692
|
+
_headers=_headers,
|
|
693
|
+
_host_index=_host_index
|
|
694
|
+
)
|
|
695
|
+
|
|
696
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
697
|
+
'200': "LeaderboardQueryResultPagedResult",
|
|
698
|
+
}
|
|
699
|
+
response_data = self.api_client.call_api(
|
|
700
|
+
*_param,
|
|
701
|
+
_request_timeout=_request_timeout
|
|
702
|
+
)
|
|
703
|
+
response_data.read()
|
|
704
|
+
return self.api_client.response_deserialize(
|
|
705
|
+
response_data=response_data,
|
|
706
|
+
response_types_map=_response_types_map,
|
|
707
|
+
)
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
@validate_call
|
|
711
|
+
def benchmark_benchmark_id_leaderboards_get_without_preload_content(
|
|
712
|
+
self,
|
|
713
|
+
benchmark_id: Annotated[StrictStr, Field(description="The Id of the benchmark whoms leaderboards will be returned")],
|
|
714
|
+
request: Annotated[Optional[QueryModel], Field(description="Query parameters")] = None,
|
|
715
|
+
_request_timeout: Union[
|
|
716
|
+
None,
|
|
717
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
718
|
+
Tuple[
|
|
719
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
720
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
721
|
+
]
|
|
722
|
+
] = None,
|
|
723
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
724
|
+
_content_type: Optional[StrictStr] = None,
|
|
725
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
726
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
727
|
+
) -> RESTResponseType:
|
|
728
|
+
"""Queries all leaderboards for the current user's benchmarks.
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
:param benchmark_id: The Id of the benchmark whoms leaderboards will be returned (required)
|
|
732
|
+
:type benchmark_id: str
|
|
733
|
+
:param request: Query parameters
|
|
734
|
+
:type request: QueryModel
|
|
735
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
736
|
+
number provided, it will be total request
|
|
737
|
+
timeout. It can also be a pair (tuple) of
|
|
738
|
+
(connection, read) timeouts.
|
|
739
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
740
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
741
|
+
request; this effectively ignores the
|
|
742
|
+
authentication in the spec for a single request.
|
|
743
|
+
:type _request_auth: dict, optional
|
|
744
|
+
:param _content_type: force content-type for the request.
|
|
745
|
+
:type _content_type: str, Optional
|
|
746
|
+
:param _headers: set to override the headers for a single
|
|
747
|
+
request; this effectively ignores the headers
|
|
748
|
+
in the spec for a single request.
|
|
749
|
+
:type _headers: dict, optional
|
|
750
|
+
:param _host_index: set to override the host_index for a single
|
|
751
|
+
request; this effectively ignores the host_index
|
|
752
|
+
in the spec for a single request.
|
|
753
|
+
:type _host_index: int, optional
|
|
754
|
+
:return: Returns the result object.
|
|
755
|
+
""" # noqa: E501
|
|
756
|
+
|
|
757
|
+
_param = self._benchmark_benchmark_id_leaderboards_get_serialize(
|
|
758
|
+
benchmark_id=benchmark_id,
|
|
759
|
+
request=request,
|
|
760
|
+
_request_auth=_request_auth,
|
|
761
|
+
_content_type=_content_type,
|
|
762
|
+
_headers=_headers,
|
|
763
|
+
_host_index=_host_index
|
|
764
|
+
)
|
|
765
|
+
|
|
766
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
767
|
+
'200': "LeaderboardQueryResultPagedResult",
|
|
768
|
+
}
|
|
769
|
+
response_data = self.api_client.call_api(
|
|
770
|
+
*_param,
|
|
771
|
+
_request_timeout=_request_timeout
|
|
772
|
+
)
|
|
773
|
+
return response_data.response
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
def _benchmark_benchmark_id_leaderboards_get_serialize(
|
|
777
|
+
self,
|
|
778
|
+
benchmark_id,
|
|
779
|
+
request,
|
|
780
|
+
_request_auth,
|
|
781
|
+
_content_type,
|
|
782
|
+
_headers,
|
|
783
|
+
_host_index,
|
|
784
|
+
) -> RequestSerialized:
|
|
785
|
+
|
|
786
|
+
_host = None
|
|
787
|
+
|
|
788
|
+
_collection_formats: Dict[str, str] = {
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
_path_params: Dict[str, str] = {}
|
|
792
|
+
_query_params: List[Tuple[str, str]] = []
|
|
793
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
794
|
+
_form_params: List[Tuple[str, str]] = []
|
|
795
|
+
_files: Dict[
|
|
796
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
797
|
+
] = {}
|
|
798
|
+
_body_params: Optional[bytes] = None
|
|
799
|
+
|
|
800
|
+
# process the path parameters
|
|
801
|
+
if benchmark_id is not None:
|
|
802
|
+
_path_params['benchmarkId'] = benchmark_id
|
|
803
|
+
# process the query parameters
|
|
804
|
+
if request is not None:
|
|
805
|
+
|
|
806
|
+
_query_params.append(('request', request))
|
|
807
|
+
|
|
808
|
+
# process the header parameters
|
|
809
|
+
# process the form parameters
|
|
810
|
+
# process the body parameter
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
# set the HTTP header `Accept`
|
|
814
|
+
if 'Accept' not in _header_params:
|
|
815
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
816
|
+
[
|
|
817
|
+
'text/plain',
|
|
818
|
+
'application/json',
|
|
819
|
+
'text/json'
|
|
820
|
+
]
|
|
821
|
+
)
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
# authentication setting
|
|
825
|
+
_auth_settings: List[str] = [
|
|
826
|
+
'bearer',
|
|
827
|
+
'oauth2'
|
|
828
|
+
]
|
|
829
|
+
|
|
830
|
+
return self.api_client.param_serialize(
|
|
831
|
+
method='GET',
|
|
832
|
+
resource_path='/benchmark/{benchmarkId}/leaderboards',
|
|
833
|
+
path_params=_path_params,
|
|
834
|
+
query_params=_query_params,
|
|
835
|
+
header_params=_header_params,
|
|
836
|
+
body=_body_params,
|
|
837
|
+
post_params=_form_params,
|
|
838
|
+
files=_files,
|
|
839
|
+
auth_settings=_auth_settings,
|
|
840
|
+
collection_formats=_collection_formats,
|
|
841
|
+
_host=_host,
|
|
842
|
+
_request_auth=_request_auth
|
|
843
|
+
)
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
|
|
847
|
+
|
|
567
848
|
@validate_call
|
|
568
849
|
def benchmark_benchmark_id_participants_get(
|
|
569
850
|
self,
|
|
@@ -1415,7 +1696,7 @@ class BenchmarkApi:
|
|
|
1415
1696
|
_content_type: Optional[StrictStr] = None,
|
|
1416
1697
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1417
1698
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1418
|
-
) ->
|
|
1699
|
+
) -> CreateBenchmarkPromptResult:
|
|
1419
1700
|
"""Adds a new prompt to a benchmark.
|
|
1420
1701
|
|
|
1421
1702
|
|
|
@@ -1455,7 +1736,7 @@ class BenchmarkApi:
|
|
|
1455
1736
|
)
|
|
1456
1737
|
|
|
1457
1738
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1458
|
-
'
|
|
1739
|
+
'200': "CreateBenchmarkPromptResult",
|
|
1459
1740
|
}
|
|
1460
1741
|
response_data = self.api_client.call_api(
|
|
1461
1742
|
*_param,
|
|
@@ -1485,7 +1766,7 @@ class BenchmarkApi:
|
|
|
1485
1766
|
_content_type: Optional[StrictStr] = None,
|
|
1486
1767
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1487
1768
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1488
|
-
) -> ApiResponse[
|
|
1769
|
+
) -> ApiResponse[CreateBenchmarkPromptResult]:
|
|
1489
1770
|
"""Adds a new prompt to a benchmark.
|
|
1490
1771
|
|
|
1491
1772
|
|
|
@@ -1525,7 +1806,7 @@ class BenchmarkApi:
|
|
|
1525
1806
|
)
|
|
1526
1807
|
|
|
1527
1808
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1528
|
-
'
|
|
1809
|
+
'200': "CreateBenchmarkPromptResult",
|
|
1529
1810
|
}
|
|
1530
1811
|
response_data = self.api_client.call_api(
|
|
1531
1812
|
*_param,
|
|
@@ -1595,7 +1876,7 @@ class BenchmarkApi:
|
|
|
1595
1876
|
)
|
|
1596
1877
|
|
|
1597
1878
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1598
|
-
'
|
|
1879
|
+
'200': "CreateBenchmarkPromptResult",
|
|
1599
1880
|
}
|
|
1600
1881
|
response_data = self.api_client.call_api(
|
|
1601
1882
|
*_param,
|
|
@@ -1639,6 +1920,15 @@ class BenchmarkApi:
|
|
|
1639
1920
|
_body_params = submit_prompt_model
|
|
1640
1921
|
|
|
1641
1922
|
|
|
1923
|
+
# set the HTTP header `Accept`
|
|
1924
|
+
if 'Accept' not in _header_params:
|
|
1925
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1926
|
+
[
|
|
1927
|
+
'text/plain',
|
|
1928
|
+
'application/json',
|
|
1929
|
+
'text/json'
|
|
1930
|
+
]
|
|
1931
|
+
)
|
|
1642
1932
|
|
|
1643
1933
|
# set the HTTP header `Content-Type`
|
|
1644
1934
|
if _content_type:
|
|
@@ -2251,6 +2541,319 @@ class BenchmarkApi:
|
|
|
2251
2541
|
|
|
2252
2542
|
|
|
2253
2543
|
|
|
2544
|
+
@validate_call
|
|
2545
|
+
def benchmark_benchmark_id_standings_get(
|
|
2546
|
+
self,
|
|
2547
|
+
benchmark_id: Annotated[StrictStr, Field(description="The id of the benchmark, which standings should be queried")],
|
|
2548
|
+
tags: Annotated[Optional[List[StrictStr]], Field(description="The tags the benchmark should filter for.")] = None,
|
|
2549
|
+
use_weighted_scoring: Annotated[Optional[StrictBool], Field(description="Whether to use weighted scoring based on user scores (defaults to false for backwards compatibility)")] = None,
|
|
2550
|
+
include_confidence_intervals: Annotated[Optional[StrictBool], Field(description="Whether to include the confidence intervals")] = None,
|
|
2551
|
+
_request_timeout: Union[
|
|
2552
|
+
None,
|
|
2553
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2554
|
+
Tuple[
|
|
2555
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2556
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2557
|
+
]
|
|
2558
|
+
] = None,
|
|
2559
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2560
|
+
_content_type: Optional[StrictStr] = None,
|
|
2561
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2562
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2563
|
+
) -> StandingsByBenchmarkResult:
|
|
2564
|
+
"""Queries all the standings for a benchmark by its ID.
|
|
2565
|
+
|
|
2566
|
+
|
|
2567
|
+
:param benchmark_id: The id of the benchmark, which standings should be queried (required)
|
|
2568
|
+
:type benchmark_id: str
|
|
2569
|
+
:param tags: The tags the benchmark should filter for.
|
|
2570
|
+
:type tags: List[str]
|
|
2571
|
+
:param use_weighted_scoring: Whether to use weighted scoring based on user scores (defaults to false for backwards compatibility)
|
|
2572
|
+
:type use_weighted_scoring: bool
|
|
2573
|
+
:param include_confidence_intervals: Whether to include the confidence intervals
|
|
2574
|
+
:type include_confidence_intervals: bool
|
|
2575
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2576
|
+
number provided, it will be total request
|
|
2577
|
+
timeout. It can also be a pair (tuple) of
|
|
2578
|
+
(connection, read) timeouts.
|
|
2579
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2580
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2581
|
+
request; this effectively ignores the
|
|
2582
|
+
authentication in the spec for a single request.
|
|
2583
|
+
:type _request_auth: dict, optional
|
|
2584
|
+
:param _content_type: force content-type for the request.
|
|
2585
|
+
:type _content_type: str, Optional
|
|
2586
|
+
:param _headers: set to override the headers for a single
|
|
2587
|
+
request; this effectively ignores the headers
|
|
2588
|
+
in the spec for a single request.
|
|
2589
|
+
:type _headers: dict, optional
|
|
2590
|
+
:param _host_index: set to override the host_index for a single
|
|
2591
|
+
request; this effectively ignores the host_index
|
|
2592
|
+
in the spec for a single request.
|
|
2593
|
+
:type _host_index: int, optional
|
|
2594
|
+
:return: Returns the result object.
|
|
2595
|
+
""" # noqa: E501
|
|
2596
|
+
|
|
2597
|
+
_param = self._benchmark_benchmark_id_standings_get_serialize(
|
|
2598
|
+
benchmark_id=benchmark_id,
|
|
2599
|
+
tags=tags,
|
|
2600
|
+
use_weighted_scoring=use_weighted_scoring,
|
|
2601
|
+
include_confidence_intervals=include_confidence_intervals,
|
|
2602
|
+
_request_auth=_request_auth,
|
|
2603
|
+
_content_type=_content_type,
|
|
2604
|
+
_headers=_headers,
|
|
2605
|
+
_host_index=_host_index
|
|
2606
|
+
)
|
|
2607
|
+
|
|
2608
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2609
|
+
'200': "StandingsByBenchmarkResult",
|
|
2610
|
+
}
|
|
2611
|
+
response_data = self.api_client.call_api(
|
|
2612
|
+
*_param,
|
|
2613
|
+
_request_timeout=_request_timeout
|
|
2614
|
+
)
|
|
2615
|
+
response_data.read()
|
|
2616
|
+
return self.api_client.response_deserialize(
|
|
2617
|
+
response_data=response_data,
|
|
2618
|
+
response_types_map=_response_types_map,
|
|
2619
|
+
).data
|
|
2620
|
+
|
|
2621
|
+
|
|
2622
|
+
@validate_call
|
|
2623
|
+
def benchmark_benchmark_id_standings_get_with_http_info(
|
|
2624
|
+
self,
|
|
2625
|
+
benchmark_id: Annotated[StrictStr, Field(description="The id of the benchmark, which standings should be queried")],
|
|
2626
|
+
tags: Annotated[Optional[List[StrictStr]], Field(description="The tags the benchmark should filter for.")] = None,
|
|
2627
|
+
use_weighted_scoring: Annotated[Optional[StrictBool], Field(description="Whether to use weighted scoring based on user scores (defaults to false for backwards compatibility)")] = None,
|
|
2628
|
+
include_confidence_intervals: Annotated[Optional[StrictBool], Field(description="Whether to include the confidence intervals")] = None,
|
|
2629
|
+
_request_timeout: Union[
|
|
2630
|
+
None,
|
|
2631
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2632
|
+
Tuple[
|
|
2633
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2634
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2635
|
+
]
|
|
2636
|
+
] = None,
|
|
2637
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2638
|
+
_content_type: Optional[StrictStr] = None,
|
|
2639
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2640
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2641
|
+
) -> ApiResponse[StandingsByBenchmarkResult]:
|
|
2642
|
+
"""Queries all the standings for a benchmark by its ID.
|
|
2643
|
+
|
|
2644
|
+
|
|
2645
|
+
:param benchmark_id: The id of the benchmark, which standings should be queried (required)
|
|
2646
|
+
:type benchmark_id: str
|
|
2647
|
+
:param tags: The tags the benchmark should filter for.
|
|
2648
|
+
:type tags: List[str]
|
|
2649
|
+
:param use_weighted_scoring: Whether to use weighted scoring based on user scores (defaults to false for backwards compatibility)
|
|
2650
|
+
:type use_weighted_scoring: bool
|
|
2651
|
+
:param include_confidence_intervals: Whether to include the confidence intervals
|
|
2652
|
+
:type include_confidence_intervals: bool
|
|
2653
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2654
|
+
number provided, it will be total request
|
|
2655
|
+
timeout. It can also be a pair (tuple) of
|
|
2656
|
+
(connection, read) timeouts.
|
|
2657
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2658
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2659
|
+
request; this effectively ignores the
|
|
2660
|
+
authentication in the spec for a single request.
|
|
2661
|
+
:type _request_auth: dict, optional
|
|
2662
|
+
:param _content_type: force content-type for the request.
|
|
2663
|
+
:type _content_type: str, Optional
|
|
2664
|
+
:param _headers: set to override the headers for a single
|
|
2665
|
+
request; this effectively ignores the headers
|
|
2666
|
+
in the spec for a single request.
|
|
2667
|
+
:type _headers: dict, optional
|
|
2668
|
+
:param _host_index: set to override the host_index for a single
|
|
2669
|
+
request; this effectively ignores the host_index
|
|
2670
|
+
in the spec for a single request.
|
|
2671
|
+
:type _host_index: int, optional
|
|
2672
|
+
:return: Returns the result object.
|
|
2673
|
+
""" # noqa: E501
|
|
2674
|
+
|
|
2675
|
+
_param = self._benchmark_benchmark_id_standings_get_serialize(
|
|
2676
|
+
benchmark_id=benchmark_id,
|
|
2677
|
+
tags=tags,
|
|
2678
|
+
use_weighted_scoring=use_weighted_scoring,
|
|
2679
|
+
include_confidence_intervals=include_confidence_intervals,
|
|
2680
|
+
_request_auth=_request_auth,
|
|
2681
|
+
_content_type=_content_type,
|
|
2682
|
+
_headers=_headers,
|
|
2683
|
+
_host_index=_host_index
|
|
2684
|
+
)
|
|
2685
|
+
|
|
2686
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2687
|
+
'200': "StandingsByBenchmarkResult",
|
|
2688
|
+
}
|
|
2689
|
+
response_data = self.api_client.call_api(
|
|
2690
|
+
*_param,
|
|
2691
|
+
_request_timeout=_request_timeout
|
|
2692
|
+
)
|
|
2693
|
+
response_data.read()
|
|
2694
|
+
return self.api_client.response_deserialize(
|
|
2695
|
+
response_data=response_data,
|
|
2696
|
+
response_types_map=_response_types_map,
|
|
2697
|
+
)
|
|
2698
|
+
|
|
2699
|
+
|
|
2700
|
+
@validate_call
|
|
2701
|
+
def benchmark_benchmark_id_standings_get_without_preload_content(
|
|
2702
|
+
self,
|
|
2703
|
+
benchmark_id: Annotated[StrictStr, Field(description="The id of the benchmark, which standings should be queried")],
|
|
2704
|
+
tags: Annotated[Optional[List[StrictStr]], Field(description="The tags the benchmark should filter for.")] = None,
|
|
2705
|
+
use_weighted_scoring: Annotated[Optional[StrictBool], Field(description="Whether to use weighted scoring based on user scores (defaults to false for backwards compatibility)")] = None,
|
|
2706
|
+
include_confidence_intervals: Annotated[Optional[StrictBool], Field(description="Whether to include the confidence intervals")] = None,
|
|
2707
|
+
_request_timeout: Union[
|
|
2708
|
+
None,
|
|
2709
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2710
|
+
Tuple[
|
|
2711
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2712
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2713
|
+
]
|
|
2714
|
+
] = None,
|
|
2715
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2716
|
+
_content_type: Optional[StrictStr] = None,
|
|
2717
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2718
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2719
|
+
) -> RESTResponseType:
|
|
2720
|
+
"""Queries all the standings for a benchmark by its ID.
|
|
2721
|
+
|
|
2722
|
+
|
|
2723
|
+
:param benchmark_id: The id of the benchmark, which standings should be queried (required)
|
|
2724
|
+
:type benchmark_id: str
|
|
2725
|
+
:param tags: The tags the benchmark should filter for.
|
|
2726
|
+
:type tags: List[str]
|
|
2727
|
+
:param use_weighted_scoring: Whether to use weighted scoring based on user scores (defaults to false for backwards compatibility)
|
|
2728
|
+
:type use_weighted_scoring: bool
|
|
2729
|
+
:param include_confidence_intervals: Whether to include the confidence intervals
|
|
2730
|
+
:type include_confidence_intervals: bool
|
|
2731
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2732
|
+
number provided, it will be total request
|
|
2733
|
+
timeout. It can also be a pair (tuple) of
|
|
2734
|
+
(connection, read) timeouts.
|
|
2735
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2736
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2737
|
+
request; this effectively ignores the
|
|
2738
|
+
authentication in the spec for a single request.
|
|
2739
|
+
:type _request_auth: dict, optional
|
|
2740
|
+
:param _content_type: force content-type for the request.
|
|
2741
|
+
:type _content_type: str, Optional
|
|
2742
|
+
:param _headers: set to override the headers for a single
|
|
2743
|
+
request; this effectively ignores the headers
|
|
2744
|
+
in the spec for a single request.
|
|
2745
|
+
:type _headers: dict, optional
|
|
2746
|
+
:param _host_index: set to override the host_index for a single
|
|
2747
|
+
request; this effectively ignores the host_index
|
|
2748
|
+
in the spec for a single request.
|
|
2749
|
+
:type _host_index: int, optional
|
|
2750
|
+
:return: Returns the result object.
|
|
2751
|
+
""" # noqa: E501
|
|
2752
|
+
|
|
2753
|
+
_param = self._benchmark_benchmark_id_standings_get_serialize(
|
|
2754
|
+
benchmark_id=benchmark_id,
|
|
2755
|
+
tags=tags,
|
|
2756
|
+
use_weighted_scoring=use_weighted_scoring,
|
|
2757
|
+
include_confidence_intervals=include_confidence_intervals,
|
|
2758
|
+
_request_auth=_request_auth,
|
|
2759
|
+
_content_type=_content_type,
|
|
2760
|
+
_headers=_headers,
|
|
2761
|
+
_host_index=_host_index
|
|
2762
|
+
)
|
|
2763
|
+
|
|
2764
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2765
|
+
'200': "StandingsByBenchmarkResult",
|
|
2766
|
+
}
|
|
2767
|
+
response_data = self.api_client.call_api(
|
|
2768
|
+
*_param,
|
|
2769
|
+
_request_timeout=_request_timeout
|
|
2770
|
+
)
|
|
2771
|
+
return response_data.response
|
|
2772
|
+
|
|
2773
|
+
|
|
2774
|
+
def _benchmark_benchmark_id_standings_get_serialize(
|
|
2775
|
+
self,
|
|
2776
|
+
benchmark_id,
|
|
2777
|
+
tags,
|
|
2778
|
+
use_weighted_scoring,
|
|
2779
|
+
include_confidence_intervals,
|
|
2780
|
+
_request_auth,
|
|
2781
|
+
_content_type,
|
|
2782
|
+
_headers,
|
|
2783
|
+
_host_index,
|
|
2784
|
+
) -> RequestSerialized:
|
|
2785
|
+
|
|
2786
|
+
_host = None
|
|
2787
|
+
|
|
2788
|
+
_collection_formats: Dict[str, str] = {
|
|
2789
|
+
'tags': 'multi',
|
|
2790
|
+
}
|
|
2791
|
+
|
|
2792
|
+
_path_params: Dict[str, str] = {}
|
|
2793
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2794
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2795
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2796
|
+
_files: Dict[
|
|
2797
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2798
|
+
] = {}
|
|
2799
|
+
_body_params: Optional[bytes] = None
|
|
2800
|
+
|
|
2801
|
+
# process the path parameters
|
|
2802
|
+
if benchmark_id is not None:
|
|
2803
|
+
_path_params['benchmarkId'] = benchmark_id
|
|
2804
|
+
# process the query parameters
|
|
2805
|
+
if tags is not None:
|
|
2806
|
+
|
|
2807
|
+
_query_params.append(('tags', tags))
|
|
2808
|
+
|
|
2809
|
+
if use_weighted_scoring is not None:
|
|
2810
|
+
|
|
2811
|
+
_query_params.append(('useWeightedScoring', use_weighted_scoring))
|
|
2812
|
+
|
|
2813
|
+
if include_confidence_intervals is not None:
|
|
2814
|
+
|
|
2815
|
+
_query_params.append(('includeConfidenceIntervals', include_confidence_intervals))
|
|
2816
|
+
|
|
2817
|
+
# process the header parameters
|
|
2818
|
+
# process the form parameters
|
|
2819
|
+
# process the body parameter
|
|
2820
|
+
|
|
2821
|
+
|
|
2822
|
+
# set the HTTP header `Accept`
|
|
2823
|
+
if 'Accept' not in _header_params:
|
|
2824
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2825
|
+
[
|
|
2826
|
+
'text/plain',
|
|
2827
|
+
'application/json',
|
|
2828
|
+
'text/json'
|
|
2829
|
+
]
|
|
2830
|
+
)
|
|
2831
|
+
|
|
2832
|
+
|
|
2833
|
+
# authentication setting
|
|
2834
|
+
_auth_settings: List[str] = [
|
|
2835
|
+
'bearer',
|
|
2836
|
+
'oauth2'
|
|
2837
|
+
]
|
|
2838
|
+
|
|
2839
|
+
return self.api_client.param_serialize(
|
|
2840
|
+
method='GET',
|
|
2841
|
+
resource_path='/benchmark/{benchmarkId}/standings',
|
|
2842
|
+
path_params=_path_params,
|
|
2843
|
+
query_params=_query_params,
|
|
2844
|
+
header_params=_header_params,
|
|
2845
|
+
body=_body_params,
|
|
2846
|
+
post_params=_form_params,
|
|
2847
|
+
files=_files,
|
|
2848
|
+
auth_settings=_auth_settings,
|
|
2849
|
+
collection_formats=_collection_formats,
|
|
2850
|
+
_host=_host,
|
|
2851
|
+
_request_auth=_request_auth
|
|
2852
|
+
)
|
|
2853
|
+
|
|
2854
|
+
|
|
2855
|
+
|
|
2856
|
+
|
|
2254
2857
|
@validate_call
|
|
2255
2858
|
def benchmark_benchmark_id_tags_get(
|
|
2256
2859
|
self,
|