deriva-ml 1.14.40__py3-none-any.whl → 1.14.42__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.
@@ -121,7 +121,7 @@ class Workflow(BaseModel):
121
121
  if "DERIVA_ML_WORKFLOW_URL" in os.environ:
122
122
  self.url = os.environ["DERIVA_ML_WORKFLOW_URL"]
123
123
  self.checksum = os.environ["DERIVA_ML_WORKFLOW_CHECKSUM"]
124
- self.git_root = Workflow._get_git_root(Path(os.environ["DERIVA_ML_NOTEBOOK_PATHL"]))
124
+ self.git_root = Workflow._get_git_root(Path(os.environ["DERIVA_ML_NOTEBOOK_PATH"]))
125
125
  self.is_notebook = True
126
126
 
127
127
  if not self.url:
@@ -322,10 +322,8 @@ class Workflow(BaseModel):
322
322
  # Being called from the command line interpreter.
323
323
  filename = Path.cwd() / Path("REPL")
324
324
  # Get the caller's filename, which is two up the stack from here.
325
- elif "PYTEST_CURRENT_TEST" in os.environ:
325
+ elif (not filename.exists()) and "PYTEST_CURRENT_TEST" in os.environ:
326
326
  filename = Path.cwd() / Path("pytest")
327
- else:
328
- raise DerivaMLException("Looking for caller failed") # Stack is too shallow
329
327
  return filename, is_notebook
330
328
 
331
329
  @staticmethod
deriva_ml/run_notebook.py CHANGED
@@ -76,7 +76,7 @@ class DerivaMLRunNotebookCLI(BaseCLI):
76
76
  def main(self):
77
77
  """Parse arguments and set up execution environment."""
78
78
  args = self.parse_cli()
79
- notebook_file = args.notebook_file
79
+ notebook_file: Path = args.notebook_file
80
80
  parameter_file = args.file
81
81
 
82
82
  # args.parameter is now a list of [KEY, VALUE] lists
@@ -115,11 +115,11 @@ class DerivaMLRunNotebookCLI(BaseCLI):
115
115
  print(f" {param}:{value}")
116
116
  self.run_notebook(notebook_file.resolve(), parameters, kernel=args.kernel[0], log=args.log_output)
117
117
 
118
- def run_notebook(self, notebook_file, parameters, kernel=None, log=False):
118
+ def run_notebook(self, notebook_file: Path, parameters, kernel=None, log=False):
119
119
  url, checksum = Workflow.get_url_and_checksum(Path(notebook_file))
120
120
  os.environ["DERIVA_ML_WORKFLOW_URL"] = url
121
121
  os.environ["DERIVA_ML_WORKFLOW_CHECKSUM"] = checksum
122
- os.environ["DERIVA_ML_NOTEBOOK_PATH"] = notebook_file
122
+ os.environ["DERIVA_ML_NOTEBOOK_PATH"] = notebook_file.as_posix()
123
123
 
124
124
  with tempfile.TemporaryDirectory() as tmpdirname:
125
125
  notebook_output = Path(tmpdirname) / Path(notebook_file).name
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deriva-ml
3
- Version: 1.14.40
3
+ Version: 1.14.42
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
@@ -3,7 +3,7 @@ deriva_ml/bump_version.py,sha256=KpHmkpEztly2QHYL4dyaIGdEMyP4F0D89rawyh5EDTs,398
3
3
  deriva_ml/demo_catalog.py,sha256=JjPAIac_hKPh5krEhGJydjXquRnivi7kQoR8W4Khp-s,14928
4
4
  deriva_ml/feature.py,sha256=6-aphkxdKjWa9oPSGFWxHcwAc_8hmWj-7I4M178YG5Y,8470
5
5
  deriva_ml/install_kernel.py,sha256=b62XY0SLViYO_Zye5r1Pl9qhYZyu_fk4KAO8NS1pxgM,2165
6
- deriva_ml/run_notebook.py,sha256=rzTruz0HFTuBpuLs2de1Gm1sYS2YE9j9q7eeE981cVs,6581
6
+ deriva_ml/run_notebook.py,sha256=QDeYKv8Ug9lx36e-CMogDu1Y4omOFlkTXvMxLriulJQ,6604
7
7
  deriva_ml/core/__init__.py,sha256=V_i90pc5PB1F4UdOO6DZWzpEFaZDTaPRU-EzKXQ19eI,787
8
8
  deriva_ml/core/base.py,sha256=5H0GEMlKXUVRXBYXJQ25kxdscB6uX1wIKSUAM_CBOhI,61228
9
9
  deriva_ml/core/constants.py,sha256=6wBJ8qMxe-dbCjRGrjUIX-RK0mTWrLDTeUpaVbLFoM8,888
@@ -22,7 +22,7 @@ deriva_ml/execution/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
22
22
  deriva_ml/execution/environment.py,sha256=B7nywqxFTRUWgyu8n7rFoKcVC9on422kjeFG2FPQfvg,9302
23
23
  deriva_ml/execution/execution.py,sha256=NJT4qzZvvBXAlh73NVM39VE-uinSVBu2mHtuZD35G1M,44591
24
24
  deriva_ml/execution/execution_configuration.py,sha256=Rw4VWkBCZN9yatvSKdTqEWTfu470lpcVKfHFR0uN0jI,6248
25
- deriva_ml/execution/workflow.py,sha256=qMH3PlJRy6W5r8uKveZm8pbS5UEEWdUvZ1xyyQjdAOA,13688
25
+ deriva_ml/execution/workflow.py,sha256=E5GkE1m76eWvL1_i88h8sBkNMNJEPH-3QXyqNSzSoec,13604
26
26
  deriva_ml/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  deriva_ml/model/catalog.py,sha256=dzTBcRlqgEVkPY32AUax_iu75RgFiT4Pu5au7rmrv8k,14068
28
28
  deriva_ml/model/database.py,sha256=SBkYFf0qwbGmvL0Xtn_n5DCz4roGfrhuYrM8G69Cy9Y,14837
@@ -34,9 +34,9 @@ deriva_ml/schema/create_schema.py,sha256=IrnSfN0ufS3M31MD8M6ZWyfJidKllLPqDFBUDAI
34
34
  deriva_ml/schema/deriva-ml-reference.json,sha256=AEOMIgwKO3dNMMWHb0lxaXyamvfAEbUPh8qw0aAtsUQ,242460
35
35
  deriva_ml/schema/policy.json,sha256=5ykB8nnZFl-oCHzlAwppCFKJHWJFIkYognUMVEanfY8,1826
36
36
  deriva_ml/schema/table_comments_utils.py,sha256=4flCqnZAaqg_uSZ9I18pNUWAZoLfmMCXbmI5uERY5vM,2007
37
- deriva_ml-1.14.40.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
38
- deriva_ml-1.14.40.dist-info/METADATA,sha256=LdGCdHNg-xBkBmZOat0Z8h97_7OLXzqsQU4sitNBeh0,1122
39
- deriva_ml-1.14.40.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
40
- deriva_ml-1.14.40.dist-info/entry_points.txt,sha256=XsHSbfp7S1cKMjHoPUdFIaFcp9lHXHS6CV1zb_MEXkg,463
41
- deriva_ml-1.14.40.dist-info/top_level.txt,sha256=I1Q1dkH96cRghdsFRVqwpa2M7IqJpR2QPUNNc5-Bnpw,10
42
- deriva_ml-1.14.40.dist-info/RECORD,,
37
+ deriva_ml-1.14.42.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
38
+ deriva_ml-1.14.42.dist-info/METADATA,sha256=kwydUUccmWn5SwtxH_HciAqeIyq2w1Pmk_IUo0VQvfc,1122
39
+ deriva_ml-1.14.42.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
40
+ deriva_ml-1.14.42.dist-info/entry_points.txt,sha256=XsHSbfp7S1cKMjHoPUdFIaFcp9lHXHS6CV1zb_MEXkg,463
41
+ deriva_ml-1.14.42.dist-info/top_level.txt,sha256=I1Q1dkH96cRghdsFRVqwpa2M7IqJpR2QPUNNc5-Bnpw,10
42
+ deriva_ml-1.14.42.dist-info/RECORD,,