-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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(rust,python): Add config to specify GPU polars as the default engine #20717
base: main
Are you sure you want to change the base?
Conversation
Wouldn't it be more practical if you can set any engine then as default? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #20717 +/- ##
==========================================
- Coverage 79.70% 79.70% -0.01%
==========================================
Files 1561 1561
Lines 221930 221947 +17
Branches 2530 2530
==========================================
+ Hits 176892 176905 +13
- Misses 44456 44460 +4
Partials 582 582 ☔ View full report in Codecov by Sentry. |
I think this isn't as simple as it seems, because we do also call Polars methods in the Python code internally which are only supported on, for example, the eager engine. |
Can you expand on what you mean here? Effectively what this is trying to do is add a global config option for the default value in Why would hooking this up via a config option not work? |
@wence- I have no idea what the full scope of such examples are throughout the codebase, but one example is |
OK, thanks, I think I see. I think there's some amount of tension here between making this "easy" to configure globally and I guess some things breaking at a distance from where the user might expect. |
pub fn get_default_engine() -> String { | ||
std::env::var("POLARS_DEFAULT_ENGINE").unwrap_or_else(|_| "cpu".to_string()) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question: why even change polars-core when changing the engine is a Python-specific feature?
Apart of #19797. We should also follow up the PR to allow other engines to be the default.