Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@

#### Improvements

- Hybrid execution mode is now enabled by default. Certain operations on smaller data will now automatically execute in native pandas in-memory. Use `from modin.config import AutoSwitchBackend; AutoSwitchBackend.disable()` to turn this off and force all execution to occur in Snowflake.
- Downgraded to level `logging.DEBUG - 1` the log message saying that the
Snowpark `DataFrame` reference of an internal `DataFrameReference` object
has changed.
Expand Down
13 changes: 1 addition & 12 deletions src/snowflake/snowpark/modin/plugin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import inspect
import sys
from typing import Union, Callable, Any
import warnings

from packaging import version

Expand Down Expand Up @@ -174,19 +173,9 @@
)
from modin.config import AutoSwitchBackend # isort: skip # noqa: E402

HYBRID_WARNING = (
"Snowpark pandas now runs with hybrid execution enabled by default, and will perform certain operations "
+ "on smaller data using local, in-memory pandas. To disable this behavior and force all computations to occur in "
+ "Snowflake, run this line:\nfrom modin.config import AutoSwitchBackend; AutoSwitchBackend.disable()"
)

warnings.filterwarnings("once", message=HYBRID_WARNING)

if AutoSwitchBackend.get_value_source() is ValueSource.DEFAULT:
AutoSwitchBackend.enable()

if AutoSwitchBackend.get():
warnings.warn(HYBRID_WARNING, stacklevel=1)
AutoSwitchBackend.disable()

# Hybrid Mode Registration
# In hybrid execution mode, the client will automatically switch backends when a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@


def test_importing_plugin_always_turns_on_auto_switch_backend():
"""Test that importing snowflake.snowpark.modin.plugin always turns AutoSwitchBackend."""
"""Test that importing snowflake.snowpark.modin.plugin always turns AutoSwitchBackend off."""

from modin.config import AutoSwitchBackend

import snowflake.snowpark.modin.plugin # noqa: F401

assert AutoSwitchBackend.get() is True
assert AutoSwitchBackend.get() is False
Loading