locked
Import code from other Python notebooks in AzureML environment? RRS feed

  • Question

  • Is it currently possible to import code from another notebook within the AzureML environment?   I have two notebooks in my environment currently - one called "helper_functions", which contains the code for defined functions that I would like to re-use in other notebooks, and second notebook, called "nb_import_test" where I run the following:

    !pip install ipynb
    from ipynb.fs.defs.helper_functions import *

    Output:

    ImportError: No module named 'ipynb.fs.defs.helper_functions'

    This code runs without error when I run Jupyter notebooks locally, but fails when loaded the same two notebooks into the AzureML workspace.  Any idea why this is failing within AzureML?

    Thanks!

    Thursday, October 5, 2017 2:51 PM

All replies

  • It is not possible. Each Notebook kernel runs in its own Docker container in the Notebook services in Azure ML Studio.
    • Proposed as answer by Hai Ning Thursday, October 5, 2017 5:29 PM
    Thursday, October 5, 2017 5:29 PM