rapidata 2.30.0__py3-none-any.whl → 2.31.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/api/benchmark_api.py +267 -0
- rapidata/api_client/api/dataset_api.py +14 -14
- rapidata/api_client/api/validation_set_api.py +349 -6
- 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/standing_by_leaderboard.py +5 -3
- rapidata/api_client_README.md +2 -0
- rapidata/rapidata_client/assets/data_type_enum.py +1 -0
- 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 +8 -5
- rapidata/rapidata_client/order/rapidata_order_manager.py +25 -29
- rapidata/rapidata_client/validation/rapids/rapids.py +29 -47
- rapidata/rapidata_client/validation/rapids/rapids_manager.py +10 -11
- rapidata/rapidata_client/validation/validation_set_manager.py +15 -8
- {rapidata-2.30.0.dist-info → rapidata-2.31.1.dist-info}/METADATA +1 -1
- {rapidata-2.30.0.dist-info → rapidata-2.31.1.dist-info}/RECORD +22 -21
- {rapidata-2.30.0.dist-info → rapidata-2.31.1.dist-info}/LICENSE +0 -0
- {rapidata-2.30.0.dist-info → rapidata-2.31.1.dist-info}/WHEEL +0 -0
rapidata/__init__.py
CHANGED
|
@@ -1650,6 +1650,273 @@ class BenchmarkApi:
|
|
|
1650
1650
|
|
|
1651
1651
|
|
|
1652
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
|
+
|
|
1653
1920
|
@validate_call
|
|
1654
1921
|
def benchmark_benchmark_id_participants_participant_id_submit_post(
|
|
1655
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',
|