plexus-python-pulse-demeter 1.1.126__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.
- plexus/pulse/demeter/__init__.py +6 -0
- plexus/pulse/demeter/app/__init__.py +0 -0
- plexus/pulse/demeter/app/api/__init__.py +44 -0
- plexus/pulse/demeter/app/api/archive_internal_endpoints.py +316 -0
- plexus/pulse/demeter/app/api/archive_public_endpoints.py +255 -0
- plexus/pulse/demeter/app/api/dataset_internal_endpoints.py +1043 -0
- plexus/pulse/demeter/app/api/dataset_public_endpoints.py +2161 -0
- plexus/pulse/demeter/app/api/dataset_workflow_endpoints.py +532 -0
- plexus/pulse/demeter/app/api/tagging_endpoints.py +323 -0
- plexus/pulse/demeter/app/api/user_endpoints.py +78 -0
- plexus/pulse/demeter/app/core/__init__.py +0 -0
- plexus/pulse/demeter/app/core/database.py +43 -0
- plexus/pulse/demeter/app/core/vault.py +29 -0
- plexus/pulse/demeter/app/main.py +16 -0
- plexus/pulse/demeter/app/models/__init__.py +33 -0
- plexus/pulse/demeter/app/models/local.py +249 -0
- plexus/pulse/demeter/app/models/registry/__init__.py +112 -0
- plexus/pulse/demeter/app/models/registry/archive.py +529 -0
- plexus/pulse/demeter/app/models/registry/dataset.py +1531 -0
- plexus/pulse/demeter/app/models/registry/tagging.py +478 -0
- plexus/pulse/demeter/app/models/registry/user.py +79 -0
- plexus/pulse/demeter/tools/__init__.py +0 -0
- plexus/pulse/demeter/tools/main.py +306 -0
- plexus/pulse/demeter/utils/__init__.py +0 -0
- plexus/pulse/demeter/utils/config.py +25 -0
- plexus/pulse/demeter/utils/datautils.py +436 -0
- plexus_python_pulse_demeter-1.1.126.dist-info/METADATA +36 -0
- plexus_python_pulse_demeter-1.1.126.dist-info/RECORD +31 -0
- plexus_python_pulse_demeter-1.1.126.dist-info/WHEEL +5 -0
- plexus_python_pulse_demeter-1.1.126.dist-info/entry_points.txt +2 -0
- plexus_python_pulse_demeter-1.1.126.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1531 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
import typing
|
|
3
|
+
import uuid as py_uuid
|
|
4
|
+
from typing import Self
|
|
5
|
+
|
|
6
|
+
import jsonschema
|
|
7
|
+
import pydantic as pdt
|
|
8
|
+
import sqlalchemy as sa
|
|
9
|
+
import sqlalchemy.dialects.postgresql as sa_pg
|
|
10
|
+
import sqlalchemy.orm as sa_orm
|
|
11
|
+
from plexus.common.utils.jsonutils import JsonObject
|
|
12
|
+
from plexus.pulse.common.utils.datautils import (
|
|
13
|
+
validate_bag_name,
|
|
14
|
+
validate_colon_tag,
|
|
15
|
+
validate_dt_timezone,
|
|
16
|
+
validate_semver,
|
|
17
|
+
validate_slash_tag,
|
|
18
|
+
validate_snake_case,
|
|
19
|
+
validate_strict_fragmented_relpath,
|
|
20
|
+
validate_strict_relpath,
|
|
21
|
+
validate_vehicle_name,
|
|
22
|
+
)
|
|
23
|
+
from plexus.pulse.common.utils.jsonutils import json_datetime_encoder
|
|
24
|
+
from plexus.pulse.common.utils.ormutils import RevisionModelMixinProtocol
|
|
25
|
+
from plexus.pulse.common.utils.ormutils import make_revision_model_mixin, revision_model_mixin
|
|
26
|
+
from sqlmodel import Field, SQLModel
|
|
27
|
+
|
|
28
|
+
from plexus.pulse.demeter.app.models.registry import RegistryBase
|
|
29
|
+
|
|
30
|
+
__all__ = [
|
|
31
|
+
"SampleLayout",
|
|
32
|
+
"ClassifierTaxonomy",
|
|
33
|
+
"AnnotationGuideline",
|
|
34
|
+
"ModelArchitecture",
|
|
35
|
+
"ModelBenchmark",
|
|
36
|
+
"RegisteredDataset",
|
|
37
|
+
"RegisteredSample",
|
|
38
|
+
"RegisteredDatasetSample",
|
|
39
|
+
"RegisteredDatasetLayout",
|
|
40
|
+
"DatasetRegistration",
|
|
41
|
+
"DatasetPromotion",
|
|
42
|
+
"SampleClassifier",
|
|
43
|
+
"SampleAnnotation",
|
|
44
|
+
"ModelTraining",
|
|
45
|
+
"ModelExperiment",
|
|
46
|
+
"ModelExperimentPromotion",
|
|
47
|
+
"ModelEvaluation",
|
|
48
|
+
"ModelAssessment",
|
|
49
|
+
"ModelAssessmentPromotion",
|
|
50
|
+
"SampleLayoutTable",
|
|
51
|
+
"ClassifierTaxonomyTable",
|
|
52
|
+
"AnnotationGuidelineTable",
|
|
53
|
+
"ModelArchitectureTable",
|
|
54
|
+
"ModelBenchmarkTable",
|
|
55
|
+
"RegisteredDatasetTable",
|
|
56
|
+
"RegisteredSampleTable",
|
|
57
|
+
"RegisteredDatasetSampleTable",
|
|
58
|
+
"RegisteredDatasetLayoutTable",
|
|
59
|
+
"DatasetRegistrationTable",
|
|
60
|
+
"DatasetPromotionTable",
|
|
61
|
+
"SampleClassifierTable",
|
|
62
|
+
"SampleAnnotationTable",
|
|
63
|
+
"ModelTrainingTable",
|
|
64
|
+
"ModelExperimentTable",
|
|
65
|
+
"ModelExperimentPromotionTable",
|
|
66
|
+
"ModelEvaluationTable",
|
|
67
|
+
"ModelAssessmentTable",
|
|
68
|
+
"ModelAssessmentPromotionTable",
|
|
69
|
+
]
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class SampleLayout(RegistryBase):
|
|
73
|
+
uuid: py_uuid.UUID = Field(
|
|
74
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
75
|
+
default_factory=py_uuid.uuid4,
|
|
76
|
+
description="UUID of the sample layout",
|
|
77
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
78
|
+
)
|
|
79
|
+
name: str = Field(
|
|
80
|
+
sa_column=sa.Column(sa_pg.VARCHAR(64), nullable=False),
|
|
81
|
+
description="Name of the sample layout",
|
|
82
|
+
schema_extra=dict(examples=["layout_name/layout_name"]),
|
|
83
|
+
)
|
|
84
|
+
description: str = Field(
|
|
85
|
+
sa_column=sa.Column(sa_pg.VARCHAR(1024), nullable=False),
|
|
86
|
+
description="Description of the sample layout",
|
|
87
|
+
schema_extra=dict(examples=["This is an example description of the sample layout."]),
|
|
88
|
+
)
|
|
89
|
+
child_layout_uuids: list[py_uuid.UUID] | None = Field(
|
|
90
|
+
sa_column=sa.Column(sa_pg.ARRAY(sa_pg.UUID(as_uuid=True))),
|
|
91
|
+
default=None,
|
|
92
|
+
description="List of child sample layout UUIDs",
|
|
93
|
+
schema_extra=dict(examples=[["abcd1234-5678-90ab-cdef-1234567890ab", "12345678-90ab-cdef-1234-567890abcdef"]]),
|
|
94
|
+
)
|
|
95
|
+
layout_spec: JsonObject = Field(
|
|
96
|
+
sa_column=sa.Column(sa_pg.JSONB, nullable=False),
|
|
97
|
+
description="JSON specification defining the sample layout",
|
|
98
|
+
schema_extra=dict(
|
|
99
|
+
examples=[
|
|
100
|
+
{
|
|
101
|
+
"layout": {
|
|
102
|
+
"type": "directory",
|
|
103
|
+
"children": [
|
|
104
|
+
{
|
|
105
|
+
"matcher": {"type": "regex", "pattern": r"^\d{8}T\d{6}\.\d{6}$", "min_items": 1},
|
|
106
|
+
"layout": {
|
|
107
|
+
"type": "directory",
|
|
108
|
+
"children": [
|
|
109
|
+
{
|
|
110
|
+
"matcher": {
|
|
111
|
+
"type": "exact",
|
|
112
|
+
"pattern": "front_left_camera.png",
|
|
113
|
+
"min_items": 1,
|
|
114
|
+
},
|
|
115
|
+
"layout": {"type": "file"},
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"matcher": {
|
|
119
|
+
"type": "exact",
|
|
120
|
+
"pattern": "front_right_camera.png",
|
|
121
|
+
"min_items": 1,
|
|
122
|
+
},
|
|
123
|
+
"layout": {"type": "file"},
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"matcher": {
|
|
127
|
+
"type": "exact",
|
|
128
|
+
"pattern": "side_left_camera.png",
|
|
129
|
+
"min_items": 1,
|
|
130
|
+
},
|
|
131
|
+
"layout": {"type": "file"},
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"matcher": {
|
|
135
|
+
"type": "exact",
|
|
136
|
+
"pattern": "side_right_camera.png",
|
|
137
|
+
"min_items": 1,
|
|
138
|
+
},
|
|
139
|
+
"layout": {"type": "file"},
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"matcher": {
|
|
143
|
+
"type": "exact",
|
|
144
|
+
"pattern": "rear_left_camera.png",
|
|
145
|
+
"min_items": 1,
|
|
146
|
+
},
|
|
147
|
+
"layout": {"type": "file"},
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"matcher": {
|
|
151
|
+
"type": "exact",
|
|
152
|
+
"pattern": "rear_right_camera.png",
|
|
153
|
+
"min_items": 1,
|
|
154
|
+
},
|
|
155
|
+
"layout": {"type": "file"},
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"matcher": {"type": "exact", "pattern": "lidar_points.pcd"},
|
|
159
|
+
"layout": {"type": "file"},
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
"allow_extra": False,
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
"allow_extra": False,
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"layout": {
|
|
171
|
+
"type": "directory",
|
|
172
|
+
"children": [
|
|
173
|
+
{
|
|
174
|
+
"matcher": {"type": "regex", "pattern": r"^\d{8}T\d{6}\.\d{6}$", "min_items": 1},
|
|
175
|
+
"layout": "abcd1234-5678-90ab-cdef-1234567890ab", # reference to another layout
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
"allow_extra": False,
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"layout": {
|
|
183
|
+
"type": "directory",
|
|
184
|
+
"children": [
|
|
185
|
+
{
|
|
186
|
+
"matcher": {"type": "exact", "pattern": "front_left_camera.png", "min_items": 1},
|
|
187
|
+
"layout": {"type": "file"},
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"matcher": {"type": "exact", "pattern": "front_right_camera.png", "min_items": 1},
|
|
191
|
+
"layout": {"type": "file"},
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"matcher": {"type": "exact", "pattern": "side_left_camera.png", "min_items": 1},
|
|
195
|
+
"layout": {"type": "file"},
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"matcher": {"type": "exact", "pattern": "side_right_camera.png", "min_items": 1},
|
|
199
|
+
"layout": {"type": "file"},
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"matcher": {"type": "exact", "pattern": "rear_left_camera.png", "min_items": 1},
|
|
203
|
+
"layout": {"type": "file"},
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"matcher": {"type": "exact", "pattern": "rear_right_camera.png", "min_items": 1},
|
|
207
|
+
"layout": {"type": "file"},
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"matcher": {"type": "exact", "pattern": "lidar_points.pcd"},
|
|
211
|
+
"layout": {"type": "file"},
|
|
212
|
+
},
|
|
213
|
+
],
|
|
214
|
+
"allow_extra": False,
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
]
|
|
218
|
+
),
|
|
219
|
+
)
|
|
220
|
+
props: JsonObject | None = Field(
|
|
221
|
+
sa_column=sa.Column(sa_pg.JSONB),
|
|
222
|
+
default=None,
|
|
223
|
+
description="Additional properties stored as JSON",
|
|
224
|
+
schema_extra=dict(examples=[{"example_prop_key": "example_prop_value"}]),
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
@pdt.field_validator("name", mode="after")
|
|
228
|
+
@classmethod
|
|
229
|
+
def validate_name(cls, v: str) -> str:
|
|
230
|
+
validate_slash_tag(v)
|
|
231
|
+
return v
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
class ClassifierTaxonomy(RegistryBase):
|
|
235
|
+
uuid: py_uuid.UUID = Field(
|
|
236
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
237
|
+
default_factory=py_uuid.uuid4,
|
|
238
|
+
description="UUID of the classifier taxonomy",
|
|
239
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
240
|
+
)
|
|
241
|
+
name: str = Field(
|
|
242
|
+
sa_column=sa.Column(sa_pg.VARCHAR(64), nullable=False),
|
|
243
|
+
description="Name of the classifier taxonomy",
|
|
244
|
+
schema_extra=dict(examples=["taxonomy_name/taxonomy_name"]),
|
|
245
|
+
)
|
|
246
|
+
version: str = Field(
|
|
247
|
+
sa_column=sa.Column(sa_pg.VARCHAR(32), nullable=False),
|
|
248
|
+
description="Version of the classifier taxonomy",
|
|
249
|
+
schema_extra=dict(examples=["1.2.3-alpha+post0"]),
|
|
250
|
+
)
|
|
251
|
+
description: str = Field(
|
|
252
|
+
sa_column=sa.Column(sa_pg.VARCHAR(1024), nullable=False),
|
|
253
|
+
description="Description of the classifier taxonomy",
|
|
254
|
+
schema_extra=dict(examples=["This is an example description of the classifier taxonomy."]),
|
|
255
|
+
)
|
|
256
|
+
taxonomy_hierarchy: JsonObject = Field(
|
|
257
|
+
sa_column=sa.Column(sa_pg.JSONB, nullable=False),
|
|
258
|
+
description="JSON object defining the classifiers and their hierarchy",
|
|
259
|
+
schema_extra=dict(
|
|
260
|
+
examples=[
|
|
261
|
+
{
|
|
262
|
+
"weather": ["sunny", "rainy", "foggy"],
|
|
263
|
+
"obstacle": [
|
|
264
|
+
{"vehicle": ["car", "truck", "bus", "motorcycle"]},
|
|
265
|
+
"pedestrian",
|
|
266
|
+
"bicycle",
|
|
267
|
+
],
|
|
268
|
+
"lane_marking": ["solid", "dashed"],
|
|
269
|
+
"road_sign": ["stop", "yield"],
|
|
270
|
+
},
|
|
271
|
+
]
|
|
272
|
+
),
|
|
273
|
+
)
|
|
274
|
+
props: JsonObject | None = Field(
|
|
275
|
+
sa_column=sa.Column(sa_pg.JSONB),
|
|
276
|
+
default=None,
|
|
277
|
+
description="Additional properties stored as JSON",
|
|
278
|
+
schema_extra=dict(examples=[{"example_prop_key": "example_prop_value"}]),
|
|
279
|
+
)
|
|
280
|
+
|
|
281
|
+
@pdt.field_validator("name", mode="after")
|
|
282
|
+
@classmethod
|
|
283
|
+
def validate_name(cls, v: str) -> str:
|
|
284
|
+
validate_slash_tag(v)
|
|
285
|
+
return v
|
|
286
|
+
|
|
287
|
+
@pdt.field_validator("version", mode="after")
|
|
288
|
+
@classmethod
|
|
289
|
+
def validate_version(cls, v: str) -> str:
|
|
290
|
+
validate_semver(v)
|
|
291
|
+
return v
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
class AnnotationGuideline(RegistryBase):
|
|
295
|
+
uuid: py_uuid.UUID = Field(
|
|
296
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
297
|
+
default_factory=py_uuid.uuid4,
|
|
298
|
+
description="UUID of the annotation guideline",
|
|
299
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
300
|
+
)
|
|
301
|
+
name: str = Field(
|
|
302
|
+
sa_column=sa.Column(sa_pg.VARCHAR(64), nullable=False),
|
|
303
|
+
description="Name of the annotation guideline",
|
|
304
|
+
schema_extra=dict(examples=["guideline_name/guideline_name"]),
|
|
305
|
+
)
|
|
306
|
+
version: str = Field(
|
|
307
|
+
sa_column=sa.Column(sa_pg.VARCHAR(32), nullable=False),
|
|
308
|
+
description="Version of the annotation guideline",
|
|
309
|
+
schema_extra=dict(examples=["1.2.3-alpha+post0"]),
|
|
310
|
+
)
|
|
311
|
+
description: str = Field(
|
|
312
|
+
sa_column=sa.Column(sa_pg.VARCHAR(1024), nullable=False),
|
|
313
|
+
description="Description of the annotation guideline",
|
|
314
|
+
schema_extra=dict(examples=["This is an example description of the annotation guideline."]),
|
|
315
|
+
)
|
|
316
|
+
supported_layout_uuids: list[py_uuid.UUID] = Field(
|
|
317
|
+
sa_column=sa.Column(sa_pg.ARRAY(sa_pg.UUID(as_uuid=True)), nullable=False),
|
|
318
|
+
description="List of supported sample layout UUIDs",
|
|
319
|
+
schema_extra=dict(examples=[["abcd1234-5678-90ab-cdef-1234567890ab", "12345678-90ab-cdef-1234-567890abcdef"]]),
|
|
320
|
+
)
|
|
321
|
+
annotation_schema: JsonObject = Field(
|
|
322
|
+
sa_column=sa.Column(sa_pg.JSONB, nullable=False),
|
|
323
|
+
description="JSON schema defining the annotation format",
|
|
324
|
+
schema_extra=dict(
|
|
325
|
+
examples=[
|
|
326
|
+
{
|
|
327
|
+
"type": "object",
|
|
328
|
+
"required": ["object_id", "object_category", "cuboid"],
|
|
329
|
+
"properties": {
|
|
330
|
+
"object_id": {"type": "string"},
|
|
331
|
+
"object_category": {
|
|
332
|
+
"type": "string",
|
|
333
|
+
"enum": ["car", "truck", "bus", "motorcycle", "pedestrian", "bicycle"],
|
|
334
|
+
},
|
|
335
|
+
"cuboid": {
|
|
336
|
+
"type": "object",
|
|
337
|
+
"required": ["dimensions", "center", "rotation"],
|
|
338
|
+
"properties": {
|
|
339
|
+
"dimensions": {"type": "object"},
|
|
340
|
+
"center": {"type": "object"},
|
|
341
|
+
"rotation": {"type": "object"},
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
},
|
|
346
|
+
]
|
|
347
|
+
),
|
|
348
|
+
)
|
|
349
|
+
props: JsonObject | None = Field(
|
|
350
|
+
sa_column=sa.Column(sa_pg.JSONB),
|
|
351
|
+
default=None,
|
|
352
|
+
description="Additional properties stored as JSON",
|
|
353
|
+
schema_extra=dict(examples=[{"example_prop_key": "example_prop_value"}]),
|
|
354
|
+
)
|
|
355
|
+
|
|
356
|
+
@pdt.field_validator("name", mode="after")
|
|
357
|
+
@classmethod
|
|
358
|
+
def validate_name(cls, v: str) -> str:
|
|
359
|
+
validate_slash_tag(v)
|
|
360
|
+
return v
|
|
361
|
+
|
|
362
|
+
@pdt.field_validator("version", mode="after")
|
|
363
|
+
@classmethod
|
|
364
|
+
def validate_version(cls, v: str) -> str:
|
|
365
|
+
validate_semver(v)
|
|
366
|
+
return v
|
|
367
|
+
|
|
368
|
+
@pdt.field_validator("annotation_schema", mode="after")
|
|
369
|
+
@classmethod
|
|
370
|
+
def validate_annotation_schema(cls, v: JsonObject) -> JsonObject:
|
|
371
|
+
try:
|
|
372
|
+
jsonschema.Draft7Validator.check_schema(v)
|
|
373
|
+
except Exception as e:
|
|
374
|
+
raise ValueError("not a valid JSON schema") from e
|
|
375
|
+
return v
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
class ModelArchitecture(RegistryBase):
|
|
379
|
+
uuid: py_uuid.UUID = Field(
|
|
380
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
381
|
+
default_factory=py_uuid.uuid4,
|
|
382
|
+
description="UUID of the model architecture",
|
|
383
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
384
|
+
)
|
|
385
|
+
name: str = Field(
|
|
386
|
+
sa_column=sa.Column(sa_pg.VARCHAR(64), nullable=False),
|
|
387
|
+
description="Name of the model architecture",
|
|
388
|
+
schema_extra=dict(examples=["architecture_name/architecture_name"]),
|
|
389
|
+
)
|
|
390
|
+
version: str = Field(
|
|
391
|
+
sa_column=sa.Column(sa_pg.VARCHAR(32), nullable=False),
|
|
392
|
+
description="Version of the model architecture",
|
|
393
|
+
schema_extra=dict(examples=["1.2.3-alpha+post0"]),
|
|
394
|
+
)
|
|
395
|
+
description: str = Field(
|
|
396
|
+
sa_column=sa.Column(sa_pg.VARCHAR(1024), nullable=False),
|
|
397
|
+
description="Description of the model architecture",
|
|
398
|
+
schema_extra=dict(examples=["This is an example description of the model architecture."]),
|
|
399
|
+
)
|
|
400
|
+
supported_guideline_uuids: list[py_uuid.UUID] = Field(
|
|
401
|
+
sa_column=sa.Column(sa_pg.ARRAY(sa_pg.UUID(as_uuid=True)), nullable=False),
|
|
402
|
+
description="List of supported annotation guideline UUIDs",
|
|
403
|
+
schema_extra=dict(examples=[["abcd1234-5678-90ab-cdef-1234567890ab", "12345678-90ab-cdef-1234-567890abcdef"]]),
|
|
404
|
+
)
|
|
405
|
+
props: JsonObject | None = Field(
|
|
406
|
+
sa_column=sa.Column(sa_pg.JSONB),
|
|
407
|
+
default=None,
|
|
408
|
+
description="Additional properties stored as JSON",
|
|
409
|
+
schema_extra=dict(examples=[{"example_prop_key": "example_prop_value"}]),
|
|
410
|
+
)
|
|
411
|
+
|
|
412
|
+
@pdt.field_validator("name", mode="after")
|
|
413
|
+
@classmethod
|
|
414
|
+
def validate_name(cls, v: str) -> str:
|
|
415
|
+
validate_slash_tag(v)
|
|
416
|
+
return v
|
|
417
|
+
|
|
418
|
+
@pdt.field_validator("version", mode="after")
|
|
419
|
+
@classmethod
|
|
420
|
+
def validate_version(cls, v: str) -> str:
|
|
421
|
+
validate_semver(v)
|
|
422
|
+
return v
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
class ModelBenchmark(RegistryBase):
|
|
426
|
+
uuid: py_uuid.UUID = Field(
|
|
427
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
428
|
+
default_factory=py_uuid.uuid4,
|
|
429
|
+
description="UUID of the model benchmark",
|
|
430
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
431
|
+
)
|
|
432
|
+
name: str = Field(
|
|
433
|
+
sa_column=sa.Column(sa_pg.VARCHAR(64), nullable=False),
|
|
434
|
+
description="Name of the model benchmark",
|
|
435
|
+
schema_extra=dict(examples=["benchmark_name/benchmark_name"]),
|
|
436
|
+
)
|
|
437
|
+
version: str = Field(
|
|
438
|
+
sa_column=sa.Column(sa_pg.VARCHAR(32), nullable=False),
|
|
439
|
+
description="Version of the model benchmark",
|
|
440
|
+
schema_extra=dict(examples=["1.2.3-alpha+post0"]),
|
|
441
|
+
)
|
|
442
|
+
description: str = Field(
|
|
443
|
+
sa_column=sa.Column(sa_pg.VARCHAR(1024), nullable=False),
|
|
444
|
+
description="Description of the model benchmark",
|
|
445
|
+
schema_extra=dict(examples=["This is an example description of the model benchmark."]),
|
|
446
|
+
)
|
|
447
|
+
supported_architecture_uuids: list[py_uuid.UUID] = Field(
|
|
448
|
+
sa_column=sa.Column(sa_pg.ARRAY(sa_pg.UUID(as_uuid=True)), nullable=False),
|
|
449
|
+
description="List of supported model architecture UUIDs",
|
|
450
|
+
schema_extra=dict(examples=[["abcd1234-5678-90ab-cdef-1234567890ab", "12345678-90ab-cdef-1234-567890abcdef"]]),
|
|
451
|
+
)
|
|
452
|
+
benchmark_schema: JsonObject = Field(
|
|
453
|
+
sa_column=sa.Column(sa_pg.JSONB, nullable=False),
|
|
454
|
+
description="JSON schema defining the benchmark format",
|
|
455
|
+
schema_extra=dict(
|
|
456
|
+
examples=[
|
|
457
|
+
{
|
|
458
|
+
"type": "object",
|
|
459
|
+
"required": ["accuracy", "precision", "recall", "f1_score"],
|
|
460
|
+
"properties": {
|
|
461
|
+
"accuracy": {"type": "number", "minimum": 0, "maximum": 1},
|
|
462
|
+
"precision": {"type": "number", "minimum": 0, "maximum": 1},
|
|
463
|
+
"recall": {"type": "number", "minimum": 0, "maximum": 1},
|
|
464
|
+
"f1_score": {"type": "number", "minimum": 0, "maximum": 1},
|
|
465
|
+
},
|
|
466
|
+
},
|
|
467
|
+
]
|
|
468
|
+
),
|
|
469
|
+
)
|
|
470
|
+
props: JsonObject | None = Field(
|
|
471
|
+
sa_column=sa.Column(sa_pg.JSONB),
|
|
472
|
+
default=None,
|
|
473
|
+
description="Additional properties stored as JSON",
|
|
474
|
+
schema_extra=dict(examples=[{"example_prop_key": "example_prop_value"}]),
|
|
475
|
+
)
|
|
476
|
+
|
|
477
|
+
@pdt.field_validator("name", mode="after")
|
|
478
|
+
@classmethod
|
|
479
|
+
def validate_name(cls, v: str) -> str:
|
|
480
|
+
validate_slash_tag(v)
|
|
481
|
+
return v
|
|
482
|
+
|
|
483
|
+
@pdt.field_validator("version", mode="after")
|
|
484
|
+
@classmethod
|
|
485
|
+
def validate_version(cls, v: str) -> str:
|
|
486
|
+
validate_semver(v)
|
|
487
|
+
return v
|
|
488
|
+
|
|
489
|
+
@pdt.field_validator("benchmark_schema", mode="after")
|
|
490
|
+
@classmethod
|
|
491
|
+
def validate_benchmark_schema(cls, v: JsonObject) -> JsonObject:
|
|
492
|
+
try:
|
|
493
|
+
jsonschema.Draft7Validator.check_schema(v)
|
|
494
|
+
except Exception as e:
|
|
495
|
+
raise ValueError("not a valid JSON schema") from e
|
|
496
|
+
return v
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
class DatasetRegistration(RegistryBase):
|
|
500
|
+
uuid: py_uuid.UUID = Field(
|
|
501
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
502
|
+
default_factory=py_uuid.uuid4,
|
|
503
|
+
description="UUID of the dataset registration",
|
|
504
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
505
|
+
)
|
|
506
|
+
dataset_uuid: py_uuid.UUID = Field(
|
|
507
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
508
|
+
description="UUID of the dataset",
|
|
509
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
510
|
+
)
|
|
511
|
+
resource_path: str = Field(
|
|
512
|
+
sa_column=sa.Column(sa_pg.VARCHAR(512), nullable=False),
|
|
513
|
+
description="Root URL of the dataset resource relative to storage base path",
|
|
514
|
+
schema_extra=dict(examples=["relative/path/to/dataset"]),
|
|
515
|
+
)
|
|
516
|
+
flags: int = Field(
|
|
517
|
+
sa_column=sa.Column(sa_pg.BIGINT),
|
|
518
|
+
default=0,
|
|
519
|
+
description="Integer bitmask storing status or metadata flags for this record",
|
|
520
|
+
)
|
|
521
|
+
props: JsonObject | None = Field(
|
|
522
|
+
sa_column=sa.Column(sa_pg.JSONB),
|
|
523
|
+
default=None,
|
|
524
|
+
description="Additional properties stored as JSON",
|
|
525
|
+
schema_extra=dict(examples=[{"example_prop_key": "example_prop_value"}]),
|
|
526
|
+
)
|
|
527
|
+
|
|
528
|
+
@pdt.field_validator("resource_path", mode="after")
|
|
529
|
+
@classmethod
|
|
530
|
+
def validate_resource_path(cls, v: str) -> str:
|
|
531
|
+
validate_strict_relpath(v)
|
|
532
|
+
return v
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
class DatasetPromotion(RegistryBase):
|
|
536
|
+
uuid: py_uuid.UUID = Field(
|
|
537
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
538
|
+
default_factory=py_uuid.uuid4,
|
|
539
|
+
description="UUID of the dataset promotion",
|
|
540
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
541
|
+
)
|
|
542
|
+
dataset_uuid: py_uuid.UUID = Field(
|
|
543
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
544
|
+
description="UUID of the dataset",
|
|
545
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
546
|
+
)
|
|
547
|
+
reviewer_sso_sid: int = Field(
|
|
548
|
+
sa_column=sa.Column(sa_pg.BIGINT, nullable=False),
|
|
549
|
+
description="SSO SID of the reviewer",
|
|
550
|
+
schema_extra=dict(examples=[1234567890]),
|
|
551
|
+
)
|
|
552
|
+
flags: int = Field(
|
|
553
|
+
sa_column=sa.Column(sa_pg.BIGINT),
|
|
554
|
+
default=0,
|
|
555
|
+
description="Integer bitmask storing status or metadata flags for this record",
|
|
556
|
+
)
|
|
557
|
+
props: JsonObject | None = Field(
|
|
558
|
+
sa_column=sa.Column(sa_pg.JSONB),
|
|
559
|
+
default=None,
|
|
560
|
+
description="Additional properties stored as JSON",
|
|
561
|
+
schema_extra=dict(examples=[{"example_prop_key": "example_prop_value"}]),
|
|
562
|
+
)
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
class RegisteredDataset(RegistryBase):
|
|
566
|
+
uuid: py_uuid.UUID = Field(
|
|
567
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
568
|
+
default_factory=py_uuid.uuid4,
|
|
569
|
+
description="UUID of the dataset",
|
|
570
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
571
|
+
)
|
|
572
|
+
name: str = Field(
|
|
573
|
+
sa_column=sa.Column(sa_pg.VARCHAR(128), nullable=False),
|
|
574
|
+
description="Name of the dataset",
|
|
575
|
+
schema_extra=dict(examples=["dataset_name_dataset_name"]),
|
|
576
|
+
)
|
|
577
|
+
description: str = Field(
|
|
578
|
+
sa_column=sa.Column(sa_pg.VARCHAR(1024), nullable=False),
|
|
579
|
+
description="Description of the dataset",
|
|
580
|
+
schema_extra=dict(examples=["This is an example description of the dataset."]),
|
|
581
|
+
)
|
|
582
|
+
contributor_sso_sid: int = Field(
|
|
583
|
+
sa_column=sa.Column(sa_pg.BIGINT, nullable=False),
|
|
584
|
+
description="SSO SID of the contributor",
|
|
585
|
+
schema_extra=dict(examples=[1234567890]),
|
|
586
|
+
)
|
|
587
|
+
tags: list[str] | None = Field(
|
|
588
|
+
sa_column=sa.Column(sa_pg.ARRAY(sa_pg.VARCHAR(64))),
|
|
589
|
+
default=None,
|
|
590
|
+
description="List of tags associated with the dataset",
|
|
591
|
+
schema_extra=dict(examples=[["example_tag", "example_tag:example_tag", "example_tag:example_tag:example_tag"]]),
|
|
592
|
+
)
|
|
593
|
+
props: JsonObject | None = Field(
|
|
594
|
+
sa_column=sa.Column(sa_pg.JSONB),
|
|
595
|
+
default=None,
|
|
596
|
+
description="Additional properties stored as JSON",
|
|
597
|
+
schema_extra=dict(examples=[{"example_prop_key": "example_prop_value"}]),
|
|
598
|
+
)
|
|
599
|
+
|
|
600
|
+
@pdt.field_validator("name", mode="after")
|
|
601
|
+
@classmethod
|
|
602
|
+
def validate_name(cls, v: str) -> str:
|
|
603
|
+
validate_snake_case(v)
|
|
604
|
+
return v
|
|
605
|
+
|
|
606
|
+
@pdt.field_validator("tags", mode="after")
|
|
607
|
+
@classmethod
|
|
608
|
+
def validate_tags(cls, v: list[str] | None) -> list[str] | None:
|
|
609
|
+
for tag in (v or []):
|
|
610
|
+
validate_colon_tag(tag)
|
|
611
|
+
return v
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
class RegisteredSample(RegistryBase):
|
|
615
|
+
uuid: py_uuid.UUID = Field(
|
|
616
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
617
|
+
default_factory=py_uuid.uuid4,
|
|
618
|
+
description="UUID of the sample",
|
|
619
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
620
|
+
)
|
|
621
|
+
path: str = Field(
|
|
622
|
+
sa_column=sa.Column(sa_pg.VARCHAR(512), nullable=False),
|
|
623
|
+
description="Relative path to the sample resource directory",
|
|
624
|
+
schema_extra=dict(examples=["relative/path/to/sample"]),
|
|
625
|
+
)
|
|
626
|
+
layout_uuid: py_uuid.UUID = Field(
|
|
627
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
628
|
+
description="UUID of the associated sample layout",
|
|
629
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
630
|
+
)
|
|
631
|
+
bag_name: str = Field(
|
|
632
|
+
sa_column=sa.Column(sa_pg.VARCHAR(256), nullable=False),
|
|
633
|
+
description="Name of associated bag",
|
|
634
|
+
schema_extra=dict(
|
|
635
|
+
examples=[
|
|
636
|
+
"20200101T000000-brand_name-0",
|
|
637
|
+
"20200101T000000-brand_name_alias-0",
|
|
638
|
+
"20200101T000000-brand_name_00001-0",
|
|
639
|
+
"20200101T000000-brand_name_V00000000000000000-0",
|
|
640
|
+
]
|
|
641
|
+
),
|
|
642
|
+
)
|
|
643
|
+
vehicle_name: str = Field(
|
|
644
|
+
sa_column=sa.Column(sa_pg.VARCHAR(256), nullable=False),
|
|
645
|
+
description="Name of associated vehicle",
|
|
646
|
+
schema_extra=dict(
|
|
647
|
+
examples=["brand_name", "brand_name_alias", "brand_name_00001", "brand_name_V00000000000000000"]
|
|
648
|
+
),
|
|
649
|
+
)
|
|
650
|
+
begin_frame_dt: datetime.datetime = Field(
|
|
651
|
+
sa_column=sa.Column(sa_pg.TIMESTAMP(timezone=True), nullable=False),
|
|
652
|
+
description="Datetime of the begin frame of the sample",
|
|
653
|
+
)
|
|
654
|
+
end_frame_dt: datetime.datetime = Field(
|
|
655
|
+
sa_column=sa.Column(sa_pg.TIMESTAMP(timezone=True), nullable=False),
|
|
656
|
+
description="Datetime of the end frame of the sample",
|
|
657
|
+
)
|
|
658
|
+
child_sample_uuids: list[py_uuid.UUID] | None = Field(
|
|
659
|
+
sa_column=sa.Column(sa_pg.ARRAY(sa_pg.UUID(as_uuid=True))),
|
|
660
|
+
default=None,
|
|
661
|
+
description="List of UUIDs of associated child samples",
|
|
662
|
+
schema_extra=dict(examples=[["abcd1234-5678-90ab-cdef-1234567890ab", "12345678-90ab-cdef-1234-567890abcdef"]]),
|
|
663
|
+
)
|
|
664
|
+
tags: list[str] | None = Field(
|
|
665
|
+
sa_column=sa.Column(sa_pg.ARRAY(sa_pg.VARCHAR(64))),
|
|
666
|
+
default=None,
|
|
667
|
+
description="List of tags associated with the sample",
|
|
668
|
+
schema_extra=dict(examples=[["example_tag", "example_tag:example_tag", "example_tag:example_tag:example_tag"]]),
|
|
669
|
+
)
|
|
670
|
+
props: JsonObject | None = Field(
|
|
671
|
+
sa_column=sa.Column(sa_pg.JSONB),
|
|
672
|
+
default=None,
|
|
673
|
+
description="Additional properties stored as JSON",
|
|
674
|
+
schema_extra=dict(examples=[{"example_prop_key": "example_prop_value"}]),
|
|
675
|
+
)
|
|
676
|
+
|
|
677
|
+
@pdt.field_validator("path", mode="after")
|
|
678
|
+
@classmethod
|
|
679
|
+
def validate_path(cls, v: str) -> str:
|
|
680
|
+
validate_strict_relpath(v)
|
|
681
|
+
return v
|
|
682
|
+
|
|
683
|
+
@pdt.field_validator("bag_name", mode="after")
|
|
684
|
+
@classmethod
|
|
685
|
+
def validate_bag_name(cls, v: str) -> str:
|
|
686
|
+
validate_bag_name(v)
|
|
687
|
+
return v
|
|
688
|
+
|
|
689
|
+
@pdt.field_validator("vehicle_name", mode="after")
|
|
690
|
+
@classmethod
|
|
691
|
+
def validate_vehicle_name(cls, v: str) -> str:
|
|
692
|
+
validate_vehicle_name(v)
|
|
693
|
+
return v
|
|
694
|
+
|
|
695
|
+
@pdt.field_validator("begin_frame_dt", mode="after")
|
|
696
|
+
@classmethod
|
|
697
|
+
def validate_begin_frame_dt(cls, v: datetime.datetime) -> datetime.datetime:
|
|
698
|
+
validate_dt_timezone(v)
|
|
699
|
+
return v
|
|
700
|
+
|
|
701
|
+
@pdt.field_validator("end_frame_dt", mode="after")
|
|
702
|
+
@classmethod
|
|
703
|
+
def validate_end_frame_dt(cls, v: datetime.datetime) -> datetime.datetime:
|
|
704
|
+
validate_dt_timezone(v)
|
|
705
|
+
return v
|
|
706
|
+
|
|
707
|
+
@pdt.model_validator(mode="after")
|
|
708
|
+
def validate_begin_frame_dt_end_frame_dt(self) -> Self:
|
|
709
|
+
if self.begin_frame_dt > self.end_frame_dt:
|
|
710
|
+
raise ValueError(
|
|
711
|
+
f"begin_frame_dt '{self.begin_frame_dt}' is greater than end_frame_dt '{self.end_frame_dt}'")
|
|
712
|
+
return self
|
|
713
|
+
|
|
714
|
+
@pdt.field_validator("tags", mode="after")
|
|
715
|
+
@classmethod
|
|
716
|
+
def validate_tags(cls, v: list[str] | None) -> list[str] | None:
|
|
717
|
+
for tag in (v or []):
|
|
718
|
+
validate_colon_tag(tag)
|
|
719
|
+
return v
|
|
720
|
+
|
|
721
|
+
@pdt.field_serializer("begin_frame_dt", mode="plain")
|
|
722
|
+
def serialize_begin_frame_dt(self, v: datetime.datetime) -> str:
|
|
723
|
+
return json_datetime_encoder(v)
|
|
724
|
+
|
|
725
|
+
@pdt.field_serializer("end_frame_dt", mode="plain")
|
|
726
|
+
def serialize_end_frame_dt(self, v: datetime.datetime) -> str:
|
|
727
|
+
return json_datetime_encoder(v)
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
class RegisteredDatasetSample(RegistryBase):
|
|
731
|
+
dataset_uuid: py_uuid.UUID = Field(
|
|
732
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
733
|
+
description="UUID of associated dataset",
|
|
734
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
735
|
+
)
|
|
736
|
+
sample_uuid: py_uuid.UUID = Field(
|
|
737
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
738
|
+
description="UUID of associated sample",
|
|
739
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
740
|
+
)
|
|
741
|
+
annotation_uuid: py_uuid.UUID | None = Field(
|
|
742
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True)),
|
|
743
|
+
default=None,
|
|
744
|
+
description="UUID of associated annotation",
|
|
745
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
746
|
+
)
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
class RegisteredDatasetLayout(RegistryBase):
|
|
750
|
+
dataset_uuid: py_uuid.UUID = Field(
|
|
751
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
752
|
+
description="UUID of associated dataset",
|
|
753
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
754
|
+
)
|
|
755
|
+
layout_uuid: py_uuid.UUID = Field(
|
|
756
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
757
|
+
description="UUID of associated sample layout",
|
|
758
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
759
|
+
)
|
|
760
|
+
samples_count: int = Field(
|
|
761
|
+
sa_column=sa.Column(sa_pg.INTEGER, nullable=False),
|
|
762
|
+
description="Number of samples in the dataset with this layout",
|
|
763
|
+
)
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
class SampleClassifier(RegistryBase):
|
|
767
|
+
uuid: py_uuid.UUID = Field(
|
|
768
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
769
|
+
default_factory=py_uuid.uuid4,
|
|
770
|
+
description="UUID of the classifier",
|
|
771
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
772
|
+
)
|
|
773
|
+
sample_uuid: py_uuid.UUID = Field(
|
|
774
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
775
|
+
description="UUID of the associated sample",
|
|
776
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
777
|
+
)
|
|
778
|
+
taxonomy_uuid: py_uuid.UUID = Field(
|
|
779
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
780
|
+
description="UUID of the classifier taxonomy used",
|
|
781
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
782
|
+
)
|
|
783
|
+
classifier_data: JsonObject = Field(
|
|
784
|
+
sa_column=sa.Column(sa_pg.JSONB, nullable=False),
|
|
785
|
+
description="Classifier data stored as JSON",
|
|
786
|
+
schema_extra=dict(
|
|
787
|
+
examples=[
|
|
788
|
+
{"classifiers": ["weather:sunny", "obstacle:vehicle:car", "lane_marking:solid"]},
|
|
789
|
+
]
|
|
790
|
+
),
|
|
791
|
+
)
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
class SampleAnnotation(RegistryBase):
|
|
795
|
+
uuid: py_uuid.UUID = Field(
|
|
796
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
797
|
+
default_factory=py_uuid.uuid4,
|
|
798
|
+
description="UUID of the annotation",
|
|
799
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
800
|
+
)
|
|
801
|
+
sample_uuid: py_uuid.UUID = Field(
|
|
802
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
803
|
+
description="UUID of the associated sample",
|
|
804
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
805
|
+
)
|
|
806
|
+
guideline_uuid: py_uuid.UUID = Field(
|
|
807
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
808
|
+
description="UUID of the annotation guideline used",
|
|
809
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
810
|
+
)
|
|
811
|
+
path: str | None = Field(
|
|
812
|
+
sa_column=sa.Column(sa_pg.VARCHAR(512)),
|
|
813
|
+
default=None,
|
|
814
|
+
description="Relative path to the annotation resource file",
|
|
815
|
+
schema_extra=dict(
|
|
816
|
+
examples=["relative/path/to/annotation.json", "relative/path/to/archive.zip#annotation.json"],
|
|
817
|
+
),
|
|
818
|
+
)
|
|
819
|
+
annotation_data: JsonObject = Field(
|
|
820
|
+
sa_column=sa.Column(sa_pg.JSONB, nullable=False),
|
|
821
|
+
description="Annotation data stored as JSON",
|
|
822
|
+
schema_extra=dict(
|
|
823
|
+
examples=[
|
|
824
|
+
{
|
|
825
|
+
"objects": [
|
|
826
|
+
{
|
|
827
|
+
"object_id": "obj_001",
|
|
828
|
+
"object_category": "car",
|
|
829
|
+
"cuboid": {
|
|
830
|
+
"dimensions": {"length": 4.5, "width": 2.0, "height": 1.5},
|
|
831
|
+
"center": {"x": 10.0, "y": 5.0, "z": 0.0},
|
|
832
|
+
"rotation": {"roll": 0.0, "pitch": 0.0, "yaw": 1.57},
|
|
833
|
+
},
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
"object_id": "obj_002",
|
|
837
|
+
"object_category": "pedestrian",
|
|
838
|
+
"cuboid": {
|
|
839
|
+
"dimensions": {"length": 0.5, "width": 0.5, "height": 1.8},
|
|
840
|
+
"center": {"x": 15.0, "y": 3.0, "z": 0.0},
|
|
841
|
+
"rotation": {"roll": 0.0, "pitch": 0.0, "yaw": 0.0},
|
|
842
|
+
},
|
|
843
|
+
},
|
|
844
|
+
],
|
|
845
|
+
},
|
|
846
|
+
]
|
|
847
|
+
),
|
|
848
|
+
)
|
|
849
|
+
|
|
850
|
+
@pdt.field_validator("path", mode="after")
|
|
851
|
+
@classmethod
|
|
852
|
+
def validate_path(cls, v: str | None) -> str | None:
|
|
853
|
+
if v is not None:
|
|
854
|
+
validate_strict_fragmented_relpath(v)
|
|
855
|
+
return v
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+
class ModelTraining(RegistryBase):
|
|
859
|
+
uuid: py_uuid.UUID = Field(
|
|
860
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
861
|
+
default_factory=py_uuid.uuid4,
|
|
862
|
+
description="UUID of the model training",
|
|
863
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
864
|
+
)
|
|
865
|
+
experiment_uuid: py_uuid.UUID = Field(
|
|
866
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
867
|
+
description="UUID of the model experiment",
|
|
868
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
869
|
+
)
|
|
870
|
+
flags: int = Field(
|
|
871
|
+
sa_column=sa.Column(sa_pg.BIGINT),
|
|
872
|
+
default=0,
|
|
873
|
+
description="Integer bitmask storing status or metadata flags for this record",
|
|
874
|
+
)
|
|
875
|
+
props: JsonObject | None = Field(
|
|
876
|
+
sa_column=sa.Column(sa_pg.JSONB),
|
|
877
|
+
default=None,
|
|
878
|
+
description="Additional properties stored as JSON",
|
|
879
|
+
schema_extra=dict(examples=[{"example_prop_key": "example_prop_value"}]),
|
|
880
|
+
)
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
class ModelExperiment(RegistryBase):
|
|
884
|
+
uuid: py_uuid.UUID = Field(
|
|
885
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
886
|
+
default_factory=py_uuid.uuid4,
|
|
887
|
+
description="UUID of the model experiment",
|
|
888
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
889
|
+
)
|
|
890
|
+
parent_uuid: py_uuid.UUID | None = Field(
|
|
891
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True)),
|
|
892
|
+
default=None,
|
|
893
|
+
description="UUID of the parent model experiment",
|
|
894
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
895
|
+
)
|
|
896
|
+
architecture_uuid: py_uuid.UUID = Field(
|
|
897
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
898
|
+
description="UUID of the associated model architecture",
|
|
899
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
900
|
+
)
|
|
901
|
+
dataset_uuid: py_uuid.UUID = Field(
|
|
902
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
903
|
+
description="UUID of the dataset used for training/validation",
|
|
904
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
905
|
+
)
|
|
906
|
+
name: str = Field(
|
|
907
|
+
sa_column=sa.Column(sa_pg.VARCHAR(128), nullable=False),
|
|
908
|
+
description="Name of the model experiment",
|
|
909
|
+
schema_extra=dict(examples=["model_experiment_name"]),
|
|
910
|
+
)
|
|
911
|
+
description: str = Field(
|
|
912
|
+
sa_column=sa.Column(sa_pg.VARCHAR(1024), nullable=False),
|
|
913
|
+
description="Description of the model experiment",
|
|
914
|
+
schema_extra=dict(examples=["This is an example description of the model experiment."]),
|
|
915
|
+
)
|
|
916
|
+
contributor_sso_sid: int = Field(
|
|
917
|
+
sa_column=sa.Column(sa_pg.BIGINT, nullable=False),
|
|
918
|
+
description="SSO SID of the contributor",
|
|
919
|
+
schema_extra=dict(examples=[1234567890]),
|
|
920
|
+
)
|
|
921
|
+
path: str | None = Field(
|
|
922
|
+
sa_column=sa.Column(sa_pg.VARCHAR(512)),
|
|
923
|
+
default=None,
|
|
924
|
+
description="Relative path to the model experiment artifact directory",
|
|
925
|
+
schema_extra=dict(examples=["relative/path/to/model_experiment"]),
|
|
926
|
+
)
|
|
927
|
+
checkpoint_path: str | None = Field(
|
|
928
|
+
sa_column=sa.Column(sa_pg.VARCHAR(512)),
|
|
929
|
+
default=None,
|
|
930
|
+
description="Relative path to the model experiment checkpoint file within the artifact directory",
|
|
931
|
+
schema_extra=dict(examples=["relative/path/to/checkpoint.ckpt"]),
|
|
932
|
+
)
|
|
933
|
+
tags: list[str] | None = Field(
|
|
934
|
+
sa_column=sa.Column(sa_pg.ARRAY(sa_pg.VARCHAR(64))),
|
|
935
|
+
default=None,
|
|
936
|
+
description="List of tags associated with the model experiment",
|
|
937
|
+
schema_extra=dict(examples=[["example_tag", "example_tag:example_tag", "example_tag:example_tag:example_tag"]]),
|
|
938
|
+
)
|
|
939
|
+
props: JsonObject | None = Field(
|
|
940
|
+
sa_column=sa.Column(sa_pg.JSONB),
|
|
941
|
+
default=None,
|
|
942
|
+
description="Additional properties stored as JSON",
|
|
943
|
+
schema_extra=dict(examples=[{"example_prop_key": "example_prop_value"}]),
|
|
944
|
+
)
|
|
945
|
+
|
|
946
|
+
@pdt.field_validator("name", mode="after")
|
|
947
|
+
@classmethod
|
|
948
|
+
def validate_name(cls, v: str) -> str:
|
|
949
|
+
validate_snake_case(v)
|
|
950
|
+
return v
|
|
951
|
+
|
|
952
|
+
@pdt.field_validator("path", mode="after")
|
|
953
|
+
@classmethod
|
|
954
|
+
def validate_path(cls, v: str | None) -> str | None:
|
|
955
|
+
if v is not None:
|
|
956
|
+
validate_strict_relpath(v)
|
|
957
|
+
return v
|
|
958
|
+
|
|
959
|
+
@pdt.field_validator("checkpoint_path", mode="after")
|
|
960
|
+
@classmethod
|
|
961
|
+
def validate_checkpoint_path(cls, v: str | None) -> str | None:
|
|
962
|
+
if v is not None:
|
|
963
|
+
validate_strict_relpath(v)
|
|
964
|
+
return v
|
|
965
|
+
|
|
966
|
+
@pdt.field_validator("tags", mode="after")
|
|
967
|
+
@classmethod
|
|
968
|
+
def validate_tags(cls, v: list[str] | None) -> list[str] | None:
|
|
969
|
+
for tag in (v or []):
|
|
970
|
+
validate_colon_tag(tag)
|
|
971
|
+
return v
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
class ModelExperimentPromotion(RegistryBase):
|
|
975
|
+
uuid: py_uuid.UUID = Field(
|
|
976
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
977
|
+
default_factory=py_uuid.uuid4,
|
|
978
|
+
description="UUID of the model experiment promotion",
|
|
979
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
980
|
+
)
|
|
981
|
+
experiment_uuid: py_uuid.UUID = Field(
|
|
982
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
983
|
+
description="UUID of the model experiment",
|
|
984
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
985
|
+
)
|
|
986
|
+
reviewer_sso_sid: int = Field(
|
|
987
|
+
sa_column=sa.Column(sa_pg.BIGINT, nullable=False),
|
|
988
|
+
description="SSO SID of the reviewer",
|
|
989
|
+
schema_extra=dict(examples=[1234567890]),
|
|
990
|
+
)
|
|
991
|
+
flags: int = Field(
|
|
992
|
+
sa_column=sa.Column(sa_pg.BIGINT),
|
|
993
|
+
default=0,
|
|
994
|
+
description="Integer bitmask storing status or metadata flags for this record",
|
|
995
|
+
)
|
|
996
|
+
props: JsonObject | None = Field(
|
|
997
|
+
sa_column=sa.Column(sa_pg.JSONB),
|
|
998
|
+
default=None,
|
|
999
|
+
description="Additional properties stored as JSON",
|
|
1000
|
+
schema_extra=dict(examples=[{"example_prop_key": "example_prop_value"}]),
|
|
1001
|
+
)
|
|
1002
|
+
|
|
1003
|
+
|
|
1004
|
+
class ModelEvaluation(RegistryBase):
|
|
1005
|
+
uuid: py_uuid.UUID = Field(
|
|
1006
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
1007
|
+
default_factory=py_uuid.uuid4,
|
|
1008
|
+
description="UUID of the model evaluation",
|
|
1009
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
1010
|
+
)
|
|
1011
|
+
assessment_uuid: py_uuid.UUID = Field(
|
|
1012
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
1013
|
+
description="UUID of the model assessment",
|
|
1014
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
1015
|
+
)
|
|
1016
|
+
flags: int = Field(
|
|
1017
|
+
sa_column=sa.Column(sa_pg.BIGINT),
|
|
1018
|
+
default=0,
|
|
1019
|
+
description="Integer bitmask storing status or metadata flags for this record",
|
|
1020
|
+
)
|
|
1021
|
+
props: JsonObject | None = Field(
|
|
1022
|
+
sa_column=sa.Column(sa_pg.JSONB),
|
|
1023
|
+
default=None,
|
|
1024
|
+
description="Additional properties stored as JSON",
|
|
1025
|
+
schema_extra=dict(examples=[{"example_prop_key": "example_prop_value"}]),
|
|
1026
|
+
)
|
|
1027
|
+
|
|
1028
|
+
|
|
1029
|
+
class ModelAssessment(RegistryBase):
|
|
1030
|
+
uuid: py_uuid.UUID = Field(
|
|
1031
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
1032
|
+
default_factory=py_uuid.uuid4,
|
|
1033
|
+
description="UUID of the model assessment",
|
|
1034
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
1035
|
+
)
|
|
1036
|
+
benchmark_uuid: py_uuid.UUID = Field(
|
|
1037
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
1038
|
+
description="UUID of the associated model benchmark",
|
|
1039
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
1040
|
+
)
|
|
1041
|
+
experiment_uuid: py_uuid.UUID = Field(
|
|
1042
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
1043
|
+
description="UUID of the associated model experiment",
|
|
1044
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
1045
|
+
)
|
|
1046
|
+
dataset_uuid: py_uuid.UUID = Field(
|
|
1047
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
1048
|
+
description="UUID of the dataset used for model assessment",
|
|
1049
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
1050
|
+
)
|
|
1051
|
+
name: str = Field(
|
|
1052
|
+
sa_column=sa.Column(sa_pg.VARCHAR(128), nullable=False),
|
|
1053
|
+
description="Name of the model assessment",
|
|
1054
|
+
schema_extra=dict(examples=["model_assessment_name"]),
|
|
1055
|
+
)
|
|
1056
|
+
description: str = Field(
|
|
1057
|
+
sa_column=sa.Column(sa_pg.VARCHAR(1024), nullable=False),
|
|
1058
|
+
description="Description of the model assessment",
|
|
1059
|
+
schema_extra=dict(examples=["This is an example description of the model assessment."]),
|
|
1060
|
+
)
|
|
1061
|
+
contributor_sso_sid: int = Field(
|
|
1062
|
+
sa_column=sa.Column(sa_pg.BIGINT, nullable=False),
|
|
1063
|
+
description="SSO SID of the contributor",
|
|
1064
|
+
schema_extra=dict(examples=[1234567890]),
|
|
1065
|
+
)
|
|
1066
|
+
path: str | None = Field(
|
|
1067
|
+
sa_column=sa.Column(sa_pg.VARCHAR(512)),
|
|
1068
|
+
default=None,
|
|
1069
|
+
description="Relative path to the model assessment artifact directory",
|
|
1070
|
+
schema_extra=dict(examples=["relative/path/to/model_assessment"]),
|
|
1071
|
+
)
|
|
1072
|
+
assessment_data: JsonObject | None = Field(
|
|
1073
|
+
sa_column=sa.Column(sa_pg.JSONB),
|
|
1074
|
+
default=None,
|
|
1075
|
+
description="Assessment data stored as JSON",
|
|
1076
|
+
schema_extra=dict(examples=[{"accuracy": 0.95, "precision": 0.95, "recall": 0.95, "f1_score": 0.95}]),
|
|
1077
|
+
)
|
|
1078
|
+
tags: list[str] | None = Field(
|
|
1079
|
+
sa_column=sa.Column(sa_pg.ARRAY(sa_pg.VARCHAR(64))),
|
|
1080
|
+
default=None,
|
|
1081
|
+
description="List of tags associated with the model assessment",
|
|
1082
|
+
schema_extra=dict(examples=[["example_tag", "example_tag:example_tag", "example_tag:example_tag:example_tag"]]),
|
|
1083
|
+
)
|
|
1084
|
+
props: JsonObject | None = Field(
|
|
1085
|
+
sa_column=sa.Column(sa_pg.JSONB),
|
|
1086
|
+
default=None,
|
|
1087
|
+
description="Additional properties stored as JSON",
|
|
1088
|
+
schema_extra=dict(examples=[{"example_prop_key": "example_prop_value"}]),
|
|
1089
|
+
)
|
|
1090
|
+
|
|
1091
|
+
@pdt.field_validator("name", mode="after")
|
|
1092
|
+
@classmethod
|
|
1093
|
+
def validate_name(cls, v: str) -> str:
|
|
1094
|
+
validate_snake_case(v)
|
|
1095
|
+
return v
|
|
1096
|
+
|
|
1097
|
+
@pdt.field_validator("path", mode="after")
|
|
1098
|
+
@classmethod
|
|
1099
|
+
def validate_path(cls, v: str | None) -> str | None:
|
|
1100
|
+
if v is not None:
|
|
1101
|
+
validate_strict_relpath(v)
|
|
1102
|
+
return v
|
|
1103
|
+
|
|
1104
|
+
@pdt.field_validator("tags", mode="after")
|
|
1105
|
+
@classmethod
|
|
1106
|
+
def validate_tags(cls, v: list[str] | None) -> list[str] | None:
|
|
1107
|
+
for tag in (v or []):
|
|
1108
|
+
validate_colon_tag(tag)
|
|
1109
|
+
return v
|
|
1110
|
+
|
|
1111
|
+
|
|
1112
|
+
class ModelAssessmentPromotion(RegistryBase):
|
|
1113
|
+
uuid: py_uuid.UUID = Field(
|
|
1114
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
1115
|
+
default_factory=py_uuid.uuid4,
|
|
1116
|
+
description="UUID of the model assessment promotion",
|
|
1117
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
1118
|
+
)
|
|
1119
|
+
assessment_uuid: py_uuid.UUID = Field(
|
|
1120
|
+
sa_column=sa.Column(sa_pg.UUID(as_uuid=True), nullable=False),
|
|
1121
|
+
description="UUID of the model assessment",
|
|
1122
|
+
schema_extra=dict(examples=["abcd1234-5678-90ab-cdef-1234567890ab"]),
|
|
1123
|
+
)
|
|
1124
|
+
reviewer_sso_sid: int = Field(
|
|
1125
|
+
sa_column=sa.Column(sa_pg.BIGINT, nullable=False),
|
|
1126
|
+
description="SSO SID of the reviewer",
|
|
1127
|
+
schema_extra=dict(examples=[1234567890]),
|
|
1128
|
+
)
|
|
1129
|
+
flags: int = Field(
|
|
1130
|
+
sa_column=sa.Column(sa_pg.BIGINT),
|
|
1131
|
+
default=0,
|
|
1132
|
+
description="Integer bitmask storing status or metadata flags for this record",
|
|
1133
|
+
)
|
|
1134
|
+
props: JsonObject | None = Field(
|
|
1135
|
+
sa_column=sa.Column(sa_pg.JSONB),
|
|
1136
|
+
default=None,
|
|
1137
|
+
description="Additional properties stored as JSON",
|
|
1138
|
+
schema_extra=dict(examples=[{"example_prop_key": "example_prop_value"}]),
|
|
1139
|
+
)
|
|
1140
|
+
|
|
1141
|
+
|
|
1142
|
+
class SampleLayoutTable(SampleLayout, make_revision_model_mixin(), table=True):
|
|
1143
|
+
__tablename__ = "sample_layout"
|
|
1144
|
+
__table_args__ = (
|
|
1145
|
+
revision_model_mixin.make_index_created_at_updated_at_expired_at(
|
|
1146
|
+
"ix_sample_layout_created_at_updated_at_expired_at"),
|
|
1147
|
+
revision_model_mixin.make_unique_index_record_sqn_revision("ix_u_sample_layout_record_sqn_revision"),
|
|
1148
|
+
revision_model_mixin.make_active_unique_index_record_sqn("ix_ua_sample_layout_record_sqn"),
|
|
1149
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_sample_layout_uuid", "uuid"),
|
|
1150
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_sample_layout_name", "name"),
|
|
1151
|
+
)
|
|
1152
|
+
|
|
1153
|
+
|
|
1154
|
+
class ClassifierTaxonomyTable(ClassifierTaxonomy, make_revision_model_mixin(), table=True):
|
|
1155
|
+
__tablename__ = "classifier_taxonomy"
|
|
1156
|
+
__table_args__ = (
|
|
1157
|
+
revision_model_mixin.make_index_created_at_updated_at_expired_at(
|
|
1158
|
+
"ix_classifier_taxonomy_created_at_updated_at_expired_at"),
|
|
1159
|
+
revision_model_mixin.make_unique_index_record_sqn_revision("ix_u_classifier_taxonomy_record_sqn_revision"),
|
|
1160
|
+
revision_model_mixin.make_active_unique_index_record_sqn("ix_ua_classifier_taxonomy_record_sqn"),
|
|
1161
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_classifier_taxonomy_uuid", "uuid"),
|
|
1162
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_classifier_taxonomy_name_version", "name", "version"),
|
|
1163
|
+
)
|
|
1164
|
+
|
|
1165
|
+
|
|
1166
|
+
class AnnotationGuidelineTable(AnnotationGuideline, make_revision_model_mixin(), table=True):
|
|
1167
|
+
__tablename__ = "annotation_guideline"
|
|
1168
|
+
__table_args__ = (
|
|
1169
|
+
revision_model_mixin.make_index_created_at_updated_at_expired_at(
|
|
1170
|
+
"ix_annotation_guideline_created_at_updated_at_expired_at"),
|
|
1171
|
+
revision_model_mixin.make_unique_index_record_sqn_revision("ix_u_annotation_guideline_record_sqn_revision"),
|
|
1172
|
+
revision_model_mixin.make_active_unique_index_record_sqn("ix_ua_annotation_guideline_record_sqn"),
|
|
1173
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_annotation_guideline_uuid", "uuid"),
|
|
1174
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_annotation_guideline_name_version", "name", "version"),
|
|
1175
|
+
)
|
|
1176
|
+
|
|
1177
|
+
|
|
1178
|
+
class ModelArchitectureTable(ModelArchitecture, make_revision_model_mixin(), table=True):
|
|
1179
|
+
__tablename__ = "model_architecture"
|
|
1180
|
+
__table_args__ = (
|
|
1181
|
+
revision_model_mixin.make_index_created_at_updated_at_expired_at(
|
|
1182
|
+
"ix_model_architecture_created_at_updated_at_expired_at"),
|
|
1183
|
+
revision_model_mixin.make_unique_index_record_sqn_revision("ix_u_model_architecture_record_sqn_revision"),
|
|
1184
|
+
revision_model_mixin.make_active_unique_index_record_sqn("ix_ua_model_architecture_record_sqn"),
|
|
1185
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_model_architecture_uuid", "uuid"),
|
|
1186
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_model_architecture_name", "name"),
|
|
1187
|
+
)
|
|
1188
|
+
|
|
1189
|
+
|
|
1190
|
+
class ModelBenchmarkTable(ModelBenchmark, make_revision_model_mixin(), table=True):
|
|
1191
|
+
__tablename__ = "model_benchmark"
|
|
1192
|
+
__table_args__ = (
|
|
1193
|
+
revision_model_mixin.make_index_created_at_updated_at_expired_at(
|
|
1194
|
+
"ix_model_benchmark_created_at_updated_at_expired_at"),
|
|
1195
|
+
revision_model_mixin.make_unique_index_record_sqn_revision("ix_u_model_benchmark_record_sqn_revision"),
|
|
1196
|
+
revision_model_mixin.make_active_unique_index_record_sqn("ix_ua_model_benchmark_record_sqn"),
|
|
1197
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_model_benchmark_uuid", "uuid"),
|
|
1198
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_model_benchmark_name_version", "name", "version"),
|
|
1199
|
+
)
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
class DatasetRegistrationTable(DatasetRegistration, make_revision_model_mixin(), table=True):
|
|
1203
|
+
__tablename__ = "dataset_registration"
|
|
1204
|
+
__table_args__ = (
|
|
1205
|
+
revision_model_mixin.make_index_created_at_updated_at_expired_at(
|
|
1206
|
+
"ix_dataset_registration_created_at_updated_at_expired_at"),
|
|
1207
|
+
revision_model_mixin.make_unique_index_record_sqn_revision("ix_u_dataset_registration_record_sqn_revision"),
|
|
1208
|
+
revision_model_mixin.make_active_unique_index_record_sqn("ix_ua_dataset_registration_record_sqn"),
|
|
1209
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_dataset_registration_uuid", "uuid"),
|
|
1210
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_dataset_registration_dataset_uuid", "dataset_uuid"),
|
|
1211
|
+
)
|
|
1212
|
+
|
|
1213
|
+
|
|
1214
|
+
class DatasetPromotionTable(DatasetPromotion, make_revision_model_mixin(), table=True):
|
|
1215
|
+
__tablename__ = "dataset_promotion"
|
|
1216
|
+
__table_args__ = (
|
|
1217
|
+
revision_model_mixin.make_index_created_at_updated_at_expired_at(
|
|
1218
|
+
"ix_dataset_promotion_created_at_updated_at_expired_at"),
|
|
1219
|
+
revision_model_mixin.make_unique_index_record_sqn_revision("ix_u_dataset_promotion_record_sqn_revision"),
|
|
1220
|
+
revision_model_mixin.make_active_unique_index_record_sqn("ix_ua_dataset_promotion_record_sqn"),
|
|
1221
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_dataset_promotion_uuid", "uuid"),
|
|
1222
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_dataset_promotion_dataset_uuid", "dataset_uuid"),
|
|
1223
|
+
)
|
|
1224
|
+
|
|
1225
|
+
|
|
1226
|
+
class RegisteredDatasetTable(RegisteredDataset, make_revision_model_mixin(), table=True):
|
|
1227
|
+
__tablename__ = "registered_dataset"
|
|
1228
|
+
__table_args__ = (
|
|
1229
|
+
revision_model_mixin.make_index_created_at_updated_at_expired_at(
|
|
1230
|
+
"ix_registered_dataset_created_at_updated_at_expired_at"),
|
|
1231
|
+
revision_model_mixin.make_unique_index_record_sqn_revision("ix_u_registered_dataset_record_sqn_revision"),
|
|
1232
|
+
revision_model_mixin.make_active_unique_index_record_sqn("ix_ua_registered_dataset_record_sqn"),
|
|
1233
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_registered_dataset_uuid", "uuid"),
|
|
1234
|
+
)
|
|
1235
|
+
|
|
1236
|
+
|
|
1237
|
+
class RegisteredSampleTable(RegisteredSample, make_revision_model_mixin(), table=True):
|
|
1238
|
+
__tablename__ = "registered_sample"
|
|
1239
|
+
__table_args__ = (
|
|
1240
|
+
revision_model_mixin.make_index_created_at_updated_at_expired_at(
|
|
1241
|
+
"ix_registered_sample_created_at_updated_at_expired_at"),
|
|
1242
|
+
revision_model_mixin.make_unique_index_record_sqn_revision("ix_u_registered_sample_record_sqn_revision"),
|
|
1243
|
+
revision_model_mixin.make_active_unique_index_record_sqn("ix_ua_registered_sample_record_sqn"),
|
|
1244
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_registered_sample_uuid", "uuid"),
|
|
1245
|
+
)
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
class RegisteredDatasetSampleTable(RegisteredDatasetSample, table=True):
|
|
1249
|
+
__tablename__ = "registered_dataset_sample"
|
|
1250
|
+
__table_args__ = (
|
|
1251
|
+
sa.PrimaryKeyConstraint("dataset_uuid", "sample_uuid", name="registered_dataset_sample_pkey"),
|
|
1252
|
+
)
|
|
1253
|
+
|
|
1254
|
+
|
|
1255
|
+
class RegisteredDatasetLayoutTable(RegisteredDatasetLayout, table=True):
|
|
1256
|
+
__tablename__ = "registered_dataset_layout"
|
|
1257
|
+
__table_args__ = (
|
|
1258
|
+
sa.PrimaryKeyConstraint("dataset_uuid", "layout_uuid", name="registered_dataset_layout_pkey"),
|
|
1259
|
+
)
|
|
1260
|
+
|
|
1261
|
+
|
|
1262
|
+
class SampleClassifierTable(SampleClassifier, make_revision_model_mixin(), table=True):
|
|
1263
|
+
__tablename__ = "sample_classifier"
|
|
1264
|
+
__table_args__ = (
|
|
1265
|
+
revision_model_mixin.make_index_created_at_updated_at_expired_at(
|
|
1266
|
+
"ix_sample_classifier_created_at_updated_at_expired_at"),
|
|
1267
|
+
revision_model_mixin.make_unique_index_record_sqn_revision("ix_u_sample_classifier_record_sqn_revision"),
|
|
1268
|
+
revision_model_mixin.make_active_unique_index_record_sqn("ix_ua_sample_classifier_record_sqn"),
|
|
1269
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_sample_classifier_uuid", "uuid"),
|
|
1270
|
+
revision_model_mixin.make_active_index_for("ix_a_sample_classifier_sample_uuid", "sample_uuid"),
|
|
1271
|
+
)
|
|
1272
|
+
|
|
1273
|
+
|
|
1274
|
+
class SampleAnnotationTable(SampleAnnotation, make_revision_model_mixin(), table=True):
|
|
1275
|
+
__tablename__ = "sample_annotation"
|
|
1276
|
+
__table_args__ = (
|
|
1277
|
+
revision_model_mixin.make_index_created_at_updated_at_expired_at(
|
|
1278
|
+
"ix_sample_annotation_created_at_updated_at_expired_at"),
|
|
1279
|
+
revision_model_mixin.make_unique_index_record_sqn_revision("ix_u_sample_annotation_record_sqn_revision"),
|
|
1280
|
+
revision_model_mixin.make_active_unique_index_record_sqn("ix_ua_sample_annotation_record_sqn"),
|
|
1281
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_sample_annotation_uuid", "uuid"),
|
|
1282
|
+
revision_model_mixin.make_active_index_for("ix_a_sample_annotation_sample_uuid", "sample_uuid"),
|
|
1283
|
+
)
|
|
1284
|
+
|
|
1285
|
+
|
|
1286
|
+
class ModelTrainingTable(ModelTraining, make_revision_model_mixin(), table=True):
|
|
1287
|
+
__tablename__ = "model_training"
|
|
1288
|
+
__table_args__ = (
|
|
1289
|
+
revision_model_mixin.make_index_created_at_updated_at_expired_at(
|
|
1290
|
+
"ix_model_training_created_at_updated_at_expired_at"),
|
|
1291
|
+
revision_model_mixin.make_unique_index_record_sqn_revision("ix_u_model_training_record_sqn_revision"),
|
|
1292
|
+
revision_model_mixin.make_active_unique_index_record_sqn("ix_ua_model_training_record_sqn"),
|
|
1293
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_model_training_uuid", "uuid"),
|
|
1294
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_model_training_experiment_uuid", "experiment_uuid"),
|
|
1295
|
+
)
|
|
1296
|
+
|
|
1297
|
+
|
|
1298
|
+
class ModelExperimentTable(ModelExperiment, make_revision_model_mixin(), table=True):
|
|
1299
|
+
__tablename__ = "model_experiment"
|
|
1300
|
+
__table_args__ = (
|
|
1301
|
+
revision_model_mixin.make_index_created_at_updated_at_expired_at(
|
|
1302
|
+
"ix_model_experiment_created_at_updated_at_expired_at"),
|
|
1303
|
+
revision_model_mixin.make_unique_index_record_sqn_revision("ix_u_model_experiment_record_sqn_revision"),
|
|
1304
|
+
revision_model_mixin.make_active_unique_index_record_sqn("ix_ua_model_experiment_record_sqn"),
|
|
1305
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_model_experiment_uuid", "uuid"),
|
|
1306
|
+
)
|
|
1307
|
+
|
|
1308
|
+
|
|
1309
|
+
class ModelExperimentPromotionTable(ModelExperimentPromotion, make_revision_model_mixin(), table=True):
|
|
1310
|
+
__tablename__ = "model_experiment_promotion"
|
|
1311
|
+
__table_args__ = (
|
|
1312
|
+
revision_model_mixin.make_index_created_at_updated_at_expired_at(
|
|
1313
|
+
"ix_model_experiment_promotion_created_at_updated_at_expired_at"),
|
|
1314
|
+
revision_model_mixin.make_unique_index_record_sqn_revision(
|
|
1315
|
+
"ix_u_model_experiment_promotion_record_sqn_revision"),
|
|
1316
|
+
revision_model_mixin.make_active_unique_index_record_sqn("ix_ua_model_experiment_promotion_record_sqn"),
|
|
1317
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_model_experiment_promotion_uuid", "uuid"),
|
|
1318
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_model_experiment_promotion_experiment_uuid",
|
|
1319
|
+
"experiment_uuid"),
|
|
1320
|
+
)
|
|
1321
|
+
|
|
1322
|
+
|
|
1323
|
+
class ModelEvaluationTable(ModelEvaluation, make_revision_model_mixin(), table=True):
|
|
1324
|
+
__tablename__ = "model_evaluation"
|
|
1325
|
+
__table_args__ = (
|
|
1326
|
+
revision_model_mixin.make_index_created_at_updated_at_expired_at(
|
|
1327
|
+
"ix_model_evaluation_created_at_updated_at_expired_at"),
|
|
1328
|
+
revision_model_mixin.make_unique_index_record_sqn_revision("ix_u_model_evaluation_record_sqn_revision"),
|
|
1329
|
+
revision_model_mixin.make_active_unique_index_record_sqn("ix_ua_model_evaluation_record_sqn"),
|
|
1330
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_model_evaluation_uuid", "uuid"),
|
|
1331
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_model_evaluation_assessment_uuid", "assessment_uuid"),
|
|
1332
|
+
)
|
|
1333
|
+
|
|
1334
|
+
|
|
1335
|
+
class ModelAssessmentTable(ModelAssessment, make_revision_model_mixin(), table=True):
|
|
1336
|
+
__tablename__ = "model_assessment"
|
|
1337
|
+
__table_args__ = (
|
|
1338
|
+
revision_model_mixin.make_index_created_at_updated_at_expired_at(
|
|
1339
|
+
"ix_model_assessment_created_at_updated_at_expired_at"),
|
|
1340
|
+
revision_model_mixin.make_unique_index_record_sqn_revision("ix_u_model_assessment_record_sqn_revision"),
|
|
1341
|
+
revision_model_mixin.make_active_unique_index_record_sqn("ix_ua_model_assessment_record_sqn"),
|
|
1342
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_model_assessment_uuid", "uuid"),
|
|
1343
|
+
)
|
|
1344
|
+
|
|
1345
|
+
|
|
1346
|
+
class ModelAssessmentPromotionTable(ModelAssessmentPromotion, make_revision_model_mixin(), table=True):
|
|
1347
|
+
__tablename__ = "model_assessment_promotion"
|
|
1348
|
+
__table_args__ = (
|
|
1349
|
+
revision_model_mixin.make_index_created_at_updated_at_expired_at(
|
|
1350
|
+
"ix_model_assessment_promotion_created_at_updated_at_expired_at"),
|
|
1351
|
+
revision_model_mixin.make_unique_index_record_sqn_revision(
|
|
1352
|
+
"ix_u_model_assessment_promotion_record_sqn_revision"),
|
|
1353
|
+
revision_model_mixin.make_active_unique_index_record_sqn("ix_ua_model_assessment_promotion_record_sqn"),
|
|
1354
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_model_assessment_promotion_uuid", "uuid"),
|
|
1355
|
+
revision_model_mixin.make_active_unique_index_for("ix_ua_model_assessment_promotion_assessment_uuid",
|
|
1356
|
+
"assessment_uuid"),
|
|
1357
|
+
)
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
if typing.TYPE_CHECKING:
|
|
1361
|
+
RegistryBase = SQLModel
|
|
1362
|
+
|
|
1363
|
+
|
|
1364
|
+
class SampleLayoutTable(RegistryBase, RevisionModelMixinProtocol):
|
|
1365
|
+
uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1366
|
+
name: sa_orm.Mapped[str] = ...
|
|
1367
|
+
description: sa_orm.Mapped[str] = ...
|
|
1368
|
+
child_layout_uuids: sa_orm.Mapped[list[py_uuid.UUID] | None] = ...
|
|
1369
|
+
layout_spec: sa_orm.Mapped[JsonObject] = ...
|
|
1370
|
+
props: sa_orm.Mapped[JsonObject | None] = ...
|
|
1371
|
+
|
|
1372
|
+
|
|
1373
|
+
class ClassifierTaxonomyTable(RegistryBase, RevisionModelMixinProtocol):
|
|
1374
|
+
uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1375
|
+
name: sa_orm.Mapped[str] = ...
|
|
1376
|
+
version: sa_orm.Mapped[str] = ...
|
|
1377
|
+
description: sa_orm.Mapped[str] = ...
|
|
1378
|
+
taxonomy_hierarchy: sa_orm.Mapped[JsonObject] = ...
|
|
1379
|
+
props: sa_orm.Mapped[JsonObject | None] = ...
|
|
1380
|
+
|
|
1381
|
+
|
|
1382
|
+
class AnnotationGuidelineTable(RegistryBase, RevisionModelMixinProtocol):
|
|
1383
|
+
uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1384
|
+
name: sa_orm.Mapped[str] = ...
|
|
1385
|
+
version: sa_orm.Mapped[str] = ...
|
|
1386
|
+
description: sa_orm.Mapped[str] = ...
|
|
1387
|
+
supported_layout_uuids: sa_orm.Mapped[list[py_uuid.UUID]] = ...
|
|
1388
|
+
annotation_schema: sa_orm.Mapped[JsonObject] = ...
|
|
1389
|
+
props: sa_orm.Mapped[JsonObject | None] = ...
|
|
1390
|
+
|
|
1391
|
+
|
|
1392
|
+
class ModelArchitectureTable(RegistryBase, RevisionModelMixinProtocol):
|
|
1393
|
+
uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1394
|
+
name: sa_orm.Mapped[str] = ...
|
|
1395
|
+
version: sa_orm.Mapped[str] = ...
|
|
1396
|
+
description: sa_orm.Mapped[str] = ...
|
|
1397
|
+
supported_guideline_uuids: sa_orm.Mapped[list[py_uuid.UUID]] = ...
|
|
1398
|
+
props: sa_orm.Mapped[JsonObject | None] = ...
|
|
1399
|
+
|
|
1400
|
+
|
|
1401
|
+
class ModelBenchmarkTable(RegistryBase, RevisionModelMixinProtocol):
|
|
1402
|
+
uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1403
|
+
name: sa_orm.Mapped[str] = ...
|
|
1404
|
+
version: sa_orm.Mapped[str] = ...
|
|
1405
|
+
description: sa_orm.Mapped[str] = ...
|
|
1406
|
+
supported_architecture_uuids: sa_orm.Mapped[list[py_uuid.UUID]] = ...
|
|
1407
|
+
benchmark_schema: sa_orm.Mapped[JsonObject] = ...
|
|
1408
|
+
props: sa_orm.Mapped[JsonObject | None] = ...
|
|
1409
|
+
|
|
1410
|
+
|
|
1411
|
+
class DatasetRegistrationTable(RegistryBase, RevisionModelMixinProtocol):
|
|
1412
|
+
uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1413
|
+
dataset_uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1414
|
+
resource_path: sa_orm.Mapped[str] = ...
|
|
1415
|
+
flags: sa_orm.Mapped[int] = ...
|
|
1416
|
+
props: sa_orm.Mapped[JsonObject | None] = ...
|
|
1417
|
+
|
|
1418
|
+
|
|
1419
|
+
class DatasetPromotionTable(RegistryBase, RevisionModelMixinProtocol):
|
|
1420
|
+
uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1421
|
+
dataset_uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1422
|
+
reviewer_sso_sid: sa_orm.Mapped[int] = ...
|
|
1423
|
+
flags: sa_orm.Mapped[int] = ...
|
|
1424
|
+
props: sa_orm.Mapped[JsonObject | None] = ...
|
|
1425
|
+
|
|
1426
|
+
|
|
1427
|
+
class RegisteredDatasetTable(RegistryBase, RevisionModelMixinProtocol):
|
|
1428
|
+
uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1429
|
+
name: sa_orm.Mapped[str] = ...
|
|
1430
|
+
description: sa_orm.Mapped[str] = ...
|
|
1431
|
+
contributor_sso_sid: sa_orm.Mapped[int] = ...
|
|
1432
|
+
tags: sa_orm.Mapped[list[str] | None] = ...
|
|
1433
|
+
props: sa_orm.Mapped[JsonObject | None] = ...
|
|
1434
|
+
|
|
1435
|
+
|
|
1436
|
+
class RegisteredSampleTable(RegistryBase, RevisionModelMixinProtocol):
|
|
1437
|
+
uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1438
|
+
path: sa_orm.Mapped[str] = ...
|
|
1439
|
+
layout_uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1440
|
+
bag_name: sa_orm.Mapped[str] = ...
|
|
1441
|
+
vehicle_name: sa_orm.Mapped[str] = ...
|
|
1442
|
+
begin_frame_dt: sa_orm.Mapped[datetime.datetime] = ...
|
|
1443
|
+
end_frame_dt: sa_orm.Mapped[datetime.datetime] = ...
|
|
1444
|
+
child_sample_uuids: sa_orm.Mapped[list[py_uuid.UUID] | None] = ...
|
|
1445
|
+
tags: sa_orm.Mapped[list[str] | None] = ...
|
|
1446
|
+
props: sa_orm.Mapped[JsonObject | None] = ...
|
|
1447
|
+
|
|
1448
|
+
|
|
1449
|
+
class RegisteredDatasetSampleTable(RegistryBase):
|
|
1450
|
+
dataset_uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1451
|
+
sample_uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1452
|
+
annotation_uuid: sa_orm.Mapped[py_uuid.UUID | None] = ...
|
|
1453
|
+
|
|
1454
|
+
|
|
1455
|
+
class RegisteredDatasetLayoutTable(RegistryBase):
|
|
1456
|
+
dataset_uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1457
|
+
layout_uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1458
|
+
samples_count: sa_orm.Mapped[int] = ...
|
|
1459
|
+
|
|
1460
|
+
|
|
1461
|
+
class SampleClassifierTable(RegistryBase, RevisionModelMixinProtocol):
|
|
1462
|
+
uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1463
|
+
sample_uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1464
|
+
taxonomy_uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1465
|
+
classifier_data: sa_orm.Mapped[JsonObject] = ...
|
|
1466
|
+
|
|
1467
|
+
|
|
1468
|
+
class SampleAnnotationTable(RegistryBase, RevisionModelMixinProtocol):
|
|
1469
|
+
uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1470
|
+
sample_uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1471
|
+
guideline_uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1472
|
+
path: sa_orm.Mapped[str | None] = ...
|
|
1473
|
+
annotation_data: sa_orm.Mapped[JsonObject] = ...
|
|
1474
|
+
|
|
1475
|
+
|
|
1476
|
+
class ModelTrainingTable(RegistryBase, RevisionModelMixinProtocol):
|
|
1477
|
+
uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1478
|
+
experiment_uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1479
|
+
flags: sa_orm.Mapped[int] = ...
|
|
1480
|
+
props: sa_orm.Mapped[JsonObject | None] = ...
|
|
1481
|
+
|
|
1482
|
+
|
|
1483
|
+
class ModelExperimentTable(RegistryBase, RevisionModelMixinProtocol):
|
|
1484
|
+
uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1485
|
+
parent_uuid: sa_orm.Mapped[py_uuid.UUID | None] = ...
|
|
1486
|
+
architecture_uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1487
|
+
dataset_uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1488
|
+
name: sa_orm.Mapped[str] = ...
|
|
1489
|
+
description: sa_orm.Mapped[str] = ...
|
|
1490
|
+
contributor_sso_sid: sa_orm.Mapped[int] = ...
|
|
1491
|
+
path: sa_orm.Mapped[str | None] = ...
|
|
1492
|
+
checkpoint_path: sa_orm.Mapped[str | None] = ...
|
|
1493
|
+
tags: sa_orm.Mapped[list[str] | None] = ...
|
|
1494
|
+
props: sa_orm.Mapped[JsonObject | None] = ...
|
|
1495
|
+
|
|
1496
|
+
|
|
1497
|
+
class ModelExperimentPromotionTable(RegistryBase, RevisionModelMixinProtocol):
|
|
1498
|
+
uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1499
|
+
experiment_uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1500
|
+
reviewer_sso_sid: sa_orm.Mapped[int] = ...
|
|
1501
|
+
flags: sa_orm.Mapped[int] = ...
|
|
1502
|
+
props: sa_orm.Mapped[JsonObject | None] = ...
|
|
1503
|
+
|
|
1504
|
+
|
|
1505
|
+
class ModelEvaluationTable(RegistryBase, RevisionModelMixinProtocol):
|
|
1506
|
+
uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1507
|
+
assessment_uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1508
|
+
flags: sa_orm.Mapped[int] = ...
|
|
1509
|
+
props: sa_orm.Mapped[JsonObject | None] = ...
|
|
1510
|
+
|
|
1511
|
+
|
|
1512
|
+
class ModelAssessmentTable(RegistryBase, RevisionModelMixinProtocol):
|
|
1513
|
+
uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1514
|
+
benchmark_uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1515
|
+
experiment_uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1516
|
+
dataset_uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1517
|
+
name: sa_orm.Mapped[str] = ...
|
|
1518
|
+
description: sa_orm.Mapped[str] = ...
|
|
1519
|
+
contributor_sso_sid: sa_orm.Mapped[int] = ...
|
|
1520
|
+
path: sa_orm.Mapped[str | None] = ...
|
|
1521
|
+
assessment_data: sa_orm.Mapped[JsonObject | None] = ...
|
|
1522
|
+
tags: sa_orm.Mapped[list[str] | None] = ...
|
|
1523
|
+
props: sa_orm.Mapped[JsonObject | None] = ...
|
|
1524
|
+
|
|
1525
|
+
|
|
1526
|
+
class ModelAssessmentPromotionTable(RegistryBase, RevisionModelMixinProtocol):
|
|
1527
|
+
uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1528
|
+
assessment_uuid: sa_orm.Mapped[py_uuid.UUID] = ...
|
|
1529
|
+
reviewer_sso_sid: sa_orm.Mapped[int] = ...
|
|
1530
|
+
flags: sa_orm.Mapped[int] = ...
|
|
1531
|
+
props: sa_orm.Mapped[JsonObject | None] = ...
|