Skip to content

Commit 6b649e1

Browse files
address comments
1 parent a5777bd commit 6b649e1

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

src/snowflake/snowpark/session.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -756,14 +756,19 @@ def __init__(
756756
)
757757

758758
if importlib.util.find_spec("modin"):
759-
from modin.config import AutoSwitchBackend
759+
try:
760+
from modin.config import AutoSwitchBackend
760761

761-
pandas_hybrid_execution_enabled: bool = (
762-
self._conn._get_client_side_session_parameter(
763-
_SNOWPARK_PANDAS_HYBRID_EXECUTION_ENABLED, AutoSwitchBackend().get()
762+
pandas_hybrid_execution_enabled: bool = (
763+
self._conn._get_client_side_session_parameter(
764+
_SNOWPARK_PANDAS_HYBRID_EXECUTION_ENABLED,
765+
AutoSwitchBackend().get(),
766+
)
764767
)
765-
)
766-
AutoSwitchBackend.put(pandas_hybrid_execution_enabled)
768+
AutoSwitchBackend.put(pandas_hybrid_execution_enabled)
769+
except Exception:
770+
# Continue session initialization even if Modin configuration fails
771+
pass
767772

768773
self._thread_store = create_thread_local(
769774
self._conn._thread_safe_session_enabled

0 commit comments

Comments
 (0)