-
Notifications
You must be signed in to change notification settings - Fork 653
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Track engine and storage format at query compiler level.
Signed-off-by: sfc-gh-mvashishtha <[email protected]>
- Loading branch information
1 parent
e59ea4e
commit a471636
Showing
7 changed files
with
140 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stderr", | ||
"output_type": "stream", | ||
"text": [ | ||
"2025-01-17 22:53:54,581\tINFO worker.py:1821 -- Started a local Ray instance.\n" | ||
] | ||
}, | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"('Ray', 'Pandas')\n", | ||
"['Ray', 'Ray', 'Ray', 'Ray']\n", | ||
"('Python', 'Pandas')\n" | ||
] | ||
}, | ||
{ | ||
"name": "stderr", | ||
"output_type": "stream", | ||
"text": [ | ||
"FutureWarning: The behavior of array concatenation with empty entries is deprecated. In a future version, this will no longer exclude empty items when determining the result dtype. To retain the old behavior, exclude the empty entries before the concat operation.\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"import modin.pandas as pd\n", | ||
"from modin.config import StorageFormat, Engine\n", | ||
"\n", | ||
"StorageFormat.put('Pandas')\n", | ||
"Engine.put('ray')\n", | ||
"\n", | ||
"ray_df = pd.DataFrame([[0, 1], [2, 3]])\n", | ||
"\n", | ||
"print((ray_df.engine, ray_df.storage_format))\n", | ||
"\n", | ||
"# We should propagate engine through all operations\n", | ||
"print([df.engine for df in\n", | ||
" (\n", | ||
" ray_df.sort_values(0),\n", | ||
" ray_df.astype(str),\n", | ||
" ray_df.groupby(0).sum(),\n", | ||
" ray_df * ray_df,\n", | ||
" )\n", | ||
"])\n", | ||
"\n", | ||
"# Make a python dataframe\n", | ||
"Engine.put('Python')\n", | ||
"python_df = pd.DataFrame([[4, 5], [6, 7]])\n", | ||
"print((python_df.engine, python_df.storage_format))" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "modin-dev", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.9.21" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |