Skip to content

Commit 632ad81

Browse files
committed
fix: disable kernel computation in JupyterConvert
1 parent 6e2e2dc commit 632ad81

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pygwalker/api/jupyter.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ def walk(
5757
inspect.stack()[1].frame
5858
)
5959

60+
if check_kaggle():
61+
auto_set_kanaries_api_key_on_kaggle()
62+
63+
if get_kaggle_run_type() == "batch":
64+
adjust_kaggle_default_font_size()
65+
env = "JupyterPreview"
66+
elif check_convert():
67+
env = "JupyterConvert"
68+
6069
walker = PygWalker(
6170
gid=gid,
6271
dataset=dataset,
@@ -67,7 +76,7 @@ def walk(
6776
appearance=appearance,
6877
show_cloud_tool=show_cloud_tool,
6978
use_preview=True,
70-
kernel_computation=isinstance(dataset, (Connector, str)) or fallback_value(kernel_computation, use_kernel_calc),
79+
kernel_computation=env != "JupyterConvert" and (isinstance(dataset, (Connector, str)) or fallback_value(kernel_computation, use_kernel_calc)),
7180
use_save_tool=True,
7281
gw_mode="explore",
7382
is_export_dataframe=True,
@@ -77,15 +86,6 @@ def walk(
7786
**kwargs
7887
)
7988

80-
if check_kaggle():
81-
auto_set_kanaries_api_key_on_kaggle()
82-
83-
if get_kaggle_run_type() == "batch":
84-
adjust_kaggle_default_font_size()
85-
env = "JupyterPreview"
86-
elif check_convert():
87-
env = "JupyterConvert"
88-
8989
env_display_map = {
9090
"JupyterWidget": walker.display_on_jupyter_use_widgets,
9191
"Jupyter": walker.display_on_jupyter,

0 commit comments

Comments
 (0)