opik 1.9.39__py3-none-any.whl → 1.9.41__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.
- opik/rest_api/__init__.py +4 -0
- opik/rest_api/datasets/client.py +105 -8
- opik/rest_api/datasets/raw_client.py +194 -8
- opik/rest_api/types/__init__.py +4 -0
- opik/rest_api/types/dataset.py +2 -0
- opik/rest_api/types/dataset_public.py +2 -0
- opik/rest_api/types/dataset_version_public.py +5 -0
- opik/rest_api/types/dataset_version_summary.py +41 -0
- opik/rest_api/types/dataset_version_summary_public.py +41 -0
- opik/rest_api/types/group_content_with_aggregations.py +1 -0
- {opik-1.9.39.dist-info → opik-1.9.41.dist-info}/METADATA +3 -3
- {opik-1.9.39.dist-info → opik-1.9.41.dist-info}/RECORD +16 -14
- {opik-1.9.39.dist-info → opik-1.9.41.dist-info}/WHEEL +0 -0
- {opik-1.9.39.dist-info → opik-1.9.41.dist-info}/entry_points.txt +0 -0
- {opik-1.9.39.dist-info → opik-1.9.41.dist-info}/licenses/LICENSE +0 -0
- {opik-1.9.39.dist-info → opik-1.9.41.dist-info}/top_level.txt +0 -0
opik/rest_api/__init__.py
CHANGED
|
@@ -166,6 +166,8 @@ from .types import (
|
|
|
166
166
|
DatasetVersionDiffStats,
|
|
167
167
|
DatasetVersionPagePublic,
|
|
168
168
|
DatasetVersionPublic,
|
|
169
|
+
DatasetVersionSummary,
|
|
170
|
+
DatasetVersionSummaryPublic,
|
|
169
171
|
DatasetVisibility,
|
|
170
172
|
DeleteAttachmentsRequest,
|
|
171
173
|
DeleteAttachmentsRequestEntityType,
|
|
@@ -717,6 +719,8 @@ __all__ = [
|
|
|
717
719
|
"DatasetVersionDiffStats",
|
|
718
720
|
"DatasetVersionPagePublic",
|
|
719
721
|
"DatasetVersionPublic",
|
|
722
|
+
"DatasetVersionSummary",
|
|
723
|
+
"DatasetVersionSummaryPublic",
|
|
720
724
|
"DatasetVisibility",
|
|
721
725
|
"DatasetWriteVisibility",
|
|
722
726
|
"DeleteAttachmentsRequest",
|
opik/rest_api/datasets/client.py
CHANGED
|
@@ -1006,7 +1006,7 @@ class DatasetsClient:
|
|
|
1006
1006
|
self,
|
|
1007
1007
|
id: str,
|
|
1008
1008
|
*,
|
|
1009
|
-
|
|
1009
|
+
tags: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
1010
1010
|
change_description: typing.Optional[str] = OMIT,
|
|
1011
1011
|
metadata: typing.Optional[typing.Dict[str, str]] = OMIT,
|
|
1012
1012
|
request_options: typing.Optional[RequestOptions] = None,
|
|
@@ -1018,8 +1018,8 @@ class DatasetsClient:
|
|
|
1018
1018
|
----------
|
|
1019
1019
|
id : str
|
|
1020
1020
|
|
|
1021
|
-
|
|
1022
|
-
Optional
|
|
1021
|
+
tags : typing.Optional[typing.Sequence[str]]
|
|
1022
|
+
Optional list of tags for this version
|
|
1023
1023
|
|
|
1024
1024
|
change_description : typing.Optional[str]
|
|
1025
1025
|
Optional description of changes in this version
|
|
@@ -1041,7 +1041,7 @@ class DatasetsClient:
|
|
|
1041
1041
|
client.datasets.create_dataset_version(id='id', )
|
|
1042
1042
|
"""
|
|
1043
1043
|
_response = self._raw_client.create_dataset_version(
|
|
1044
|
-
id,
|
|
1044
|
+
id, tags=tags, change_description=change_description, metadata=metadata, request_options=request_options
|
|
1045
1045
|
)
|
|
1046
1046
|
return _response.data
|
|
1047
1047
|
|
|
@@ -1107,6 +1107,53 @@ class DatasetsClient:
|
|
|
1107
1107
|
)
|
|
1108
1108
|
return _response.data
|
|
1109
1109
|
|
|
1110
|
+
def update_dataset_version(
|
|
1111
|
+
self,
|
|
1112
|
+
version_hash: str,
|
|
1113
|
+
id: str,
|
|
1114
|
+
*,
|
|
1115
|
+
change_description: typing.Optional[str] = OMIT,
|
|
1116
|
+
tags_to_add: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
1117
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1118
|
+
) -> DatasetVersionPublic:
|
|
1119
|
+
"""
|
|
1120
|
+
Update a dataset version's change_description and/or add new tags
|
|
1121
|
+
|
|
1122
|
+
Parameters
|
|
1123
|
+
----------
|
|
1124
|
+
version_hash : str
|
|
1125
|
+
|
|
1126
|
+
id : str
|
|
1127
|
+
|
|
1128
|
+
change_description : typing.Optional[str]
|
|
1129
|
+
Optional description of changes in this version
|
|
1130
|
+
|
|
1131
|
+
tags_to_add : typing.Optional[typing.Sequence[str]]
|
|
1132
|
+
Optional list of tags to add to this version
|
|
1133
|
+
|
|
1134
|
+
request_options : typing.Optional[RequestOptions]
|
|
1135
|
+
Request-specific configuration.
|
|
1136
|
+
|
|
1137
|
+
Returns
|
|
1138
|
+
-------
|
|
1139
|
+
DatasetVersionPublic
|
|
1140
|
+
Version updated successfully
|
|
1141
|
+
|
|
1142
|
+
Examples
|
|
1143
|
+
--------
|
|
1144
|
+
from Opik import OpikApi
|
|
1145
|
+
client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
|
|
1146
|
+
client.datasets.update_dataset_version(version_hash='versionHash', id='id', )
|
|
1147
|
+
"""
|
|
1148
|
+
_response = self._raw_client.update_dataset_version(
|
|
1149
|
+
version_hash,
|
|
1150
|
+
id,
|
|
1151
|
+
change_description=change_description,
|
|
1152
|
+
tags_to_add=tags_to_add,
|
|
1153
|
+
request_options=request_options,
|
|
1154
|
+
)
|
|
1155
|
+
return _response.data
|
|
1156
|
+
|
|
1110
1157
|
|
|
1111
1158
|
class AsyncDatasetsClient:
|
|
1112
1159
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
@@ -2165,7 +2212,7 @@ class AsyncDatasetsClient:
|
|
|
2165
2212
|
self,
|
|
2166
2213
|
id: str,
|
|
2167
2214
|
*,
|
|
2168
|
-
|
|
2215
|
+
tags: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
2169
2216
|
change_description: typing.Optional[str] = OMIT,
|
|
2170
2217
|
metadata: typing.Optional[typing.Dict[str, str]] = OMIT,
|
|
2171
2218
|
request_options: typing.Optional[RequestOptions] = None,
|
|
@@ -2177,8 +2224,8 @@ class AsyncDatasetsClient:
|
|
|
2177
2224
|
----------
|
|
2178
2225
|
id : str
|
|
2179
2226
|
|
|
2180
|
-
|
|
2181
|
-
Optional
|
|
2227
|
+
tags : typing.Optional[typing.Sequence[str]]
|
|
2228
|
+
Optional list of tags for this version
|
|
2182
2229
|
|
|
2183
2230
|
change_description : typing.Optional[str]
|
|
2184
2231
|
Optional description of changes in this version
|
|
@@ -2203,7 +2250,7 @@ class AsyncDatasetsClient:
|
|
|
2203
2250
|
asyncio.run(main())
|
|
2204
2251
|
"""
|
|
2205
2252
|
_response = await self._raw_client.create_dataset_version(
|
|
2206
|
-
id,
|
|
2253
|
+
id, tags=tags, change_description=change_description, metadata=metadata, request_options=request_options
|
|
2207
2254
|
)
|
|
2208
2255
|
return _response.data
|
|
2209
2256
|
|
|
@@ -2274,3 +2321,53 @@ class AsyncDatasetsClient:
|
|
|
2274
2321
|
id, version_ref=version_ref, request_options=request_options
|
|
2275
2322
|
)
|
|
2276
2323
|
return _response.data
|
|
2324
|
+
|
|
2325
|
+
async def update_dataset_version(
|
|
2326
|
+
self,
|
|
2327
|
+
version_hash: str,
|
|
2328
|
+
id: str,
|
|
2329
|
+
*,
|
|
2330
|
+
change_description: typing.Optional[str] = OMIT,
|
|
2331
|
+
tags_to_add: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
2332
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
2333
|
+
) -> DatasetVersionPublic:
|
|
2334
|
+
"""
|
|
2335
|
+
Update a dataset version's change_description and/or add new tags
|
|
2336
|
+
|
|
2337
|
+
Parameters
|
|
2338
|
+
----------
|
|
2339
|
+
version_hash : str
|
|
2340
|
+
|
|
2341
|
+
id : str
|
|
2342
|
+
|
|
2343
|
+
change_description : typing.Optional[str]
|
|
2344
|
+
Optional description of changes in this version
|
|
2345
|
+
|
|
2346
|
+
tags_to_add : typing.Optional[typing.Sequence[str]]
|
|
2347
|
+
Optional list of tags to add to this version
|
|
2348
|
+
|
|
2349
|
+
request_options : typing.Optional[RequestOptions]
|
|
2350
|
+
Request-specific configuration.
|
|
2351
|
+
|
|
2352
|
+
Returns
|
|
2353
|
+
-------
|
|
2354
|
+
DatasetVersionPublic
|
|
2355
|
+
Version updated successfully
|
|
2356
|
+
|
|
2357
|
+
Examples
|
|
2358
|
+
--------
|
|
2359
|
+
from Opik import AsyncOpikApi
|
|
2360
|
+
import asyncio
|
|
2361
|
+
client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
|
|
2362
|
+
async def main() -> None:
|
|
2363
|
+
await client.datasets.update_dataset_version(version_hash='versionHash', id='id', )
|
|
2364
|
+
asyncio.run(main())
|
|
2365
|
+
"""
|
|
2366
|
+
_response = await self._raw_client.update_dataset_version(
|
|
2367
|
+
version_hash,
|
|
2368
|
+
id,
|
|
2369
|
+
change_description=change_description,
|
|
2370
|
+
tags_to_add=tags_to_add,
|
|
2371
|
+
request_options=request_options,
|
|
2372
|
+
)
|
|
2373
|
+
return _response.data
|
|
@@ -1398,7 +1398,7 @@ class RawDatasetsClient:
|
|
|
1398
1398
|
self,
|
|
1399
1399
|
id: str,
|
|
1400
1400
|
*,
|
|
1401
|
-
|
|
1401
|
+
tags: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
1402
1402
|
change_description: typing.Optional[str] = OMIT,
|
|
1403
1403
|
metadata: typing.Optional[typing.Dict[str, str]] = OMIT,
|
|
1404
1404
|
request_options: typing.Optional[RequestOptions] = None,
|
|
@@ -1410,8 +1410,8 @@ class RawDatasetsClient:
|
|
|
1410
1410
|
----------
|
|
1411
1411
|
id : str
|
|
1412
1412
|
|
|
1413
|
-
|
|
1414
|
-
Optional
|
|
1413
|
+
tags : typing.Optional[typing.Sequence[str]]
|
|
1414
|
+
Optional list of tags for this version
|
|
1415
1415
|
|
|
1416
1416
|
change_description : typing.Optional[str]
|
|
1417
1417
|
Optional description of changes in this version
|
|
@@ -1430,7 +1430,7 @@ class RawDatasetsClient:
|
|
|
1430
1430
|
f"v1/private/datasets/{jsonable_encoder(id)}/versions",
|
|
1431
1431
|
method="POST",
|
|
1432
1432
|
json={
|
|
1433
|
-
"
|
|
1433
|
+
"tags": tags,
|
|
1434
1434
|
"change_description": change_description,
|
|
1435
1435
|
"metadata": metadata,
|
|
1436
1436
|
},
|
|
@@ -1563,6 +1563,99 @@ class RawDatasetsClient:
|
|
|
1563
1563
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
1564
1564
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
1565
1565
|
|
|
1566
|
+
def update_dataset_version(
|
|
1567
|
+
self,
|
|
1568
|
+
version_hash: str,
|
|
1569
|
+
id: str,
|
|
1570
|
+
*,
|
|
1571
|
+
change_description: typing.Optional[str] = OMIT,
|
|
1572
|
+
tags_to_add: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
1573
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1574
|
+
) -> HttpResponse[DatasetVersionPublic]:
|
|
1575
|
+
"""
|
|
1576
|
+
Update a dataset version's change_description and/or add new tags
|
|
1577
|
+
|
|
1578
|
+
Parameters
|
|
1579
|
+
----------
|
|
1580
|
+
version_hash : str
|
|
1581
|
+
|
|
1582
|
+
id : str
|
|
1583
|
+
|
|
1584
|
+
change_description : typing.Optional[str]
|
|
1585
|
+
Optional description of changes in this version
|
|
1586
|
+
|
|
1587
|
+
tags_to_add : typing.Optional[typing.Sequence[str]]
|
|
1588
|
+
Optional list of tags to add to this version
|
|
1589
|
+
|
|
1590
|
+
request_options : typing.Optional[RequestOptions]
|
|
1591
|
+
Request-specific configuration.
|
|
1592
|
+
|
|
1593
|
+
Returns
|
|
1594
|
+
-------
|
|
1595
|
+
HttpResponse[DatasetVersionPublic]
|
|
1596
|
+
Version updated successfully
|
|
1597
|
+
"""
|
|
1598
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
1599
|
+
f"v1/private/datasets/{jsonable_encoder(id)}/versions/hash/{jsonable_encoder(version_hash)}",
|
|
1600
|
+
method="PATCH",
|
|
1601
|
+
json={
|
|
1602
|
+
"change_description": change_description,
|
|
1603
|
+
"tags_to_add": tags_to_add,
|
|
1604
|
+
},
|
|
1605
|
+
headers={
|
|
1606
|
+
"content-type": "application/json",
|
|
1607
|
+
},
|
|
1608
|
+
request_options=request_options,
|
|
1609
|
+
omit=OMIT,
|
|
1610
|
+
)
|
|
1611
|
+
try:
|
|
1612
|
+
if 200 <= _response.status_code < 300:
|
|
1613
|
+
_data = typing.cast(
|
|
1614
|
+
DatasetVersionPublic,
|
|
1615
|
+
parse_obj_as(
|
|
1616
|
+
type_=DatasetVersionPublic, # type: ignore
|
|
1617
|
+
object_=_response.json(),
|
|
1618
|
+
),
|
|
1619
|
+
)
|
|
1620
|
+
return HttpResponse(response=_response, data=_data)
|
|
1621
|
+
if _response.status_code == 400:
|
|
1622
|
+
raise BadRequestError(
|
|
1623
|
+
headers=dict(_response.headers),
|
|
1624
|
+
body=typing.cast(
|
|
1625
|
+
typing.Optional[typing.Any],
|
|
1626
|
+
parse_obj_as(
|
|
1627
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1628
|
+
object_=_response.json(),
|
|
1629
|
+
),
|
|
1630
|
+
),
|
|
1631
|
+
)
|
|
1632
|
+
if _response.status_code == 404:
|
|
1633
|
+
raise NotFoundError(
|
|
1634
|
+
headers=dict(_response.headers),
|
|
1635
|
+
body=typing.cast(
|
|
1636
|
+
typing.Optional[typing.Any],
|
|
1637
|
+
parse_obj_as(
|
|
1638
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1639
|
+
object_=_response.json(),
|
|
1640
|
+
),
|
|
1641
|
+
),
|
|
1642
|
+
)
|
|
1643
|
+
if _response.status_code == 409:
|
|
1644
|
+
raise ConflictError(
|
|
1645
|
+
headers=dict(_response.headers),
|
|
1646
|
+
body=typing.cast(
|
|
1647
|
+
typing.Optional[typing.Any],
|
|
1648
|
+
parse_obj_as(
|
|
1649
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1650
|
+
object_=_response.json(),
|
|
1651
|
+
),
|
|
1652
|
+
),
|
|
1653
|
+
)
|
|
1654
|
+
_response_json = _response.json()
|
|
1655
|
+
except JSONDecodeError:
|
|
1656
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
1657
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
1658
|
+
|
|
1566
1659
|
|
|
1567
1660
|
class AsyncRawDatasetsClient:
|
|
1568
1661
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
@@ -2926,7 +3019,7 @@ class AsyncRawDatasetsClient:
|
|
|
2926
3019
|
self,
|
|
2927
3020
|
id: str,
|
|
2928
3021
|
*,
|
|
2929
|
-
|
|
3022
|
+
tags: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
2930
3023
|
change_description: typing.Optional[str] = OMIT,
|
|
2931
3024
|
metadata: typing.Optional[typing.Dict[str, str]] = OMIT,
|
|
2932
3025
|
request_options: typing.Optional[RequestOptions] = None,
|
|
@@ -2938,8 +3031,8 @@ class AsyncRawDatasetsClient:
|
|
|
2938
3031
|
----------
|
|
2939
3032
|
id : str
|
|
2940
3033
|
|
|
2941
|
-
|
|
2942
|
-
Optional
|
|
3034
|
+
tags : typing.Optional[typing.Sequence[str]]
|
|
3035
|
+
Optional list of tags for this version
|
|
2943
3036
|
|
|
2944
3037
|
change_description : typing.Optional[str]
|
|
2945
3038
|
Optional description of changes in this version
|
|
@@ -2958,7 +3051,7 @@ class AsyncRawDatasetsClient:
|
|
|
2958
3051
|
f"v1/private/datasets/{jsonable_encoder(id)}/versions",
|
|
2959
3052
|
method="POST",
|
|
2960
3053
|
json={
|
|
2961
|
-
"
|
|
3054
|
+
"tags": tags,
|
|
2962
3055
|
"change_description": change_description,
|
|
2963
3056
|
"metadata": metadata,
|
|
2964
3057
|
},
|
|
@@ -3090,3 +3183,96 @@ class AsyncRawDatasetsClient:
|
|
|
3090
3183
|
except JSONDecodeError:
|
|
3091
3184
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
3092
3185
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
3186
|
+
|
|
3187
|
+
async def update_dataset_version(
|
|
3188
|
+
self,
|
|
3189
|
+
version_hash: str,
|
|
3190
|
+
id: str,
|
|
3191
|
+
*,
|
|
3192
|
+
change_description: typing.Optional[str] = OMIT,
|
|
3193
|
+
tags_to_add: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
3194
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
3195
|
+
) -> AsyncHttpResponse[DatasetVersionPublic]:
|
|
3196
|
+
"""
|
|
3197
|
+
Update a dataset version's change_description and/or add new tags
|
|
3198
|
+
|
|
3199
|
+
Parameters
|
|
3200
|
+
----------
|
|
3201
|
+
version_hash : str
|
|
3202
|
+
|
|
3203
|
+
id : str
|
|
3204
|
+
|
|
3205
|
+
change_description : typing.Optional[str]
|
|
3206
|
+
Optional description of changes in this version
|
|
3207
|
+
|
|
3208
|
+
tags_to_add : typing.Optional[typing.Sequence[str]]
|
|
3209
|
+
Optional list of tags to add to this version
|
|
3210
|
+
|
|
3211
|
+
request_options : typing.Optional[RequestOptions]
|
|
3212
|
+
Request-specific configuration.
|
|
3213
|
+
|
|
3214
|
+
Returns
|
|
3215
|
+
-------
|
|
3216
|
+
AsyncHttpResponse[DatasetVersionPublic]
|
|
3217
|
+
Version updated successfully
|
|
3218
|
+
"""
|
|
3219
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
3220
|
+
f"v1/private/datasets/{jsonable_encoder(id)}/versions/hash/{jsonable_encoder(version_hash)}",
|
|
3221
|
+
method="PATCH",
|
|
3222
|
+
json={
|
|
3223
|
+
"change_description": change_description,
|
|
3224
|
+
"tags_to_add": tags_to_add,
|
|
3225
|
+
},
|
|
3226
|
+
headers={
|
|
3227
|
+
"content-type": "application/json",
|
|
3228
|
+
},
|
|
3229
|
+
request_options=request_options,
|
|
3230
|
+
omit=OMIT,
|
|
3231
|
+
)
|
|
3232
|
+
try:
|
|
3233
|
+
if 200 <= _response.status_code < 300:
|
|
3234
|
+
_data = typing.cast(
|
|
3235
|
+
DatasetVersionPublic,
|
|
3236
|
+
parse_obj_as(
|
|
3237
|
+
type_=DatasetVersionPublic, # type: ignore
|
|
3238
|
+
object_=_response.json(),
|
|
3239
|
+
),
|
|
3240
|
+
)
|
|
3241
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
3242
|
+
if _response.status_code == 400:
|
|
3243
|
+
raise BadRequestError(
|
|
3244
|
+
headers=dict(_response.headers),
|
|
3245
|
+
body=typing.cast(
|
|
3246
|
+
typing.Optional[typing.Any],
|
|
3247
|
+
parse_obj_as(
|
|
3248
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
3249
|
+
object_=_response.json(),
|
|
3250
|
+
),
|
|
3251
|
+
),
|
|
3252
|
+
)
|
|
3253
|
+
if _response.status_code == 404:
|
|
3254
|
+
raise NotFoundError(
|
|
3255
|
+
headers=dict(_response.headers),
|
|
3256
|
+
body=typing.cast(
|
|
3257
|
+
typing.Optional[typing.Any],
|
|
3258
|
+
parse_obj_as(
|
|
3259
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
3260
|
+
object_=_response.json(),
|
|
3261
|
+
),
|
|
3262
|
+
),
|
|
3263
|
+
)
|
|
3264
|
+
if _response.status_code == 409:
|
|
3265
|
+
raise ConflictError(
|
|
3266
|
+
headers=dict(_response.headers),
|
|
3267
|
+
body=typing.cast(
|
|
3268
|
+
typing.Optional[typing.Any],
|
|
3269
|
+
parse_obj_as(
|
|
3270
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
3271
|
+
object_=_response.json(),
|
|
3272
|
+
),
|
|
3273
|
+
),
|
|
3274
|
+
)
|
|
3275
|
+
_response_json = _response.json()
|
|
3276
|
+
except JSONDecodeError:
|
|
3277
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
3278
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
opik/rest_api/types/__init__.py
CHANGED
|
@@ -193,6 +193,8 @@ from .dataset_version_diff import DatasetVersionDiff
|
|
|
193
193
|
from .dataset_version_diff_stats import DatasetVersionDiffStats
|
|
194
194
|
from .dataset_version_page_public import DatasetVersionPagePublic
|
|
195
195
|
from .dataset_version_public import DatasetVersionPublic
|
|
196
|
+
from .dataset_version_summary import DatasetVersionSummary
|
|
197
|
+
from .dataset_version_summary_public import DatasetVersionSummaryPublic
|
|
196
198
|
from .dataset_visibility import DatasetVisibility
|
|
197
199
|
from .delete_attachments_request import DeleteAttachmentsRequest
|
|
198
200
|
from .delete_attachments_request_entity_type import DeleteAttachmentsRequestEntityType
|
|
@@ -684,6 +686,8 @@ __all__ = [
|
|
|
684
686
|
"DatasetVersionDiffStats",
|
|
685
687
|
"DatasetVersionPagePublic",
|
|
686
688
|
"DatasetVersionPublic",
|
|
689
|
+
"DatasetVersionSummary",
|
|
690
|
+
"DatasetVersionSummaryPublic",
|
|
687
691
|
"DatasetVisibility",
|
|
688
692
|
"DeleteAttachmentsRequest",
|
|
689
693
|
"DeleteAttachmentsRequestEntityType",
|
opik/rest_api/types/dataset.py
CHANGED
|
@@ -6,6 +6,7 @@ import typing
|
|
|
6
6
|
import pydantic
|
|
7
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
8
|
from .dataset_status import DatasetStatus
|
|
9
|
+
from .dataset_version_summary import DatasetVersionSummary
|
|
9
10
|
from .dataset_visibility import DatasetVisibility
|
|
10
11
|
|
|
11
12
|
|
|
@@ -27,6 +28,7 @@ class Dataset(UniversalBaseModel):
|
|
|
27
28
|
most_recent_optimization_at: typing.Optional[dt.datetime] = None
|
|
28
29
|
last_created_optimization_at: typing.Optional[dt.datetime] = None
|
|
29
30
|
status: typing.Optional[DatasetStatus] = None
|
|
31
|
+
latest_version: typing.Optional[DatasetVersionSummary] = None
|
|
30
32
|
|
|
31
33
|
if IS_PYDANTIC_V2:
|
|
32
34
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -7,6 +7,7 @@ import pydantic
|
|
|
7
7
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
8
|
from .dataset_public_status import DatasetPublicStatus
|
|
9
9
|
from .dataset_public_visibility import DatasetPublicVisibility
|
|
10
|
+
from .dataset_version_summary_public import DatasetVersionSummaryPublic
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
class DatasetPublic(UniversalBaseModel):
|
|
@@ -27,6 +28,7 @@ class DatasetPublic(UniversalBaseModel):
|
|
|
27
28
|
most_recent_optimization_at: typing.Optional[dt.datetime] = None
|
|
28
29
|
last_created_optimization_at: typing.Optional[dt.datetime] = None
|
|
29
30
|
status: typing.Optional[DatasetPublicStatus] = None
|
|
31
|
+
latest_version: typing.Optional[DatasetVersionSummaryPublic] = None
|
|
30
32
|
|
|
31
33
|
if IS_PYDANTIC_V2:
|
|
32
34
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -12,6 +12,11 @@ class DatasetVersionPublic(UniversalBaseModel):
|
|
|
12
12
|
dataset_id: typing.Optional[str] = None
|
|
13
13
|
version_hash: typing.Optional[str] = None
|
|
14
14
|
tags: typing.Optional[typing.List[str]] = None
|
|
15
|
+
is_latest: typing.Optional[bool] = pydantic.Field(default=None)
|
|
16
|
+
"""
|
|
17
|
+
Indicates whether this is the latest version of the dataset
|
|
18
|
+
"""
|
|
19
|
+
|
|
15
20
|
items_total: typing.Optional[int] = pydantic.Field(default=None)
|
|
16
21
|
"""
|
|
17
22
|
Total number of items in this version
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DatasetVersionSummary(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Summary of the latest dataset version
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
id: typing.Optional[str] = pydantic.Field(default=None)
|
|
15
|
+
"""
|
|
16
|
+
Unique identifier of the version
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
version_hash: typing.Optional[str] = pydantic.Field(default=None)
|
|
20
|
+
"""
|
|
21
|
+
Hash of the version content
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
change_description: typing.Optional[str] = pydantic.Field(default=None)
|
|
25
|
+
"""
|
|
26
|
+
Description of changes in this version
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
tags: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
30
|
+
"""
|
|
31
|
+
Tags associated with this version
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
if IS_PYDANTIC_V2:
|
|
35
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
36
|
+
else:
|
|
37
|
+
|
|
38
|
+
class Config:
|
|
39
|
+
frozen = True
|
|
40
|
+
smart_union = True
|
|
41
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DatasetVersionSummaryPublic(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Summary of the latest dataset version
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
id: typing.Optional[str] = pydantic.Field(default=None)
|
|
15
|
+
"""
|
|
16
|
+
Unique identifier of the version
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
version_hash: typing.Optional[str] = pydantic.Field(default=None)
|
|
20
|
+
"""
|
|
21
|
+
Hash of the version content
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
change_description: typing.Optional[str] = pydantic.Field(default=None)
|
|
25
|
+
"""
|
|
26
|
+
Description of changes in this version
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
tags: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
30
|
+
"""
|
|
31
|
+
Tags associated with this version
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
if IS_PYDANTIC_V2:
|
|
35
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
36
|
+
else:
|
|
37
|
+
|
|
38
|
+
class Config:
|
|
39
|
+
frozen = True
|
|
40
|
+
smart_union = True
|
|
41
|
+
extra = pydantic.Extra.allow
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: opik
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.41
|
|
4
4
|
Summary: Comet tool for logging and evaluating LLM traces
|
|
5
5
|
Home-page: https://www.comet.com
|
|
6
6
|
Author: Comet ML Inc.
|
|
@@ -70,9 +70,9 @@ Dynamic: summary
|
|
|
70
70
|
Opik
|
|
71
71
|
</div>
|
|
72
72
|
</h1>
|
|
73
|
-
<h2 align="center" style="border-bottom: none">Open-source
|
|
73
|
+
<h2 align="center" style="border-bottom: none">Open-source AI Observability, Evaluation, and Optimization</h2>
|
|
74
74
|
<p align="center">
|
|
75
|
-
Opik helps you build,
|
|
75
|
+
Opik helps you build, test, and optimize generative AI application that run better, from prototype to production. From RAG chatbots to code assistants to complex agentic systems, Opik provides comprehensive tracing, evaluation, and automatic prompt and tool optimization to take the guesswork out of AI development.
|
|
76
76
|
</p>
|
|
77
77
|
|
|
78
78
|
<div align="center">
|
|
@@ -472,7 +472,7 @@ opik/plugins/pytest/test_run_content.py,sha256=uYJ_xIxBpNWaJqgNYCMGMmzOhC5t5OQmM
|
|
|
472
472
|
opik/plugins/pytest/test_runs_storage.py,sha256=j1GSQmAiPBc080jjP0IsFVV5sbKZdwwjtvfBStn89hM,354
|
|
473
473
|
opik/rate_limit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
474
474
|
opik/rate_limit/rate_limit.py,sha256=r5DroR6j7nSZTdZAJ5aev4SVCndyIdXRMdwUAWam4sg,722
|
|
475
|
-
opik/rest_api/__init__.py,sha256=
|
|
475
|
+
opik/rest_api/__init__.py,sha256=m_fqNwgiJXOwmYfalZ4kAwnAqagza7-wEDz7v953sF4,32786
|
|
476
476
|
opik/rest_api/client.py,sha256=jpUFLR_68WTvEEjcSMRY4_amAhtSU5SWD76OHuy7Xi8,15185
|
|
477
477
|
opik/rest_api/environment.py,sha256=ZAucPFBlQ5g1vrxPMLEM6e79nXXzcBO8HUDi7bEcOFo,158
|
|
478
478
|
opik/rest_api/raw_client.py,sha256=xfStotsIUYmsUYODlPC9fwypMWAYtwxXxgPSDWA4odM,5972
|
|
@@ -518,8 +518,8 @@ opik/rest_api/dashboards/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbU
|
|
|
518
518
|
opik/rest_api/dashboards/client.py,sha256=IBpsPobpHRxaQCYhDkV-fk09zBwDQ2UhN1n0S02oiTI,13885
|
|
519
519
|
opik/rest_api/dashboards/raw_client.py,sha256=IfLzgQiMr1vgNjeaUOzFoOV7Kuhno-TMnXM8xj3nVwA,22925
|
|
520
520
|
opik/rest_api/datasets/__init__.py,sha256=2GgXleo5yN3Qw5lhk-woGGvMKlmB7Y8Kfd53KpnZYBs,217
|
|
521
|
-
opik/rest_api/datasets/client.py,sha256=
|
|
522
|
-
opik/rest_api/datasets/raw_client.py,sha256=
|
|
521
|
+
opik/rest_api/datasets/client.py,sha256=F-SwbOWqgJ7ggUTydgGa0fGAxemULe4q0OssjqLGjWk,74416
|
|
522
|
+
opik/rest_api/datasets/raw_client.py,sha256=9PFRw9eI22w3J-F4rnYb_WoauRCuQs1YGmCQaRgsp_c,119774
|
|
523
523
|
opik/rest_api/datasets/types/__init__.py,sha256=AZRB1YoMnPs-6qrUMUGO5kDB2nAQ2f8GhKI8VPmnldQ,274
|
|
524
524
|
opik/rest_api/datasets/types/dataset_update_visibility.py,sha256=iRUTfgelAWV8izSh0-AYdhgKWpd8ZQktAvP1S64RP4U,168
|
|
525
525
|
opik/rest_api/datasets/types/dataset_write_visibility.py,sha256=bgzyifPU85WKm4qjH2aFIPBZBKjh0cOI4mW79NrwTps,167
|
|
@@ -598,7 +598,7 @@ opik/rest_api/system_usage/raw_client.py,sha256=_wf0d5RcVWytOPMxwBWU3R0qAPdOOQM7
|
|
|
598
598
|
opik/rest_api/traces/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
599
599
|
opik/rest_api/traces/client.py,sha256=7qB_pNW2i61D8qE6JYIZKIvnGYuYRb5tAQEOA66hIfA,94433
|
|
600
600
|
opik/rest_api/traces/raw_client.py,sha256=uA4epV24RNCrXpqviV2CnBwLsjaJJK1Gb68s5Wk0jyI,145158
|
|
601
|
-
opik/rest_api/types/__init__.py,sha256=
|
|
601
|
+
opik/rest_api/types/__init__.py,sha256=CuKcQydt0i6HINe0QigPoYdFpWDQuDTI2Pa-1v3M6Jk,44153
|
|
602
602
|
opik/rest_api/types/aggregation_data.py,sha256=jdR7RAHeKJ6PJaFThXegucMsWUCE9WrsBKLOv8h-MLY,1039
|
|
603
603
|
opik/rest_api/types/alert.py,sha256=CADSJOK5EYzYoMBtulkGhbtkVtVv7DcfrDZzSYfbc1s,1152
|
|
604
604
|
opik/rest_api/types/alert_alert_type.py,sha256=vl-UeQ0yXf9nmiQJ7UQKsRUla6zLtCh2CdVJ4649kTg,171
|
|
@@ -711,7 +711,7 @@ opik/rest_api/types/dashboard_page_public.py,sha256=aBd8hfjxj39K1T8UWECXF-o-RKE2
|
|
|
711
711
|
opik/rest_api/types/dashboard_public.py,sha256=DwKEXWCPIBvrmGeUc9COzIwq9O1TXCrSXs0SlU9ZVco,983
|
|
712
712
|
opik/rest_api/types/data_point_double.py,sha256=9d2QfW5QZOBK5_gu5NZlrmbblT4cNUTKUgXxTyulBD8,593
|
|
713
713
|
opik/rest_api/types/data_point_number_public.py,sha256=JNUbvIerAyc7r2jQcH8zRmMllOTe3YtCxvggFmEpXnE,599
|
|
714
|
-
opik/rest_api/types/dataset.py,sha256=
|
|
714
|
+
opik/rest_api/types/dataset.py,sha256=KZGpFIfePNWaS43Zq5INvrd2AuFN1HPCfxZ3w6GRdhI,1624
|
|
715
715
|
opik/rest_api/types/dataset_expansion.py,sha256=johA_FHcQNuNe_OyPuRFeqO87CmZSTqT68aFPSgYBdk,1197
|
|
716
716
|
opik/rest_api/types/dataset_expansion_response.py,sha256=z890ceuu8ST6fXPWLc-2ihYM_rRiKcEAUr3imYsOeS8,1096
|
|
717
717
|
opik/rest_api/types/dataset_item.py,sha256=Ml7WUyfAqtanIXgtN5IEL76G_WXQKV4dgr3GGGbSb-E,1239
|
|
@@ -729,14 +729,16 @@ opik/rest_api/types/dataset_item_update.py,sha256=kriek2j4RpMmtGchBzaIauyc_ZpgD1
|
|
|
729
729
|
opik/rest_api/types/dataset_item_write.py,sha256=9-9JB8IINvQpbvUrFcGGXHapMMWA5BYQgL4GhiIO8us,827
|
|
730
730
|
opik/rest_api/types/dataset_item_write_source.py,sha256=uukz1qfe4G5TUm-9cIZnuXQYuRcY2ikzEuzkbkvZqmw,180
|
|
731
731
|
opik/rest_api/types/dataset_page_public.py,sha256=8RPozbHkJ33K70UnO7jZ5FksVQqOC6gxBshzw4u1iL0,941
|
|
732
|
-
opik/rest_api/types/dataset_public.py,sha256=
|
|
732
|
+
opik/rest_api/types/dataset_public.py,sha256=G255kiP4mHty-bpFxTLOryrqTkVMM1KpX0V_0q69a58,1687
|
|
733
733
|
opik/rest_api/types/dataset_public_status.py,sha256=ESXfOJ58hqK00l8IoNOrnEZRisDIZLKvsuMamvLOX5Q,191
|
|
734
734
|
opik/rest_api/types/dataset_public_visibility.py,sha256=_5ZuoYt_0qCEKBC3TLVw3R-1rM4Q1mleiaAxIqUtGc8,168
|
|
735
735
|
opik/rest_api/types/dataset_status.py,sha256=WF8gs5tlSMz4lGlJaoK2HXjE0_heUkGaYXysoR6REWg,185
|
|
736
736
|
opik/rest_api/types/dataset_version_diff.py,sha256=OyUlhfU8x72gZglaRHl0yiGHt4d6J50asgwsIgVKDpo,729
|
|
737
737
|
opik/rest_api/types/dataset_version_diff_stats.py,sha256=QlCS6okJTxt8AKLZY1khxkjtR5wBQxkBq3t1G40ymGY,1042
|
|
738
738
|
opik/rest_api/types/dataset_version_page_public.py,sha256=ZmpU0P-th-kjnBAIdKMkWnTgR_W5SwgCfbegnN9D_Rc,760
|
|
739
|
-
opik/rest_api/types/dataset_version_public.py,sha256=
|
|
739
|
+
opik/rest_api/types/dataset_version_public.py,sha256=5cQ3mngiwj9-CvHTPO821-qor8ptK4scRd6co8PJUTI,1706
|
|
740
|
+
opik/rest_api/types/dataset_version_summary.py,sha256=pZ73u12cUfuqkuoMjzQ-LiWCalEji9R0eEYNBwA8IFM,1071
|
|
741
|
+
opik/rest_api/types/dataset_version_summary_public.py,sha256=U1qM-Oed75aB3qc9EMvyUovH2gCvk0gcNMsNWfQgoCk,1077
|
|
740
742
|
opik/rest_api/types/dataset_visibility.py,sha256=tDy7GBfbbPYsWQc2Xdmeg2TpSIaWZ-spylwrl3y78cU,162
|
|
741
743
|
opik/rest_api/types/delete_attachments_request.py,sha256=GoMwg7LYYbtvO5AS405MIHt-Ot3aQdpvqOOQPX4HOUM,730
|
|
742
744
|
opik/rest_api/types/delete_attachments_request_entity_type.py,sha256=WE8M3BCJ9WjH1z0tMFCHniXV5Q-0dFAQ7i5g7i5QIas,175
|
|
@@ -801,7 +803,7 @@ opik/rest_api/types/feedback_update.py,sha256=Tm1DQLkjiesy-wfPO7ByUJtfQseJCwREaw
|
|
|
801
803
|
opik/rest_api/types/function.py,sha256=iKajPtFb5aIjwDs1AaHBHXwyKX8pMVBpww-KO3TeEJk,729
|
|
802
804
|
opik/rest_api/types/function_call.py,sha256=kHQKXzoGq8TNLY8EBsRLkZY8ukmWrS9-H6Ql73ZzjYs,586
|
|
803
805
|
opik/rest_api/types/group_content.py,sha256=S7PdBMFG2YPSZb1VurCiS4MCcZh8VJSbWv8NdaFtHoM,544
|
|
804
|
-
opik/rest_api/types/group_content_with_aggregations.py,sha256=
|
|
806
|
+
opik/rest_api/types/group_content_with_aggregations.py,sha256=cEF10OXzy0-Y_XPc16HcYJxan3rB1rWh-7b4KwoacRE,664
|
|
805
807
|
opik/rest_api/types/group_detail.py,sha256=XdSk7S4_9E0OyU_rOO71rG5YU5bhSEzei7DsNgeI05o,564
|
|
806
808
|
opik/rest_api/types/group_details.py,sha256=ZmW4wN0fHG8qkzB_p__-rEGVw-wIhISRVscnXJSNfIg,612
|
|
807
809
|
opik/rest_api/types/guardrail.py,sha256=sF5dPAgawBDU5v9K5Se7XEJemmbz08zNYFiur2ZI7G0,966
|
|
@@ -1056,9 +1058,9 @@ opik/validation/parameters_validator.py,sha256=Hz8dcDKH7sQC94H9HjCFRPmSd5iTm79h8
|
|
|
1056
1058
|
opik/validation/result.py,sha256=0poOSya4AJQYrtfpHUqh-kQfLOS0hOyjujaclSws5do,709
|
|
1057
1059
|
opik/validation/validator.py,sha256=dPmgvQALyaPQzrdOhJRP0WRW2-HL5cUqq_-cR5Jlz0M,149
|
|
1058
1060
|
opik/validation/validator_helpers.py,sha256=IlVW5obsMmohCBn3O29FYVuTg1crECnJpAzpnrYiYAw,4382
|
|
1059
|
-
opik-1.9.
|
|
1060
|
-
opik-1.9.
|
|
1061
|
-
opik-1.9.
|
|
1062
|
-
opik-1.9.
|
|
1063
|
-
opik-1.9.
|
|
1064
|
-
opik-1.9.
|
|
1061
|
+
opik-1.9.41.dist-info/licenses/LICENSE,sha256=dh-gqdlfYDxrJDrNx4UmXYLfLjY9hL1hMfJzLkb1_lY,11372
|
|
1062
|
+
opik-1.9.41.dist-info/METADATA,sha256=28NOYL3D3C9DGN4nXuGUuxZLoCvlXSSLT8_rRmhYU-4,34008
|
|
1063
|
+
opik-1.9.41.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
1064
|
+
opik-1.9.41.dist-info/entry_points.txt,sha256=w0286wCciHEW75__VFhoJvymCiYKhCMKhHmLrBpQmbU,83
|
|
1065
|
+
opik-1.9.41.dist-info/top_level.txt,sha256=2oMiKnSx98Cvff0wEIdJ7r2dkKvy7xalZ-yFuc9O49Y,5
|
|
1066
|
+
opik-1.9.41.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|