Skip to content

Commit bfb366b

Browse files
committed
Update documentation after hybrid was turned on.
1 parent 1ee82d7 commit bfb366b

1 file changed

Lines changed: 18 additions & 5 deletions

File tree

docs/source/modin/hybrid_execution.rst

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
===========================================
2-
Hybrid Execution (Public Preview)
2+
Hybrid Execution
33
===========================================
44

55
Snowpark pandas supports workloads on mixed underlying execution engines and will automatically
@@ -37,24 +37,37 @@ read_snowflake, value_counts, tail, var, std, sum, sem, max, min, mean, agg, agg
3737
Examples
3838
========
3939

40-
Enabling Hybrid Execution
40+
Enabling and Disabling Hybrid Execution
4141
~~~~~~~~~~~~~~~~~~~~~~~~~
4242

43-
.. code-block:: python
43+
Hybrid execution is enabled by default, and can be turned off with the AutoSwitchBackend variable.
4444

45+
.. code-block:: python
4546
import modin.pandas as pd
4647
import snowflake.snowpark.modin.plugin
4748
4849
# Import the configuration variable
4950
from modin.config import AutoSwitchBackend
51+
52+
# Disable Hybrid mode
53+
AutoSwitchBackend.disable()
54+
55+
# Enable Hybrid mode
56+
AutoSwitchBackend.enable()
57+
58+
You can selectively disable hybrid mode within a context imported
59+
from modin.config
60+
61+
.. code-block:: python
62+
63+
import modin.pandas as pd
64+
import snowflake.snowpark.modin.plugin
5065
from snowflake.snowpark import Session
5166
5267
Session.builder.create()
5368
df = pd.DataFrame([1, 2, 3])
5469
print(df.get_backend()) # 'Snowflake'
5570
56-
# Enable hybrid execution
57-
AutoSwitchBackend().enable()
5871
df = pd.DataFrame([4, 5, 6])
5972
# DataFrame should use local execution backend, 'Pandas'
6073
# because the data frame is already small and in memory

0 commit comments

Comments
 (0)