-
Notifications
You must be signed in to change notification settings - Fork 296
chore: Remove the PyRunner #4458
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
Conversation
@@ -1,80 +0,0 @@ | |||
name: Run property based tests with Hypothesis |
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.
Removed entirely because it only tested with the pyrunner. Lmk if it should run with the native runner instead
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.
Could we try using the native and ray runners for this instead of removing it?
@@ -94,31 +93,6 @@ def set_runner_ray( | |||
return DaftContext._from_native(py_ctx) | |||
|
|||
|
|||
def set_runner_py(use_thread_pool: bool | None = None, num_threads: int | None = None) -> DaftContext: |
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.
Instead of removing, would it be better to have it return an error?
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.
Might be helpful but we also have noted that deprecation warning for a while now so it's ok to remove as well. I'll leave it to your discretion
&& matches!(val.trim().to_lowercase().as_str(), "1" | "true") | ||
{ | ||
log::warn!("DAFT_ENABLE_NATIVE_EXECUTOR will be deprecated and removed in the future. Please switch to using DAFT_RUNNER=NATIVE instead."); | ||
cfg.enable_native_executor = true; |
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 removed the flag entirely
@@ -70,14 +70,10 @@ jobs: | |||
run: python benchmarking/tpch/data_generation.py --scale_factor=${{ env.TPCH_SCALE_FACTOR }} --num_parts=${{ env.TPCH_NUM_PARTS }} --generate_parquet | |||
|
|||
- name: Run Profiling on TPCH Benchmark | |||
env: | |||
DAFT_DEVELOPER_USE_THREAD_POOL: '0' |
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.
Used by pyrunner only
src/daft-context/src/lib.rs
Outdated
"ray" => Ok(get_ray_runner_config_from_env()), | ||
"py" => Err(DaftError::ValueError("The PyRunner was removed from Daft from v0.5.0 onwards. Please set the env `DAFT_RUNNER=native` instead.".to_string())), | ||
_ if detect_ray_state() => Ok(get_ray_runner_config_from_env()), | ||
other => Err(DaftError::ValueError(format!("Invalid runner `{other}` specified in DAFT_RUNNER env"))) |
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.
Potentially breaking change: Instead of just allowing any DAFT_RUNNER=... to use native, throwing an error now. Throwing a special error for the pyrunner
@@ -1,80 +0,0 @@ | |||
name: Run property based tests with Hypothesis |
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.
Could we try using the native and ray runners for this instead of removing it?
@@ -94,31 +93,6 @@ def set_runner_ray( | |||
return DaftContext._from_native(py_ctx) | |||
|
|||
|
|||
def set_runner_py(use_thread_pool: bool | None = None, num_threads: int | None = None) -> DaftContext: |
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.
Might be helpful but we also have noted that deprecation warning for a while now so it's ok to remove as well. I'll leave it to your discretion
src/daft-context/src/lib.rs
Outdated
"native" => Ok(RunnerConfig::Native { num_threads: None }), | ||
"ray" => Ok(get_ray_runner_config_from_env()), | ||
"py" => Err(DaftError::ValueError("The PyRunner was removed from Daft from v0.5.0 onwards. Please set the env to `DAFT_RUNNER=native` instead.".to_string())), | ||
_ if detect_ray_state() => Ok(get_ray_runner_config_from_env()), |
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.
Remove this branch?
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.
This would change the behavior of tests when the user doesn't specify any runner at all (either through the helper function or the env).
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.
Maybe "" if detect_ray_state()
?
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.
I can have a warning or something though if the user specifies something other than ray but we detect ray state?
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.
hm I would say just error
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4458 +/- ##
==========================================
+ Coverage 77.49% 78.20% +0.70%
==========================================
Files 850 849 -1
Lines 114780 114967 +187
==========================================
+ Hits 88954 89912 +958
+ Misses 25826 25055 -771
🚀 New features to boost your workflow:
|
Changes Made
Remove the following triggers for the py-runner:
DAFT_RUNNER=py
daft.set_runner_py()
DAFT_ENABLE_NATIVE_EXECUTOR
and the associated configChecklist
docs/mkdocs.yml
navigation