-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdataset_response.py
More file actions
117 lines (94 loc) · 3.65 KB
/
dataset_response.py
File metadata and controls
117 lines (94 loc) · 3.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# This file was auto-generated by Fern from our API Definition.
import datetime as dt
import typing
import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.serialization import FieldMetadata
from ..core.unchecked_base_model import UncheckedBaseModel
from .datapoint_response import DatapointResponse
from .environment_response import EnvironmentResponse
from .user_response import UserResponse
class DatasetResponse(UncheckedBaseModel):
"""
Base type that all File Responses should inherit from.
Attributes defined here are common to all File Responses and should be overridden
in the inheriting classes with documentation and appropriate Field definitions.
"""
path: str = pydantic.Field()
"""
Path of the Dataset, including the name, which is used as a unique identifier.
"""
id: str = pydantic.Field()
"""
Unique identifier for the Dataset. Starts with `ds_`.
"""
directory_id: typing.Optional[str] = pydantic.Field(default=None)
"""
ID of the directory that the file is in on Humanloop.
"""
name: str = pydantic.Field()
"""
Name of the Dataset, which is used as a unique identifier.
"""
description: typing.Optional[str] = pydantic.Field(default=None)
"""
Description of the Dataset.
"""
schema_: typing_extensions.Annotated[
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="schema")
] = pydantic.Field(default=None)
"""
The JSON schema for the File.
"""
readme: typing.Optional[str] = pydantic.Field(default=None)
"""
Long description of the file.
"""
tags: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
"""
List of tags associated with the file.
"""
version_id: str = pydantic.Field()
"""
Unique identifier for the specific Dataset Version. If no query params provided, the default deployed Dataset Version is returned. Starts with `dsv_`.
"""
type: typing.Optional[typing.Literal["dataset"]] = None
environments: typing.Optional[typing.List[EnvironmentResponse]] = pydantic.Field(default=None)
"""
The list of environments the Dataset Version is deployed to.
"""
created_at: dt.datetime
updated_at: dt.datetime
created_by: typing.Optional[UserResponse] = pydantic.Field(default=None)
"""
The user who created the Dataset.
"""
last_used_at: dt.datetime
version_name: typing.Optional[str] = pydantic.Field(default=None)
"""
Unique name for the Dataset version. Version names must be unique for a given Dataset.
"""
version_description: typing.Optional[str] = pydantic.Field(default=None)
"""
Description of the version, e.g., the changes made in this version.
"""
datapoints_count: int = pydantic.Field()
"""
The number of Datapoints in this Dataset version.
"""
datapoints: typing.Optional[typing.List[DatapointResponse]] = pydantic.Field(default=None)
"""
The list of Datapoints in this Dataset version. Only provided if explicitly requested.
"""
attributes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
"""
Additional fields to describe the Dataset. Helpful to separate Dataset versions from each other with details on how they were created or used.
"""
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow