deriva-ml 1.9.0__py3-none-any.whl → 1.9.1__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.
@@ -84,7 +84,7 @@ class DatabaseModel(DerivaModel, metaclass=DatabaseModelMeta):
84
84
  except KeyError:
85
85
  raise DerivaMLException(f"Dataset {dataset_rid} not found")
86
86
 
87
- def __init__(self, minid: DatasetMinid, bag_path: Path):
87
+ def __init__(self, minid: DatasetMinid, bag_path: Path, dbase_path: Path):
88
88
  """Create a new DatabaseModel.
89
89
 
90
90
  Args:
@@ -95,8 +95,7 @@ class DatabaseModel(DerivaModel, metaclass=DatabaseModelMeta):
95
95
  self.bag_path = bag_path
96
96
  self.minid = minid
97
97
  self.dataset_rid = minid.dataset_rid
98
- dir_path = bag_path.parent
99
- self.dbase_file = dir_path / f"{minid.version_rid}.db"
98
+ self.dbase_file = dbase_path / f"{minid.version_rid}.db"
100
99
  self.dbase = sqlite3.connect(self.dbase_file)
101
100
 
102
101
  super().__init__(
deriva_ml/dataset.py CHANGED
@@ -67,11 +67,12 @@ class Dataset:
67
67
 
68
68
  _Logger = logging.getLogger("deriva_ml")
69
69
 
70
- def __init__(self, model: DerivaModel, cache_dir: Path):
70
+ def __init__(self, model: DerivaModel, cache_dir: Path, working_dir: Path):
71
71
  self._model = model
72
72
  self._ml_schema = ML_SCHEMA
73
73
  self.dataset_table = self._model.schemas[self._ml_schema].tables["Dataset"]
74
74
  self._cache_dir = cache_dir
75
+ self._working_dir = working_dir
75
76
  self._logger = logging.getLogger("deriva_ml")
76
77
 
77
78
  def _is_dataset_rid(self, dataset_rid: RID, deleted: bool = False) -> bool:
@@ -783,7 +784,6 @@ class Dataset:
783
784
  snapshot: Optional[Dataset] = None,
784
785
  dataset_nesting_depth: Optional[int] = None,
785
786
  ) -> set[tuple[Table, ...]]:
786
-
787
787
  snapshot_catalog = snapshot if snapshot else self
788
788
 
789
789
  dataset_table = snapshot_catalog._model.schemas[self._ml_schema].tables[
@@ -831,9 +831,7 @@ class Dataset:
831
831
  nested_paths = set()
832
832
  if dataset_rid:
833
833
  for c in snapshot_catalog.list_dataset_children(dataset_rid=dataset_rid):
834
- nested_paths |= self._collect_paths(
835
- c, snapshot=snapshot_catalog
836
- )
834
+ nested_paths |= self._collect_paths(c, snapshot=snapshot_catalog)
837
835
  else:
838
836
  # Initialize nesting depth if not already provided.
839
837
  dataset_nesting_depth = (
@@ -979,7 +977,7 @@ class Dataset:
979
977
  if dataset.materialize
980
978
  else self._download_dataset_minid(minid)
981
979
  )
982
- return DatabaseModel(minid, bag_path).get_dataset()
980
+ return DatabaseModel(minid, bag_path, self._working_dir).get_dataset()
983
981
 
984
982
  def _version_snapshot(self, dataset: DatasetSpec) -> str:
985
983
  """Return a catalog with snapshot for the specified dataset version"""
@@ -163,7 +163,7 @@ class DerivaML(Dataset):
163
163
  self.cache_dir.mkdir(parents=True, exist_ok=True)
164
164
 
165
165
  # Initialize dataset class.
166
- super().__init__(self.model, self.cache_dir)
166
+ super().__init__(self.model, self.cache_dir, self.working_dir)
167
167
  self._logger = logging.getLogger("deriva_ml")
168
168
  self._logger.setLevel(logging_level)
169
169
 
@@ -257,7 +257,7 @@ class DerivaML(Dataset):
257
257
  def _get_notebook_path(self) -> Path | None:
258
258
  """Return the absolute path of the current notebook."""
259
259
 
260
- server, session = self._get_notebook_session()
260
+ server, session = DerivaML._get_notebook_session()
261
261
  if server and session:
262
262
  self._check_nbstrip_status()
263
263
  relative_path = session["notebook"]["path"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deriva-ml
3
- Version: 1.9.0
3
+ Version: 1.9.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
@@ -16,5 +16,14 @@ Requires-Dist: setuptools-scm<=6.0
16
16
  Requires-Dist: nbstripout
17
17
  Dynamic: license-file
18
18
 
19
- Deriva-ML is a python libary to simplify the process of creating and executing reproducible machine learning workflows
19
+ # DerivaML
20
+ Deriva-ML is a python library to simplify the process of creating and executing reproducible machine learning workflows
20
21
  using a deriva catalog.
22
+
23
+
24
+ ## Installing the GitHub CLI
25
+
26
+ The script release.sh will create a new release tag in GitHub. This script requires the
27
+ GitHUB CLI be installed.
28
+
29
+ See [https://cli.github.com](https://cli.github.com) for instructions on how to install and configure the CLI.
@@ -1,11 +1,11 @@
1
1
  deriva_ml/__init__.py,sha256=r1Z9N5vtZkAET7emqhpAx2bf_xJUp5wHOc4_DIplsG8,1082
2
- deriva_ml/database_model.py,sha256=HaJoxKSogc-xLGaZfEviqRAWO9wUy52h7yK8by6FKxM,14838
3
- deriva_ml/dataset.py,sha256=XIXyTej55WduvEOGitG5SJIfPYrQu36cXjCoCNHNMwQ,60746
2
+ deriva_ml/database_model.py,sha256=58iweWRteLeKKjjeNA9_e7TbUb4Av92lxH2zKvZzwA8,14823
3
+ deriva_ml/dataset.py,sha256=h7Zkhnhy66GhPg6O1ud-YCx-jFKAabWF-nwuIDsR8SU,60785
4
4
  deriva_ml/dataset_aux_classes.py,sha256=YxjQnu2kS9kK_f8bGqhmgE6ty9GNeitCxfvReT9vaM0,6537
5
5
  deriva_ml/dataset_bag.py,sha256=aOJxFA9t5apjE5BNBrk8Pi9R1Cp8AWnnaL-10P8ELrQ,11515
6
6
  deriva_ml/demo_catalog.py,sha256=zQAHWSvrVPxMg-vyRUqoC0Jj5RhfGjkBwXW3mBksLhA,10986
7
7
  deriva_ml/deriva_definitions.py,sha256=jNiInYA2Cb1GE4OOT1CofxBygdLDSOmNsw5Wl6NbZQE,8943
8
- deriva_ml/deriva_ml_base.py,sha256=B0_0R0tgx4o30VM-QSSKIGy2BN5kOBcYKuYGvmPkwMg,46953
8
+ deriva_ml/deriva_ml_base.py,sha256=nzPzn_iLQIUJDCxTdRgAVEWqS7LbRTZriofWYmdEYe8,46975
9
9
  deriva_ml/deriva_model.py,sha256=B4gwr3-92IQU-mEZlusgNEnRyulD96esWGS67q9MzHk,12024
10
10
  deriva_ml/execution.py,sha256=on8hAtuZr9qFiyxuk_vDCmnRJ9Cv4kFOgHK4HY4CmV8,29585
11
11
  deriva_ml/execution_configuration.py,sha256=vsdL31J09dz7CQDd2rYXIjyBPwNlgAWvrTqsXNWi82g,3357
@@ -19,9 +19,9 @@ deriva_ml/schema_setup/annotations.py,sha256=v0gTpmWYxRqsQ-bcnQzsr8WowGv2pi9pZUs
19
19
  deriva_ml/schema_setup/create_schema.py,sha256=BRdYeWW5I8HxuATkB1hkKuIw4n-JQu620xod7EQoVSE,10674
20
20
  deriva_ml/schema_setup/policy.json,sha256=77sf0Imy6CAQV0_VwwbA56_KROJ05WXsvT-Wjtkk538,1633
21
21
  deriva_ml/schema_setup/table_comments_utils.py,sha256=-2_ubEpoH7ViLVb-ZfW9wZbQ26DTKNgjkCABMzGu4i4,2140
22
- deriva_ml-1.9.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
23
- deriva_ml-1.9.0.dist-info/METADATA,sha256=REDBcboXpGhYbG7bVaICPhZP81cDLoSiCdiY7PX8GrQ,669
24
- deriva_ml-1.9.0.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
25
- deriva_ml-1.9.0.dist-info/entry_points.txt,sha256=ZiOvrYj022x544TQwi018ujeHRRDahNmwJnzn5ThacM,242
26
- deriva_ml-1.9.0.dist-info/top_level.txt,sha256=I1Q1dkH96cRghdsFRVqwpa2M7IqJpR2QPUNNc5-Bnpw,10
27
- deriva_ml-1.9.0.dist-info/RECORD,,
22
+ deriva_ml-1.9.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
23
+ deriva_ml-1.9.1.dist-info/METADATA,sha256=zdDl9mmw2-DwvfYyWtq3vKnsB175gRFUsfHvRNLOGLg,941
24
+ deriva_ml-1.9.1.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
25
+ deriva_ml-1.9.1.dist-info/entry_points.txt,sha256=ZiOvrYj022x544TQwi018ujeHRRDahNmwJnzn5ThacM,242
26
+ deriva_ml-1.9.1.dist-info/top_level.txt,sha256=I1Q1dkH96cRghdsFRVqwpa2M7IqJpR2QPUNNc5-Bnpw,10
27
+ deriva_ml-1.9.1.dist-info/RECORD,,