[Python] Jupyter module - %load_ext autoreload %autoreload 2

    728x90

    .py 파일을 수정했을 때, kernel을 재시작해야 반영되는데,

    노트북에 아래 두 줄의 코드를 입력하면 재시작하지 않고 모듈의 수정사항을 반영할 수 있습니다.

    즉. 기본적으로 모듈이 자동으로 다시 로드 됩니다.

    %load_ext autoreload
    %autoreload 2

     

     

     

    출처: https://stackoverflow.com/questions/1907993/autoreload-of-modules-in-ipython

    728x90

    댓글