-
Notifications
You must be signed in to change notification settings - Fork 657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEAT-#7448: Allow QueryCompilerCaster to apply cost-optimization on automatic casting #7464
Draft
sfc-gh-jkew
wants to merge
13
commits into
modin-project:main
Choose a base branch
from
sfc-gh-jkew:jkew/configurable-auto-caster
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
FEAT-#7448: Allow QueryCompilerCaster to apply cost-optimization on automatic casting #7464
sfc-gh-jkew
wants to merge
13
commits into
modin-project:main
from
sfc-gh-jkew:jkew/configurable-auto-caster
+394
−28
Conversation
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
from types import FunctionType, MethodType | ||
from typing import Any, Dict, Tuple, TypeVar | ||
|
||
from pandas.core.indexes.frozen import FrozenList | ||
|
||
from modin.core.storage_formats.base.query_compiler import BaseQueryCompiler | ||
from modin.core.storage_formats.base.query_compiler import ( | ||
BaseQueryCompiler, |
Check failure
Code scanning / CodeQL
Module-level cyclic import Error
'BaseQueryCompiler' may not be defined if module is imported before module , as the of BaseQueryCompiler occurs after the cyclic of modin.core.storage_formats.pandas.query_compiler_caster.
modin.core.storage_formats.base.query_compiler
Error loading related location
Loading modin.core.storage_formats.pandas.query_compiler_caster
Error loading related location
Loading definition
Error loading related location
Loading import
Error loading related location
Loading from modin.core.storage_formats.base.query_compiler import BaseQueryCompiler | ||
from modin.core.storage_formats.base.query_compiler import ( | ||
BaseQueryCompiler, | ||
QCCoercionCost, |
Check failure
Code scanning / CodeQL
Module-level cyclic import Error
'QCCoercionCost' may not be defined if module is imported before module , as the of QCCoercionCost occurs after the cyclic of modin.core.storage_formats.pandas.query_compiler_caster.
modin.core.storage_formats.base.query_compiler
Error loading related location
Loading modin.core.storage_formats.pandas.query_compiler_caster
Error loading related location
Loading definition
Error loading related location
Loading import
Error loading related location
Loading
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What do these changes do?
Currently a QueryCompiler derived from QueryCompilerCaster will cast all parameters, regardless of type to the query compiler we are calling an operation on. This CL introduces the ability to symmetrically cast to different query compilers based on a cost estimation.
Each query compiler implements a new function which can return a cost estimate of data migration from that specific compiler's perspective. On each operation involving mixed types we calculate the aggregate cost of migration across all query compilers and pick the query compiler class with the least cost.
The implementation of the cost-estimate, from each query compiler, can be anything, but it is constrained to a set of values between 0-1000.
Max Cost Not Implemented
This implementation still can face an issue where a workload is moved to the wrong engine, because there is no threshold on the cost of migration implemented. This can be implemented the future.
flake8 modin/ asv_bench/benchmarks scripts/doc_checker.py
black --check modin/ asv_bench/benchmarks scripts/doc_checker.py
git commit -s
docs/development/architecture.rst
is up-to-date