[Python] Jupyter autoreload workflow

Discussão em 'Python' iniciado por Stack, Maio 22, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to understand the best workflow for impotring script files into a jupyter notebook.

    I have a notebook that does somethig like:

    %load_ext autoreload
    %autoreload 2
    import functions as F


    Inside functions.py, I further do imports such as

    import numpy as np
    import mymodule


    It seems then that, for example, numpy will get reloaded every time I execute a cell, which makes things a bit slow. How could I automatically reload functions.py without reloading the imports there that I never change?

    Continue reading...

Compartilhe esta Página