deriva-ml 1.17.10__py3-none-any.whl → 1.17.12__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.
Files changed (74) hide show
  1. deriva_ml/__init__.py +69 -1
  2. deriva_ml/asset/__init__.py +17 -0
  3. deriva_ml/asset/asset.py +357 -0
  4. deriva_ml/asset/aux_classes.py +100 -0
  5. deriva_ml/bump_version.py +254 -11
  6. deriva_ml/catalog/__init__.py +31 -0
  7. deriva_ml/catalog/clone.py +1939 -0
  8. deriva_ml/catalog/localize.py +426 -0
  9. deriva_ml/core/__init__.py +29 -0
  10. deriva_ml/core/base.py +845 -1067
  11. deriva_ml/core/config.py +169 -21
  12. deriva_ml/core/constants.py +120 -19
  13. deriva_ml/core/definitions.py +123 -13
  14. deriva_ml/core/enums.py +47 -73
  15. deriva_ml/core/ermrest.py +226 -193
  16. deriva_ml/core/exceptions.py +297 -14
  17. deriva_ml/core/filespec.py +99 -28
  18. deriva_ml/core/logging_config.py +225 -0
  19. deriva_ml/core/mixins/__init__.py +42 -0
  20. deriva_ml/core/mixins/annotation.py +915 -0
  21. deriva_ml/core/mixins/asset.py +384 -0
  22. deriva_ml/core/mixins/dataset.py +237 -0
  23. deriva_ml/core/mixins/execution.py +408 -0
  24. deriva_ml/core/mixins/feature.py +365 -0
  25. deriva_ml/core/mixins/file.py +263 -0
  26. deriva_ml/core/mixins/path_builder.py +145 -0
  27. deriva_ml/core/mixins/rid_resolution.py +204 -0
  28. deriva_ml/core/mixins/vocabulary.py +400 -0
  29. deriva_ml/core/mixins/workflow.py +322 -0
  30. deriva_ml/core/validation.py +389 -0
  31. deriva_ml/dataset/__init__.py +2 -1
  32. deriva_ml/dataset/aux_classes.py +20 -4
  33. deriva_ml/dataset/catalog_graph.py +575 -0
  34. deriva_ml/dataset/dataset.py +1242 -1008
  35. deriva_ml/dataset/dataset_bag.py +1311 -182
  36. deriva_ml/dataset/history.py +27 -14
  37. deriva_ml/dataset/upload.py +225 -38
  38. deriva_ml/demo_catalog.py +126 -110
  39. deriva_ml/execution/__init__.py +46 -2
  40. deriva_ml/execution/base_config.py +639 -0
  41. deriva_ml/execution/execution.py +543 -242
  42. deriva_ml/execution/execution_configuration.py +26 -11
  43. deriva_ml/execution/execution_record.py +592 -0
  44. deriva_ml/execution/find_caller.py +298 -0
  45. deriva_ml/execution/model_protocol.py +175 -0
  46. deriva_ml/execution/multirun_config.py +153 -0
  47. deriva_ml/execution/runner.py +595 -0
  48. deriva_ml/execution/workflow.py +223 -34
  49. deriva_ml/experiment/__init__.py +8 -0
  50. deriva_ml/experiment/experiment.py +411 -0
  51. deriva_ml/feature.py +6 -1
  52. deriva_ml/install_kernel.py +143 -6
  53. deriva_ml/interfaces.py +862 -0
  54. deriva_ml/model/__init__.py +99 -0
  55. deriva_ml/model/annotations.py +1278 -0
  56. deriva_ml/model/catalog.py +286 -60
  57. deriva_ml/model/database.py +144 -649
  58. deriva_ml/model/deriva_ml_database.py +308 -0
  59. deriva_ml/model/handles.py +14 -0
  60. deriva_ml/run_model.py +319 -0
  61. deriva_ml/run_notebook.py +507 -38
  62. deriva_ml/schema/__init__.py +18 -2
  63. deriva_ml/schema/annotations.py +62 -33
  64. deriva_ml/schema/create_schema.py +169 -69
  65. deriva_ml/schema/validation.py +601 -0
  66. {deriva_ml-1.17.10.dist-info → deriva_ml-1.17.12.dist-info}/METADATA +4 -4
  67. deriva_ml-1.17.12.dist-info/RECORD +77 -0
  68. {deriva_ml-1.17.10.dist-info → deriva_ml-1.17.12.dist-info}/WHEEL +1 -1
  69. {deriva_ml-1.17.10.dist-info → deriva_ml-1.17.12.dist-info}/entry_points.txt +1 -0
  70. deriva_ml/protocols/dataset.py +0 -19
  71. deriva_ml/test.py +0 -94
  72. deriva_ml-1.17.10.dist-info/RECORD +0 -45
  73. {deriva_ml-1.17.10.dist-info → deriva_ml-1.17.12.dist-info}/licenses/LICENSE +0 -0
  74. {deriva_ml-1.17.10.dist-info → deriva_ml-1.17.12.dist-info}/top_level.txt +0 -0
@@ -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}")