ipython2cwl icon indicating copy to clipboard operation
ipython2cwl copied to clipboard

Execution fails if the notebook imports a file

Open mosoriob opened this issue 4 years ago • 3 comments

I had a notebook main.ipynb that imports a function from the file inference.py

The script generated main is going to fail because the ipython2cwl doesn't copy the inference.py file

#!/usr/bin/env ipython
"""
def main(cameraType, siteID, modelPath):
    import numpy as np
    import inference, hpwren
$ ls
main

mosoriob avatar May 07 '21 20:05 mosoriob

Dear @mosoriob , thanks for this report

Please try adding something like local_script: 'CWLFilePathInput' = 'inference.py' towards the beginning of each cell that needs inference.py?

By the way, if you can share your notebook then that will make it easier to help you.

mr-c avatar May 10 '21 08:05 mr-c

Hi @mr-c

The notebook is available at https://github.com/iperezx/edge-plugin-smokedetect

A full description of the issue is here

https://github.com/mintproject/mic/issues/344

mosoriob avatar May 11 '21 22:05 mosoriob

I don't like the idea of exposing the inference.py as input because the user who runs the model is not always the author.

mosoriob avatar May 11 '21 22:05 mosoriob