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.

Files changed (36) hide show
  1. rapidata/__init__.py +1 -1
  2. rapidata/api_client/__init__.py +5 -0
  3. rapidata/api_client/api/benchmark_api.py +550 -0
  4. rapidata/api_client/api/dataset_api.py +14 -14
  5. rapidata/api_client/api/leaderboard_api.py +562 -0
  6. rapidata/api_client/api/validation_set_api.py +349 -6
  7. rapidata/api_client/models/__init__.py +5 -0
  8. rapidata/api_client/models/file_type.py +1 -0
  9. rapidata/api_client/models/file_type_metadata.py +2 -2
  10. rapidata/api_client/models/file_type_metadata_model.py +2 -2
  11. rapidata/api_client/models/get_standing_by_id_result.py +4 -2
  12. rapidata/api_client/models/participant_by_benchmark.py +2 -2
  13. rapidata/api_client/models/participant_status.py +1 -0
  14. rapidata/api_client/models/prompt_by_benchmark_result.py +19 -3
  15. rapidata/api_client/models/run_status.py +39 -0
  16. rapidata/api_client/models/runs_by_leaderboard_result.py +110 -0
  17. rapidata/api_client/models/runs_by_leaderboard_result_paged_result.py +105 -0
  18. rapidata/api_client/models/standing_by_leaderboard.py +5 -3
  19. rapidata/api_client/models/update_benchmark_name_model.py +87 -0
  20. rapidata/api_client/models/update_leaderboard_name_model.py +87 -0
  21. rapidata/api_client_README.md +10 -0
  22. rapidata/rapidata_client/benchmark/leaderboard/rapidata_leaderboard.py +9 -0
  23. rapidata/rapidata_client/benchmark/rapidata_benchmark.py +66 -12
  24. rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py +24 -6
  25. rapidata/rapidata_client/filter/__init__.py +1 -0
  26. rapidata/rapidata_client/filter/_base_filter.py +20 -0
  27. rapidata/rapidata_client/filter/and_filter.py +30 -0
  28. rapidata/rapidata_client/filter/rapidata_filters.py +6 -3
  29. rapidata/rapidata_client/order/_rapidata_order_builder.py +13 -9
  30. rapidata/rapidata_client/order/rapidata_order_manager.py +2 -13
  31. rapidata/rapidata_client/validation/rapids/rapids.py +29 -47
  32. rapidata/rapidata_client/validation/validation_set_manager.py +10 -3
  33. {rapidata-2.29.1.dist-info → rapidata-2.31.0.dist-info}/METADATA +1 -1
  34. {rapidata-2.29.1.dist-info → rapidata-2.31.0.dist-info}/RECORD +36 -30
  35. {rapidata-2.29.1.dist-info → rapidata-2.31.0.dist-info}/LICENSE +0 -0
  36. {rapidata-2.29.1.dist-info → rapidata-2.31.0.dist-info}/WHEEL +0 -0
@@ -1402,7 +1402,7 @@ class ValidationSetApi:
1402
1402
  _headers: Optional[Dict[StrictStr, Any]] = None,
1403
1403
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1404
1404
  ) -> AddValidationRapidResult:
1405
- """Adds a new validation rapid to the specified validation set using files to create the assets.
1405
+ """(Deprecated) Adds a new validation rapid to the specified validation set using files to create the assets.
1406
1406
 
1407
1407
 
1408
1408
  :param validation_set_id: The ID of the validation set to add the rapid to. (required)
@@ -1432,6 +1432,7 @@ class ValidationSetApi:
1432
1432
  :type _host_index: int, optional
1433
1433
  :return: Returns the result object.
1434
1434
  """ # noqa: E501
1435
+ warnings.warn("POST /validation-set/{validationSetId}/rapid/files is deprecated.", DeprecationWarning)
1435
1436
 
1436
1437
  _param = self._validation_set_validation_set_id_rapid_files_post_serialize(
1437
1438
  validation_set_id=validation_set_id,
@@ -1476,7 +1477,7 @@ class ValidationSetApi:
1476
1477
  _headers: Optional[Dict[StrictStr, Any]] = None,
1477
1478
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1478
1479
  ) -> ApiResponse[AddValidationRapidResult]:
1479
- """Adds a new validation rapid to the specified validation set using files to create the assets.
1480
+ """(Deprecated) Adds a new validation rapid to the specified validation set using files to create the assets.
1480
1481
 
1481
1482
 
1482
1483
  :param validation_set_id: The ID of the validation set to add the rapid to. (required)
@@ -1506,6 +1507,7 @@ class ValidationSetApi:
1506
1507
  :type _host_index: int, optional
1507
1508
  :return: Returns the result object.
1508
1509
  """ # noqa: E501
1510
+ warnings.warn("POST /validation-set/{validationSetId}/rapid/files is deprecated.", DeprecationWarning)
1509
1511
 
1510
1512
  _param = self._validation_set_validation_set_id_rapid_files_post_serialize(
1511
1513
  validation_set_id=validation_set_id,
@@ -1550,7 +1552,7 @@ class ValidationSetApi:
1550
1552
  _headers: Optional[Dict[StrictStr, Any]] = None,
1551
1553
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1552
1554
  ) -> RESTResponseType:
1553
- """Adds a new validation rapid to the specified validation set using files to create the assets.
1555
+ """(Deprecated) Adds a new validation rapid to the specified validation set using files to create the assets.
1554
1556
 
1555
1557
 
1556
1558
  :param validation_set_id: The ID of the validation set to add the rapid to. (required)
@@ -1580,6 +1582,7 @@ class ValidationSetApi:
1580
1582
  :type _host_index: int, optional
1581
1583
  :return: Returns the result object.
1582
1584
  """ # noqa: E501
1585
+ warnings.warn("POST /validation-set/{validationSetId}/rapid/files is deprecated.", DeprecationWarning)
1583
1586
 
1584
1587
  _param = self._validation_set_validation_set_id_rapid_files_post_serialize(
1585
1588
  validation_set_id=validation_set_id,
@@ -1688,6 +1691,343 @@ class ValidationSetApi:
1688
1691
 
1689
1692
 
1690
1693
 
1694
+ @validate_call
1695
+ def validation_set_validation_set_id_rapid_post(
1696
+ self,
1697
+ validation_set_id: Annotated[StrictStr, Field(description="The ID of the validation set to add the rapid to.")],
1698
+ model: Optional[AddValidationRapidModel] = None,
1699
+ files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
1700
+ texts: Annotated[Optional[List[StrictStr]], Field(description="The texts to use for the rapid.")] = None,
1701
+ urls: Annotated[Optional[List[StrictStr]], Field(description="The urls to use for the rapid")] = None,
1702
+ _request_timeout: Union[
1703
+ None,
1704
+ Annotated[StrictFloat, Field(gt=0)],
1705
+ Tuple[
1706
+ Annotated[StrictFloat, Field(gt=0)],
1707
+ Annotated[StrictFloat, Field(gt=0)]
1708
+ ]
1709
+ ] = None,
1710
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1711
+ _content_type: Optional[StrictStr] = None,
1712
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1713
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1714
+ ) -> AddValidationRapidResult:
1715
+ """Adds a new validation rapid to the specified validation set using files to create the assets.
1716
+
1717
+
1718
+ :param validation_set_id: The ID of the validation set to add the rapid to. (required)
1719
+ :type validation_set_id: str
1720
+ :param model:
1721
+ :type model: AddValidationRapidModel
1722
+ :param files:
1723
+ :type files: List[bytearray]
1724
+ :param texts: The texts to use for the rapid.
1725
+ :type texts: List[str]
1726
+ :param urls: The urls to use for the rapid
1727
+ :type urls: List[str]
1728
+ :param _request_timeout: timeout setting for this request. If one
1729
+ number provided, it will be total request
1730
+ timeout. It can also be a pair (tuple) of
1731
+ (connection, read) timeouts.
1732
+ :type _request_timeout: int, tuple(int, int), optional
1733
+ :param _request_auth: set to override the auth_settings for an a single
1734
+ request; this effectively ignores the
1735
+ authentication in the spec for a single request.
1736
+ :type _request_auth: dict, optional
1737
+ :param _content_type: force content-type for the request.
1738
+ :type _content_type: str, Optional
1739
+ :param _headers: set to override the headers for a single
1740
+ request; this effectively ignores the headers
1741
+ in the spec for a single request.
1742
+ :type _headers: dict, optional
1743
+ :param _host_index: set to override the host_index for a single
1744
+ request; this effectively ignores the host_index
1745
+ in the spec for a single request.
1746
+ :type _host_index: int, optional
1747
+ :return: Returns the result object.
1748
+ """ # noqa: E501
1749
+
1750
+ _param = self._validation_set_validation_set_id_rapid_post_serialize(
1751
+ validation_set_id=validation_set_id,
1752
+ model=model,
1753
+ files=files,
1754
+ texts=texts,
1755
+ urls=urls,
1756
+ _request_auth=_request_auth,
1757
+ _content_type=_content_type,
1758
+ _headers=_headers,
1759
+ _host_index=_host_index
1760
+ )
1761
+
1762
+ _response_types_map: Dict[str, Optional[str]] = {
1763
+ '200': "AddValidationRapidResult",
1764
+ }
1765
+ response_data = self.api_client.call_api(
1766
+ *_param,
1767
+ _request_timeout=_request_timeout
1768
+ )
1769
+ response_data.read()
1770
+ return self.api_client.response_deserialize(
1771
+ response_data=response_data,
1772
+ response_types_map=_response_types_map,
1773
+ ).data
1774
+
1775
+
1776
+ @validate_call
1777
+ def validation_set_validation_set_id_rapid_post_with_http_info(
1778
+ self,
1779
+ validation_set_id: Annotated[StrictStr, Field(description="The ID of the validation set to add the rapid to.")],
1780
+ model: Optional[AddValidationRapidModel] = None,
1781
+ files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
1782
+ texts: Annotated[Optional[List[StrictStr]], Field(description="The texts to use for the rapid.")] = None,
1783
+ urls: Annotated[Optional[List[StrictStr]], Field(description="The urls to use for the rapid")] = None,
1784
+ _request_timeout: Union[
1785
+ None,
1786
+ Annotated[StrictFloat, Field(gt=0)],
1787
+ Tuple[
1788
+ Annotated[StrictFloat, Field(gt=0)],
1789
+ Annotated[StrictFloat, Field(gt=0)]
1790
+ ]
1791
+ ] = None,
1792
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1793
+ _content_type: Optional[StrictStr] = None,
1794
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1795
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1796
+ ) -> ApiResponse[AddValidationRapidResult]:
1797
+ """Adds a new validation rapid to the specified validation set using files to create the assets.
1798
+
1799
+
1800
+ :param validation_set_id: The ID of the validation set to add the rapid to. (required)
1801
+ :type validation_set_id: str
1802
+ :param model:
1803
+ :type model: AddValidationRapidModel
1804
+ :param files:
1805
+ :type files: List[bytearray]
1806
+ :param texts: The texts to use for the rapid.
1807
+ :type texts: List[str]
1808
+ :param urls: The urls to use for the rapid
1809
+ :type urls: List[str]
1810
+ :param _request_timeout: timeout setting for this request. If one
1811
+ number provided, it will be total request
1812
+ timeout. It can also be a pair (tuple) of
1813
+ (connection, read) timeouts.
1814
+ :type _request_timeout: int, tuple(int, int), optional
1815
+ :param _request_auth: set to override the auth_settings for an a single
1816
+ request; this effectively ignores the
1817
+ authentication in the spec for a single request.
1818
+ :type _request_auth: dict, optional
1819
+ :param _content_type: force content-type for the request.
1820
+ :type _content_type: str, Optional
1821
+ :param _headers: set to override the headers for a single
1822
+ request; this effectively ignores the headers
1823
+ in the spec for a single request.
1824
+ :type _headers: dict, optional
1825
+ :param _host_index: set to override the host_index for a single
1826
+ request; this effectively ignores the host_index
1827
+ in the spec for a single request.
1828
+ :type _host_index: int, optional
1829
+ :return: Returns the result object.
1830
+ """ # noqa: E501
1831
+
1832
+ _param = self._validation_set_validation_set_id_rapid_post_serialize(
1833
+ validation_set_id=validation_set_id,
1834
+ model=model,
1835
+ files=files,
1836
+ texts=texts,
1837
+ urls=urls,
1838
+ _request_auth=_request_auth,
1839
+ _content_type=_content_type,
1840
+ _headers=_headers,
1841
+ _host_index=_host_index
1842
+ )
1843
+
1844
+ _response_types_map: Dict[str, Optional[str]] = {
1845
+ '200': "AddValidationRapidResult",
1846
+ }
1847
+ response_data = self.api_client.call_api(
1848
+ *_param,
1849
+ _request_timeout=_request_timeout
1850
+ )
1851
+ response_data.read()
1852
+ return self.api_client.response_deserialize(
1853
+ response_data=response_data,
1854
+ response_types_map=_response_types_map,
1855
+ )
1856
+
1857
+
1858
+ @validate_call
1859
+ def validation_set_validation_set_id_rapid_post_without_preload_content(
1860
+ self,
1861
+ validation_set_id: Annotated[StrictStr, Field(description="The ID of the validation set to add the rapid to.")],
1862
+ model: Optional[AddValidationRapidModel] = None,
1863
+ files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
1864
+ texts: Annotated[Optional[List[StrictStr]], Field(description="The texts to use for the rapid.")] = None,
1865
+ urls: Annotated[Optional[List[StrictStr]], Field(description="The urls to use for the rapid")] = None,
1866
+ _request_timeout: Union[
1867
+ None,
1868
+ Annotated[StrictFloat, Field(gt=0)],
1869
+ Tuple[
1870
+ Annotated[StrictFloat, Field(gt=0)],
1871
+ Annotated[StrictFloat, Field(gt=0)]
1872
+ ]
1873
+ ] = None,
1874
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1875
+ _content_type: Optional[StrictStr] = None,
1876
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1877
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1878
+ ) -> RESTResponseType:
1879
+ """Adds a new validation rapid to the specified validation set using files to create the assets.
1880
+
1881
+
1882
+ :param validation_set_id: The ID of the validation set to add the rapid to. (required)
1883
+ :type validation_set_id: str
1884
+ :param model:
1885
+ :type model: AddValidationRapidModel
1886
+ :param files:
1887
+ :type files: List[bytearray]
1888
+ :param texts: The texts to use for the rapid.
1889
+ :type texts: List[str]
1890
+ :param urls: The urls to use for the rapid
1891
+ :type urls: List[str]
1892
+ :param _request_timeout: timeout setting for this request. If one
1893
+ number provided, it will be total request
1894
+ timeout. It can also be a pair (tuple) of
1895
+ (connection, read) timeouts.
1896
+ :type _request_timeout: int, tuple(int, int), optional
1897
+ :param _request_auth: set to override the auth_settings for an a single
1898
+ request; this effectively ignores the
1899
+ authentication in the spec for a single request.
1900
+ :type _request_auth: dict, optional
1901
+ :param _content_type: force content-type for the request.
1902
+ :type _content_type: str, Optional
1903
+ :param _headers: set to override the headers for a single
1904
+ request; this effectively ignores the headers
1905
+ in the spec for a single request.
1906
+ :type _headers: dict, optional
1907
+ :param _host_index: set to override the host_index for a single
1908
+ request; this effectively ignores the host_index
1909
+ in the spec for a single request.
1910
+ :type _host_index: int, optional
1911
+ :return: Returns the result object.
1912
+ """ # noqa: E501
1913
+
1914
+ _param = self._validation_set_validation_set_id_rapid_post_serialize(
1915
+ validation_set_id=validation_set_id,
1916
+ model=model,
1917
+ files=files,
1918
+ texts=texts,
1919
+ urls=urls,
1920
+ _request_auth=_request_auth,
1921
+ _content_type=_content_type,
1922
+ _headers=_headers,
1923
+ _host_index=_host_index
1924
+ )
1925
+
1926
+ _response_types_map: Dict[str, Optional[str]] = {
1927
+ '200': "AddValidationRapidResult",
1928
+ }
1929
+ response_data = self.api_client.call_api(
1930
+ *_param,
1931
+ _request_timeout=_request_timeout
1932
+ )
1933
+ return response_data.response
1934
+
1935
+
1936
+ def _validation_set_validation_set_id_rapid_post_serialize(
1937
+ self,
1938
+ validation_set_id,
1939
+ model,
1940
+ files,
1941
+ texts,
1942
+ urls,
1943
+ _request_auth,
1944
+ _content_type,
1945
+ _headers,
1946
+ _host_index,
1947
+ ) -> RequestSerialized:
1948
+
1949
+ _host = None
1950
+
1951
+ _collection_formats: Dict[str, str] = {
1952
+ 'files': 'multi',
1953
+ 'texts': 'multi',
1954
+ 'urls': 'multi',
1955
+ }
1956
+
1957
+ _path_params: Dict[str, str] = {}
1958
+ _query_params: List[Tuple[str, str]] = []
1959
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1960
+ _form_params: List[Tuple[str, str]] = []
1961
+ _files: Dict[
1962
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1963
+ ] = {}
1964
+ _body_params: Optional[bytes] = None
1965
+
1966
+ # process the path parameters
1967
+ if validation_set_id is not None:
1968
+ _path_params['validationSetId'] = validation_set_id
1969
+ # process the query parameters
1970
+ # process the header parameters
1971
+ # process the form parameters
1972
+ if model is not None:
1973
+ _form_params.append(('model', model))
1974
+ if files is not None:
1975
+ _files['files'] = files
1976
+ if texts is not None:
1977
+ _form_params.append(('texts', texts))
1978
+ if urls is not None:
1979
+ _form_params.append(('urls', urls))
1980
+ # process the body parameter
1981
+
1982
+
1983
+ # set the HTTP header `Accept`
1984
+ if 'Accept' not in _header_params:
1985
+ _header_params['Accept'] = self.api_client.select_header_accept(
1986
+ [
1987
+ 'text/plain',
1988
+ 'application/json',
1989
+ 'text/json'
1990
+ ]
1991
+ )
1992
+
1993
+ # set the HTTP header `Content-Type`
1994
+ if _content_type:
1995
+ _header_params['Content-Type'] = _content_type
1996
+ else:
1997
+ _default_content_type = (
1998
+ self.api_client.select_header_content_type(
1999
+ [
2000
+ 'multipart/form-data'
2001
+ ]
2002
+ )
2003
+ )
2004
+ if _default_content_type is not None:
2005
+ _header_params['Content-Type'] = _default_content_type
2006
+
2007
+ # authentication setting
2008
+ _auth_settings: List[str] = [
2009
+ 'bearer',
2010
+ 'oauth2'
2011
+ ]
2012
+
2013
+ return self.api_client.param_serialize(
2014
+ method='POST',
2015
+ resource_path='/validation-set/{validationSetId}/rapid',
2016
+ path_params=_path_params,
2017
+ query_params=_query_params,
2018
+ header_params=_header_params,
2019
+ body=_body_params,
2020
+ post_params=_form_params,
2021
+ files=_files,
2022
+ auth_settings=_auth_settings,
2023
+ collection_formats=_collection_formats,
2024
+ _host=_host,
2025
+ _request_auth=_request_auth
2026
+ )
2027
+
2028
+
2029
+
2030
+
1691
2031
  @validate_call
1692
2032
  def validation_set_validation_set_id_rapid_texts_post(
1693
2033
  self,
@@ -1706,7 +2046,7 @@ class ValidationSetApi:
1706
2046
  _headers: Optional[Dict[StrictStr, Any]] = None,
1707
2047
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1708
2048
  ) -> AddValidationRapidResult:
1709
- """Adds a new validation rapid to the specified validation set using text sources to create the assets.
2049
+ """(Deprecated) Adds a new validation rapid to the specified validation set using text sources to create the assets.
1710
2050
 
1711
2051
 
1712
2052
  :param validation_set_id: The ID of the validation set to add the rapid to. (required)
@@ -1734,6 +2074,7 @@ class ValidationSetApi:
1734
2074
  :type _host_index: int, optional
1735
2075
  :return: Returns the result object.
1736
2076
  """ # noqa: E501
2077
+ warnings.warn("POST /validation-set/{validationSetId}/rapid/texts is deprecated.", DeprecationWarning)
1737
2078
 
1738
2079
  _param = self._validation_set_validation_set_id_rapid_texts_post_serialize(
1739
2080
  validation_set_id=validation_set_id,
@@ -1776,7 +2117,7 @@ class ValidationSetApi:
1776
2117
  _headers: Optional[Dict[StrictStr, Any]] = None,
1777
2118
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1778
2119
  ) -> ApiResponse[AddValidationRapidResult]:
1779
- """Adds a new validation rapid to the specified validation set using text sources to create the assets.
2120
+ """(Deprecated) Adds a new validation rapid to the specified validation set using text sources to create the assets.
1780
2121
 
1781
2122
 
1782
2123
  :param validation_set_id: The ID of the validation set to add the rapid to. (required)
@@ -1804,6 +2145,7 @@ class ValidationSetApi:
1804
2145
  :type _host_index: int, optional
1805
2146
  :return: Returns the result object.
1806
2147
  """ # noqa: E501
2148
+ warnings.warn("POST /validation-set/{validationSetId}/rapid/texts is deprecated.", DeprecationWarning)
1807
2149
 
1808
2150
  _param = self._validation_set_validation_set_id_rapid_texts_post_serialize(
1809
2151
  validation_set_id=validation_set_id,
@@ -1846,7 +2188,7 @@ class ValidationSetApi:
1846
2188
  _headers: Optional[Dict[StrictStr, Any]] = None,
1847
2189
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1848
2190
  ) -> RESTResponseType:
1849
- """Adds a new validation rapid to the specified validation set using text sources to create the assets.
2191
+ """(Deprecated) Adds a new validation rapid to the specified validation set using text sources to create the assets.
1850
2192
 
1851
2193
 
1852
2194
  :param validation_set_id: The ID of the validation set to add the rapid to. (required)
@@ -1874,6 +2216,7 @@ class ValidationSetApi:
1874
2216
  :type _host_index: int, optional
1875
2217
  :return: Returns the result object.
1876
2218
  """ # noqa: E501
2219
+ warnings.warn("POST /validation-set/{validationSetId}/rapid/texts is deprecated.", DeprecationWarning)
1877
2220
 
1878
2221
  _param = self._validation_set_validation_set_id_rapid_texts_post_serialize(
1879
2222
  validation_set_id=validation_set_id,
@@ -301,6 +301,9 @@ from rapidata.api_client.models.report_model import ReportModel
301
301
  from rapidata.api_client.models.response_count_user_filter_model import ResponseCountUserFilterModel
302
302
  from rapidata.api_client.models.retrieval_mode import RetrievalMode
303
303
  from rapidata.api_client.models.root_filter import RootFilter
304
+ from rapidata.api_client.models.run_status import RunStatus
305
+ from rapidata.api_client.models.runs_by_leaderboard_result import RunsByLeaderboardResult
306
+ from rapidata.api_client.models.runs_by_leaderboard_result_paged_result import RunsByLeaderboardResultPagedResult
304
307
  from rapidata.api_client.models.scrub_payload import ScrubPayload
305
308
  from rapidata.api_client.models.scrub_range import ScrubRange
306
309
  from rapidata.api_client.models.scrub_rapid_blueprint import ScrubRapidBlueprint
@@ -350,9 +353,11 @@ from rapidata.api_client.models.transcription_word import TranscriptionWord
350
353
  from rapidata.api_client.models.translated_prompt_metadata_model import TranslatedPromptMetadataModel
351
354
  from rapidata.api_client.models.translated_string import TranslatedString
352
355
  from rapidata.api_client.models.unlock_order_result import UnlockOrderResult
356
+ from rapidata.api_client.models.update_benchmark_name_model import UpdateBenchmarkNameModel
353
357
  from rapidata.api_client.models.update_campaign_model import UpdateCampaignModel
354
358
  from rapidata.api_client.models.update_dataset_name_model import UpdateDatasetNameModel
355
359
  from rapidata.api_client.models.update_dimensions_model import UpdateDimensionsModel
360
+ from rapidata.api_client.models.update_leaderboard_name_model import UpdateLeaderboardNameModel
356
361
  from rapidata.api_client.models.update_order_name_model import UpdateOrderNameModel
357
362
  from rapidata.api_client.models.update_validation_rapid_model import UpdateValidationRapidModel
358
363
  from rapidata.api_client.models.update_validation_rapid_model_truth import UpdateValidationRapidModelTruth
@@ -26,6 +26,7 @@ class FileType(str, Enum):
26
26
  """
27
27
  allowed enum values
28
28
  """
29
+ UNKNOWN = 'Unknown'
29
30
  IMAGE = 'Image'
30
31
  VIDEO = 'Video'
31
32
  AUDIO = 'Audio'
@@ -41,8 +41,8 @@ class FileTypeMetadata(BaseModel):
41
41
  @field_validator('file_type')
42
42
  def file_type_validate_enum(cls, value):
43
43
  """Validates the enum"""
44
- if value not in set(['Image', 'Video', 'Audio']):
45
- raise ValueError("must be one of enum values ('Image', 'Video', 'Audio')")
44
+ if value not in set(['Unknown', 'Image', 'Video', 'Audio']):
45
+ raise ValueError("must be one of enum values ('Unknown', 'Image', 'Video', 'Audio')")
46
46
  return value
47
47
 
48
48
  model_config = ConfigDict(
@@ -40,8 +40,8 @@ class FileTypeMetadataModel(BaseModel):
40
40
  @field_validator('file_type')
41
41
  def file_type_validate_enum(cls, value):
42
42
  """Validates the enum"""
43
- if value not in set(['Image', 'Video', 'Audio']):
44
- raise ValueError("must be one of enum values ('Image', 'Video', 'Audio')")
43
+ if value not in set(['Unknown', 'Image', 'Video', 'Audio']):
44
+ raise ValueError("must be one of enum values ('Unknown', 'Image', 'Video', 'Audio')")
45
45
  return value
46
46
 
47
47
  model_config = ConfigDict(
@@ -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, StrictFloat, StrictInt, StrictStr, field_validator
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator
21
21
  from typing import Any, ClassVar, Dict, List, Optional, Union
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
@@ -31,10 +31,11 @@ class GetStandingByIdResult(BaseModel):
31
31
  benchmark_id: StrictStr = Field(alias="benchmarkId")
32
32
  dataset_id: StrictStr = Field(alias="datasetId")
33
33
  status: StrictStr
34
+ is_disabled: StrictBool = Field(alias="isDisabled")
34
35
  score: Optional[Union[StrictFloat, StrictInt]] = None
35
36
  wins: StrictInt
36
37
  total_matches: StrictInt = Field(alias="totalMatches")
37
- __properties: ClassVar[List[str]] = ["id", "name", "benchmarkId", "datasetId", "status", "score", "wins", "totalMatches"]
38
+ __properties: ClassVar[List[str]] = ["id", "name", "benchmarkId", "datasetId", "status", "isDisabled", "score", "wins", "totalMatches"]
38
39
 
39
40
  @field_validator('status')
40
41
  def status_validate_enum(cls, value):
@@ -104,6 +105,7 @@ class GetStandingByIdResult(BaseModel):
104
105
  "benchmarkId": obj.get("benchmarkId"),
105
106
  "datasetId": obj.get("datasetId"),
106
107
  "status": obj.get("status"),
108
+ "isDisabled": obj.get("isDisabled"),
107
109
  "score": obj.get("score"),
108
110
  "wins": obj.get("wins"),
109
111
  "totalMatches": obj.get("totalMatches")
@@ -36,8 +36,8 @@ class ParticipantByBenchmark(BaseModel):
36
36
  @field_validator('status')
37
37
  def status_validate_enum(cls, value):
38
38
  """Validates the enum"""
39
- if value not in set(['Created', 'Submitted']):
40
- raise ValueError("must be one of enum values ('Created', 'Submitted')")
39
+ if value not in set(['Created', 'Submitted', 'Disabled']):
40
+ raise ValueError("must be one of enum values ('Created', 'Submitted', 'Disabled')")
41
41
  return value
42
42
 
43
43
  model_config = ConfigDict(
@@ -28,6 +28,7 @@ class ParticipantStatus(str, Enum):
28
28
  """
29
29
  CREATED = 'Created'
30
30
  SUBMITTED = 'Submitted'
31
+ DISABLED = 'Disabled'
31
32
 
32
33
  @classmethod
33
34
  def from_json(cls, json_str: str) -> Self:
@@ -19,7 +19,8 @@ import json
19
19
 
20
20
  from datetime import datetime
21
21
  from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
- from typing import Any, ClassVar, Dict, List
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from rapidata.api_client.models.get_validation_rapids_result_asset import GetValidationRapidsResultAsset
23
24
  from typing import Optional, Set
24
25
  from typing_extensions import Self
25
26
 
@@ -27,10 +28,11 @@ class PromptByBenchmarkResult(BaseModel):
27
28
  """
28
29
  PromptByBenchmarkResult
29
30
  """ # noqa: E501
30
- prompt: StrictStr
31
+ prompt: Optional[StrictStr] = None
32
+ prompt_asset: Optional[GetValidationRapidsResultAsset] = Field(default=None, alias="promptAsset")
31
33
  identifier: StrictStr
32
34
  created_at: datetime = Field(alias="createdAt")
33
- __properties: ClassVar[List[str]] = ["prompt", "identifier", "createdAt"]
35
+ __properties: ClassVar[List[str]] = ["prompt", "promptAsset", "identifier", "createdAt"]
34
36
 
35
37
  model_config = ConfigDict(
36
38
  populate_by_name=True,
@@ -71,6 +73,19 @@ class PromptByBenchmarkResult(BaseModel):
71
73
  exclude=excluded_fields,
72
74
  exclude_none=True,
73
75
  )
76
+ # override the default output from pydantic by calling `to_dict()` of prompt_asset
77
+ if self.prompt_asset:
78
+ _dict['promptAsset'] = self.prompt_asset.to_dict()
79
+ # set to None if prompt (nullable) is None
80
+ # and model_fields_set contains the field
81
+ if self.prompt is None and "prompt" in self.model_fields_set:
82
+ _dict['prompt'] = None
83
+
84
+ # set to None if prompt_asset (nullable) is None
85
+ # and model_fields_set contains the field
86
+ if self.prompt_asset is None and "prompt_asset" in self.model_fields_set:
87
+ _dict['promptAsset'] = None
88
+
74
89
  return _dict
75
90
 
76
91
  @classmethod
@@ -84,6 +99,7 @@ class PromptByBenchmarkResult(BaseModel):
84
99
 
85
100
  _obj = cls.model_validate({
86
101
  "prompt": obj.get("prompt"),
102
+ "promptAsset": GetValidationRapidsResultAsset.from_dict(obj["promptAsset"]) if obj.get("promptAsset") is not None else None,
87
103
  "identifier": obj.get("identifier"),
88
104
  "createdAt": obj.get("createdAt")
89
105
  })
@@ -0,0 +1,39 @@
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 json
17
+ from enum import Enum
18
+ from typing_extensions import Self
19
+
20
+
21
+ class RunStatus(str, Enum):
22
+ """
23
+ RunStatus
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ QUEUED = 'Queued'
30
+ RUNNING = 'Running'
31
+ COMPLETED = 'Completed'
32
+ FAILED = 'Failed'
33
+
34
+ @classmethod
35
+ def from_json(cls, json_str: str) -> Self:
36
+ """Create an instance of RunStatus from a JSON string"""
37
+ return cls(json.loads(json_str))
38
+
39
+