sagemaker-run-notebook icon indicating copy to clipboard operation
sagemaker-run-notebook copied to clipboard

Add Support for Additional Files

Open jimmycfa opened this issue 4 years ago • 7 comments

If the Notebook to be run/scheduled requires additional *.py files there is no way to pass those files in. The ask would be to be able to pass in either a notebook to run-notebook {schedule, run} notebook OR a notebook and path run-notebook {schedule,run} [--input_path folder/s3_path] notebook. I think the fix would be relatively easy looking at https://github.com/aws-samples/sagemaker-run-notebook/blob/master/sagemaker_run_notebook/cli.py#L61.

jimmycfa avatar Oct 07 '20 12:10 jimmycfa

any update about this? I have the same problem.

adrianmeltom avatar Oct 20 '21 11:10 adrianmeltom

any update about this? I have the same problem.

We ended up modifying the lambda and creating the scheduled job to include the root prefix in S3 vs just the notebook in S3 so that everything was included.

See this: https://github.com/jimmycfa/sagemaker-run-notebook/commit/fdd697abdbaa03f18aeba61876c8c4ea924b5dc7

jimmycfa avatar Oct 20 '21 12:10 jimmycfa

any update about this? I have the same problem.

We ended up modifying the lambda and creating the scheduled job to include the root prefix in S3 vs just the notebook in S3 so that everything was included.

See this: jimmycfa@fdd697a

And whats the modification on the lambda? I can see the changes in the run_notebook.py but in the fork you are refering to download a cloudformation template from the original repo without the lambda modified.

adrianmeltom avatar Oct 25 '21 07:10 adrianmeltom

I have similar question, unable to import a config.py file which is needed in the code (inside the jupyter notebook), I am using 0.19.0 version of the script because 0.20 failed, because of the compatibility with Jupyter version <3.8.

Could you kindly let me know what can I manually add in lambda function for this ?

JagritiJ avatar Jan 07 '22 16:01 JagritiJ

Hi @jimmycfa,

Can you please share your workaround for this? I'm having a similar situation where I have an external .py file that I need to use within my notebook that I want to run.

Were you able to find the solution @JagritiJ @adrianmeltom ?

fjpa121197 avatar Mar 14 '22 15:03 fjpa121197

I finally used papermill for that.

adrianmeltom avatar Mar 14 '22 15:03 adrianmeltom

@adrianmeltom could you share how you did it? I am still trying to figure out how to solve it.

lasdem avatar Apr 20 '22 15:04 lasdem