ํ‹ฐ์Šคํ† ๋ฆฌ ๋ทฐ

ํŒŒ์ด์ฌ์„ ์‚ฌ์šฉํ•˜๋‹ค๋ณด๋ฉด ๋ถˆํŽธํ•ด์งˆ๋•Œ๊ฐ€ ์žˆ๋‹ค. ์Šคํฌ๋ฆฝํŠธ ์ฝ”๋“œ๋ฅผ ๋ฐ”๊พธ๊ณ  ์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ์—์„œ ๋ฐ˜์˜๋œ ์ฝ”๋“œ๋ฅผ ๋ถˆ๋Ÿฌ์˜ค๊ธฐ ์œ„ํ•ด์„  restart ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ์•ผํ•˜๊ณ  ๊ธฐ์กด์— ํ• ๋‹น๋œ ๋ณ€์ˆ˜๋“ค์ด ๋‹ค ์‚ฌ๋ผ์ง€๋Š” ๊ฒฝํ—˜..

์ด๋Ÿด ๋•Œ autoreload ์„ค์ •์„ ํ•ด์ฃผ๋ฉด restart๋ฅผ ํ•ด์ฃผ์ง€ ์•Š์•„๋„ ์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ์—์„œ ๋ฐ˜์˜๋œ ์ฝ”๋“œ๋ฅผ ๋ฐ”๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค. ๋จผ์ € profile์„ ์ƒ์„ฑํ•œ๋‹ค. ์ƒ์„ฑํ•ด์คŒ๊ณผ ๋™์‹œ์— ํŒŒ์ผ ์œ„์น˜๋„ ์•Œ๋ ค์ค€๋‹ค.

ipython profile create

# ๊ฒฐ๊ณผ
[ProfileCreate] Generating default config file: PosixPath('/Users/username/.ipython/profile_default/ipython_config.py')
[ProfileCreate] Generating default config file: PosixPath('/Users/username/.ipython/profile_default/ipython_kernel_config.py')

ํŒŒ์ผ ์œ„์น˜ ๋””๋ ‰ํ† ๋ฆฌ๋กœ ์˜ฎ๊ธด ํ›„ ipython_config.py๋ฅผ vi๋กœ ์—ด๊ณ  ๋งจ ๋งˆ์ง€๋ง‰์— ์•„๋ž˜์™€ ๊ฐ™์ด ์ถ”๊ฐ€ํ•ด์ฃผ๋ฉด ๋œ๋‹ค. ์ด์ œ jupyter๋ฅผ ์žฌ์‹คํ–‰ํ•ด์„œ ํ™•์ธํ•ด๋ณด์ž!

c.InteractiveShellApp.exec_lines = []
c.InteractiveShellApp.exec_lines.append('%load_ext autoreload')
c.InteractiveShellApp.exec_lines.append('%autoreload 2')

Reference

Autoreload of modules in IPython ๐Ÿ”—

์ตœ๊ทผ์— ์˜ฌ๋ผ์˜จ ๊ธ€
ยซ   2025/05   ยป
์ผ ์›” ํ™” ์ˆ˜ ๋ชฉ ๊ธˆ ํ† 
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Total
Today
Yesterday