deriva-ml 1.17.9__py3-none-any.whl → 1.17.11__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.
- deriva_ml/__init__.py +43 -1
- deriva_ml/asset/__init__.py +17 -0
- deriva_ml/asset/asset.py +357 -0
- deriva_ml/asset/aux_classes.py +100 -0
- deriva_ml/bump_version.py +254 -11
- deriva_ml/catalog/__init__.py +21 -0
- deriva_ml/catalog/clone.py +1199 -0
- deriva_ml/catalog/localize.py +426 -0
- deriva_ml/core/__init__.py +29 -0
- deriva_ml/core/base.py +817 -1067
- deriva_ml/core/config.py +169 -21
- deriva_ml/core/constants.py +120 -19
- deriva_ml/core/definitions.py +123 -13
- deriva_ml/core/enums.py +47 -73
- deriva_ml/core/ermrest.py +226 -193
- deriva_ml/core/exceptions.py +297 -14
- deriva_ml/core/filespec.py +99 -28
- deriva_ml/core/logging_config.py +225 -0
- deriva_ml/core/mixins/__init__.py +42 -0
- deriva_ml/core/mixins/annotation.py +915 -0
- deriva_ml/core/mixins/asset.py +384 -0
- deriva_ml/core/mixins/dataset.py +237 -0
- deriva_ml/core/mixins/execution.py +408 -0
- deriva_ml/core/mixins/feature.py +365 -0
- deriva_ml/core/mixins/file.py +263 -0
- deriva_ml/core/mixins/path_builder.py +145 -0
- deriva_ml/core/mixins/rid_resolution.py +204 -0
- deriva_ml/core/mixins/vocabulary.py +400 -0
- deriva_ml/core/mixins/workflow.py +322 -0
- deriva_ml/core/validation.py +389 -0
- deriva_ml/dataset/__init__.py +2 -1
- deriva_ml/dataset/aux_classes.py +20 -4
- deriva_ml/dataset/catalog_graph.py +575 -0
- deriva_ml/dataset/dataset.py +1242 -1008
- deriva_ml/dataset/dataset_bag.py +1311 -182
- deriva_ml/dataset/history.py +27 -14
- deriva_ml/dataset/upload.py +225 -38
- deriva_ml/demo_catalog.py +186 -105
- deriva_ml/execution/__init__.py +46 -2
- deriva_ml/execution/base_config.py +639 -0
- deriva_ml/execution/execution.py +545 -244
- deriva_ml/execution/execution_configuration.py +26 -11
- deriva_ml/execution/execution_record.py +592 -0
- deriva_ml/execution/find_caller.py +298 -0
- deriva_ml/execution/model_protocol.py +175 -0
- deriva_ml/execution/multirun_config.py +153 -0
- deriva_ml/execution/runner.py +595 -0
- deriva_ml/execution/workflow.py +224 -35
- deriva_ml/experiment/__init__.py +8 -0
- deriva_ml/experiment/experiment.py +411 -0
- deriva_ml/feature.py +6 -1
- deriva_ml/install_kernel.py +143 -6
- deriva_ml/interfaces.py +862 -0
- deriva_ml/model/__init__.py +99 -0
- deriva_ml/model/annotations.py +1278 -0
- deriva_ml/model/catalog.py +286 -60
- deriva_ml/model/database.py +144 -649
- deriva_ml/model/deriva_ml_database.py +308 -0
- deriva_ml/model/handles.py +14 -0
- deriva_ml/run_model.py +319 -0
- deriva_ml/run_notebook.py +507 -38
- deriva_ml/schema/__init__.py +18 -2
- deriva_ml/schema/annotations.py +62 -33
- deriva_ml/schema/create_schema.py +169 -69
- deriva_ml/schema/validation.py +601 -0
- {deriva_ml-1.17.9.dist-info → deriva_ml-1.17.11.dist-info}/METADATA +4 -5
- deriva_ml-1.17.11.dist-info/RECORD +77 -0
- {deriva_ml-1.17.9.dist-info → deriva_ml-1.17.11.dist-info}/WHEEL +1 -1
- {deriva_ml-1.17.9.dist-info → deriva_ml-1.17.11.dist-info}/entry_points.txt +2 -0
- deriva_ml/protocols/dataset.py +0 -19
- deriva_ml/test.py +0 -94
- deriva_ml-1.17.9.dist-info/RECORD +0 -45
- {deriva_ml-1.17.9.dist-info → deriva_ml-1.17.11.dist-info}/licenses/LICENSE +0 -0
- {deriva_ml-1.17.9.dist-info → deriva_ml-1.17.11.dist-info}/top_level.txt +0 -0
deriva_ml/model/__init__.py
CHANGED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"""Model module for DerivaML.
|
|
2
|
+
|
|
3
|
+
This module provides catalog and database model classes, as well as
|
|
4
|
+
handle wrappers for ERMrest model objects and annotation builders.
|
|
5
|
+
|
|
6
|
+
Lazy imports are used for DatabaseModel and DerivaMLDatabase to avoid
|
|
7
|
+
circular imports with the dataset module.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from deriva_ml.model.catalog import DerivaModel
|
|
11
|
+
from deriva_ml.model.handles import ColumnHandle, TableHandle
|
|
12
|
+
|
|
13
|
+
# Annotation builders - import the most common ones for convenience
|
|
14
|
+
from deriva_ml.model.annotations import (
|
|
15
|
+
# Builders
|
|
16
|
+
Display,
|
|
17
|
+
VisibleColumns,
|
|
18
|
+
VisibleForeignKeys,
|
|
19
|
+
TableDisplay,
|
|
20
|
+
TableDisplayOptions,
|
|
21
|
+
ColumnDisplay,
|
|
22
|
+
ColumnDisplayOptions,
|
|
23
|
+
PreFormat,
|
|
24
|
+
PseudoColumn,
|
|
25
|
+
PseudoColumnDisplay,
|
|
26
|
+
Facet,
|
|
27
|
+
FacetList,
|
|
28
|
+
FacetRange,
|
|
29
|
+
SortKey,
|
|
30
|
+
NameStyle,
|
|
31
|
+
# FK helpers
|
|
32
|
+
InboundFK,
|
|
33
|
+
OutboundFK,
|
|
34
|
+
fk_constraint,
|
|
35
|
+
# Enums
|
|
36
|
+
TemplateEngine,
|
|
37
|
+
Aggregate,
|
|
38
|
+
ArrayUxMode,
|
|
39
|
+
FacetUxMode,
|
|
40
|
+
# Context constants
|
|
41
|
+
CONTEXT_DEFAULT,
|
|
42
|
+
CONTEXT_COMPACT,
|
|
43
|
+
CONTEXT_DETAILED,
|
|
44
|
+
CONTEXT_ENTRY,
|
|
45
|
+
CONTEXT_FILTER,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
__all__ = [
|
|
49
|
+
# Core classes
|
|
50
|
+
"DerivaModel",
|
|
51
|
+
"DatabaseModel",
|
|
52
|
+
"DerivaMLDatabase",
|
|
53
|
+
"TableHandle",
|
|
54
|
+
"ColumnHandle",
|
|
55
|
+
# Annotation builders
|
|
56
|
+
"Display",
|
|
57
|
+
"VisibleColumns",
|
|
58
|
+
"VisibleForeignKeys",
|
|
59
|
+
"TableDisplay",
|
|
60
|
+
"TableDisplayOptions",
|
|
61
|
+
"ColumnDisplay",
|
|
62
|
+
"ColumnDisplayOptions",
|
|
63
|
+
"PreFormat",
|
|
64
|
+
"PseudoColumn",
|
|
65
|
+
"PseudoColumnDisplay",
|
|
66
|
+
"Facet",
|
|
67
|
+
"FacetList",
|
|
68
|
+
"FacetRange",
|
|
69
|
+
"SortKey",
|
|
70
|
+
"NameStyle",
|
|
71
|
+
# FK helpers
|
|
72
|
+
"InboundFK",
|
|
73
|
+
"OutboundFK",
|
|
74
|
+
"fk_constraint",
|
|
75
|
+
# Enums
|
|
76
|
+
"TemplateEngine",
|
|
77
|
+
"Aggregate",
|
|
78
|
+
"ArrayUxMode",
|
|
79
|
+
"FacetUxMode",
|
|
80
|
+
# Context constants
|
|
81
|
+
"CONTEXT_DEFAULT",
|
|
82
|
+
"CONTEXT_COMPACT",
|
|
83
|
+
"CONTEXT_DETAILED",
|
|
84
|
+
"CONTEXT_ENTRY",
|
|
85
|
+
"CONTEXT_FILTER",
|
|
86
|
+
]
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def __getattr__(name: str):
|
|
90
|
+
"""Lazy import for DatabaseModel and DerivaMLDatabase."""
|
|
91
|
+
if name == "DatabaseModel":
|
|
92
|
+
from deriva_ml.model.database import DatabaseModel
|
|
93
|
+
|
|
94
|
+
return DatabaseModel
|
|
95
|
+
if name == "DerivaMLDatabase":
|
|
96
|
+
from deriva_ml.model.deriva_ml_database import DerivaMLDatabase
|
|
97
|
+
|
|
98
|
+
return DerivaMLDatabase
|
|
99
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|