SwissDataScienceCenter / renku-python

A Python library for the Renku collaborative data science platform.
https://renku-python.readthedocs.io/
Apache License 2.0
37 stars 29 forks source link

cli: renku run papermill [...] #2477

Closed schymans closed 2 years ago

schymans commented 2 years ago

Describe the bug

I tried to run a notebook using papermill with the following command: renku run papermill notebooks/GC_Fluxes_Computations_equations.ipynb notebooks/GC_Fluxes_Computations_equations.ran.ipynb -p output_path modules_exported

Details

I was informed that I hit a bug:

Renku version: 0.16.2 OS: Linux (#1 SMP Progress Linux 5.10.70-1~progress5+u1 (2021-10-04)) Python: 3.7.9

Traceback

Traceback (most recent call last):
  File "[...]/site-packages/renku/core/models/cwl/command_line_tool.py", line 124, in generate_process_run
    factory=self, client=client, commit=commit, path=path, name=name, description=description, keywords=keywords
  File "[...]/site-packages/renku/core/models/workflow/run.py", line 230, in from_factory
    res = _convert_cmd_input(i, client, commit, run_id)
  File "[...]/site-packages/renku/core/models/workflow/run.py", line 84, in _convert_cmd_input
    entity = _entity_from_path(client, input.default.path, commit)
  File "[...]/site-packages/renku/core/models/workflow/run.py", line 50, in _entity_from_path
    client, commit, path = client.resolve_in_submodules(client.find_previous_commit(path, revision=commit.hexsha), path)
  File "[...]/site-packages/renku/core/management/repository.py", line 372, in find_previous_commit
    raise KeyError("Could not find a file {0} in range {1}".format(paths, revision))
KeyError: 'Could not find a file /home/user/notebooks/jupyter/WAVE/renkulab/LI-6800/modules_exported in range 31fcee98480c46afa8283a011aefa5efe055b61b'

Additional context

Output files should have been written to modules_exported, but were not.

schymans commented 2 years ago

I found the problem: I forgot the trailing / in the path. It works with this command: renku run papermill notebooks/GC_Fluxes_Computations_equations.ipynb notebooks/GC_Fluxes_Computations_equations.ran.ipynb -p output_path modules_exported/