Skip to content

Commit 279289e

Browse files
committed
Move imports
1 parent 47f5ea8 commit 279289e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/zenml/utils/notebook_utils.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ def get_active_notebook_path() -> Optional[str]:
4545
global _ACTIVE_NOTEBOOK_PATH
4646

4747
if _ACTIVE_NOTEBOOK_PATH == _UNINITIALIZED:
48-
import ipynbname
49-
50-
from zenml.utils import source_utils
51-
5248
if path := os.environ.get(ENV_ZENML_NOTEBOOK_PATH, None):
5349
logger.info(
5450
"Using notebook path from environment variable: %s", path
@@ -57,6 +53,8 @@ def get_active_notebook_path() -> Optional[str]:
5753
_ACTIVE_NOTEBOOK_PATH = path
5854
else:
5955
from IPython import get_ipython
56+
import ipynbname
57+
from zenml.utils import source_utils
6058

6159
ip = get_ipython()
6260
if "__vsc_ipynb_file__" in ip.user_ns:

0 commit comments

Comments
 (0)