deriva-ml 1.10.0__tar.gz → 1.10.1__tar.gz

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-1.10.0/src/deriva_ml.egg-info → deriva_ml-1.10.1}/PKG-INFO +1 -1
  2. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml/deriva_ml_base.py +2 -7
  3. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml/execution.py +3 -0
  4. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml/execution_configuration.py +16 -6
  5. {deriva_ml-1.10.0 → deriva_ml-1.10.1/src/deriva_ml.egg-info}/PKG-INFO +1 -1
  6. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/.github/workflows/publish-docs.yml +0 -0
  7. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/.gitignore +0 -0
  8. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/LICENSE +0 -0
  9. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/README.md +0 -0
  10. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/.DS_Store +0 -0
  11. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/Notebooks/DerivaML Create Notes.ipynb +0 -0
  12. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/Notebooks/DerivaML Dataset.ipynb +0 -0
  13. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/Notebooks/DerivaML Execution.ipynb +0 -0
  14. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/Notebooks/DerivaML Features.ipynb +0 -0
  15. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/Notebooks/DerivaML Vocabulary.ipynb +0 -0
  16. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/assets/ERD.png +0 -0
  17. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/assets/Launcher.png +0 -0
  18. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/assets/copy_minid.png +0 -0
  19. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/assets/deriva-logo.png +0 -0
  20. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/assets/deriva-ml.pdf +0 -0
  21. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/assets/sharing-at-home.pdf +0 -0
  22. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/code-docs/dataset.md +0 -0
  23. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/code-docs/dataset_aux_classes.md +0 -0
  24. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/code-docs/dataset_bag.md +0 -0
  25. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/code-docs/deriva_ml_base.md +0 -0
  26. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/code-docs/deriva_model.md +0 -0
  27. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/code-docs/execution.md +0 -0
  28. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/code-docs/execution_configuration.md +0 -0
  29. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/code-docs/feature.md +0 -0
  30. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/code-docs/upload.md +0 -0
  31. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/deriva_ml_structure.md +0 -0
  32. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/index.md +0 -0
  33. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/release-notes.md +0 -0
  34. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/user-guide/datasets.md +0 -0
  35. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/user-guide/execution-configuration.md +0 -0
  36. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/user-guide/identifiers.md +0 -0
  37. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/user-guide/install.md +0 -0
  38. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/docs/user-guide/ml_workflow_instruction.md +0 -0
  39. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/mkdocs.yml +0 -0
  40. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/pyproject.toml +0 -0
  41. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/release.sh +0 -0
  42. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/setup.cfg +0 -0
  43. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml/__init__.py +0 -0
  44. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml/database_model.py +0 -0
  45. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml/dataset.py +0 -0
  46. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml/dataset_aux_classes.py +0 -0
  47. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml/dataset_bag.py +0 -0
  48. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml/demo_catalog.py +0 -0
  49. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml/deriva_definitions.py +0 -0
  50. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml/deriva_model.py +0 -0
  51. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml/execution_environment.py +0 -0
  52. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml/feature.py +0 -0
  53. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml/history.py +0 -0
  54. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml/schema_setup/__init__.py +0 -0
  55. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml/schema_setup/annotations.py +0 -0
  56. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml/schema_setup/create_schema.py +0 -0
  57. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml/schema_setup/policy.json +0 -0
  58. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml/schema_setup/table_comments_utils.py +0 -0
  59. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml/test_functions.py +0 -0
  60. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml/upload.py +0 -0
  61. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml.egg-info/SOURCES.txt +0 -0
  62. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml.egg-info/dependency_links.txt +0 -0
  63. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml.egg-info/entry_points.txt +0 -0
  64. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml.egg-info/requires.txt +0 -0
  65. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/src/deriva_ml.egg-info/top_level.txt +0 -0
  66. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/tests/__init__.py +0 -0
  67. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/tests/derivaml_test.py +0 -0
  68. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/tests/runner.py +0 -0
  69. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/tests/test_basic_tables.py +0 -0
  70. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/tests/test_dataset.py +0 -0
  71. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/tests/test_download.py +0 -0
  72. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/tests/test_execution.py +0 -0
  73. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/tests/test_features.py +0 -0
  74. {deriva_ml-1.10.0 → deriva_ml-1.10.1}/tests/test_upload.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deriva-ml
3
- Version: 1.10.0
3
+ Version: 1.10.1
4
4
  Summary: Utilities to simplify use of Dervia and Pandas to create reproducable ML pipelines
5
5
  Author-email: ISRD <isrd-dev@isi.edu>
6
6
  Requires-Python: >=3.10
@@ -1249,7 +1249,7 @@ class DerivaML(Dataset):
1249
1249
 
1250
1250
  # @validate_call
1251
1251
  def create_execution(
1252
- self, configuration: ExecutionConfiguration, dryrun: bool = False
1252
+ self, configuration: ExecutionConfiguration, dry_run: bool = False
1253
1253
  ) -> "Execution":
1254
1254
  """Create an execution object
1255
1255
 
@@ -1268,12 +1268,7 @@ class DerivaML(Dataset):
1268
1268
  """
1269
1269
  from .execution import Execution
1270
1270
 
1271
- if self._execution:
1272
- DerivaMLException(
1273
- "Only one execution can be created for a Deriva ML instance."
1274
- )
1275
- else:
1276
- self._execution = Execution(configuration, self, dryrun=dryrun)
1271
+ self._execution = Execution(configuration, self, dry_run=dry_run)
1277
1272
  return self._execution
1278
1273
 
1279
1274
  # @validate_call
@@ -18,6 +18,7 @@ from typing import Iterable, Any, Optional
18
18
  from deriva.core import format_exception
19
19
  from deriva.core.ermrest_model import Table
20
20
  from pydantic import validate_call, ConfigDict
21
+ import sys
21
22
 
22
23
  from .deriva_definitions import MLVocab, ExecMetadataVocab
23
24
  from .deriva_definitions import (
@@ -113,9 +114,11 @@ class Execution:
113
114
  self.stop_time = None
114
115
  self.status = Status.created
115
116
  self.uploaded_assets: list[Path] = []
117
+ self.configuration.argv = sys.argv
116
118
 
117
119
  self.dataset_rids: list[RID] = []
118
120
  self.datasets: list[DatasetBag] = []
121
+ self.parameters = self.configuration.parameters
119
122
 
120
123
  self._working_dir = self._ml_object.working_dir
121
124
  self._cache_dir = self._ml_object.cache_dir
@@ -1,14 +1,11 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import json
4
- from typing import Optional
4
+ from typing import Optional, Any
5
5
 
6
- from pydantic import (
7
- BaseModel,
8
- conlist,
9
- ConfigDict,
10
- )
6
+ from pydantic import BaseModel, conlist, ConfigDict, field_validator, Field
11
7
  from pathlib import Path
8
+ import sys
12
9
 
13
10
 
14
11
  from .dataset_aux_classes import DatasetSpec
@@ -43,6 +40,7 @@ class ExecutionConfiguration(BaseModel):
43
40
  datasets: List of dataset specifications which specify the dataset RID, version and if the dataset
44
41
  should be materialized.
45
42
  assets: List of assets to be downloaded prior to execution. The values must be RIDs in an asset table
43
+ parameters: Either a dictionary or a path to a JSON file that contains configuration parameters for the execution.
46
44
  workflow: A RID for a workflow instance. Must have a name, URI to the workflow instance, and a type.
47
45
  description: A description of the execution. Can use Markdown format.
48
46
  """
@@ -50,10 +48,22 @@ class ExecutionConfiguration(BaseModel):
50
48
  datasets: conlist(DatasetSpec) = []
51
49
  assets: list[RID | str] = [] # List of RIDs to model files.
52
50
  workflow: RID | Workflow
51
+ parameters: dict[str, Any] = {}
53
52
  description: str = ""
53
+ argv: conlist(str) = Field(default_factory=lambda: sys.argv)
54
54
 
55
55
  model_config = ConfigDict(arbitrary_types_allowed=True)
56
56
 
57
+ @field_validator("parameters", mode="before")
58
+ @classmethod
59
+ def validate_parameters(cls, value: Any) -> Any:
60
+ """If parameter is a file, assume that it has JSON contents for configuration parameters"""
61
+ if isinstance(value, str) or isinstance(value, Path):
62
+ with open(value, "r") as f:
63
+ return json.load(f)
64
+ else:
65
+ return value
66
+
57
67
  @staticmethod
58
68
  def load_configuration(path: Path) -> ExecutionConfiguration:
59
69
  """Create a ExecutionConfiguration from a JSON configuration file.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deriva-ml
3
- Version: 1.10.0
3
+ Version: 1.10.1
4
4
  Summary: Utilities to simplify use of Dervia and Pandas to create reproducable ML pipelines
5
5
  Author-email: ISRD <isrd-dev@isi.edu>
6
6
  Requires-Python: >=3.10
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes