Skip to content

Conversation

srilman
Copy link
Contributor

@srilman srilman commented May 30, 2025

Changes Made

Remove the following triggers for the py-runner:

  • DAFT_RUNNER=py
  • daft.set_runner_py()
  • DAFT_ENABLE_NATIVE_EXECUTOR and the associated config
  • Also removed any remaining code and testing for the pyrunner

Checklist

  • Documented in API Docs (if applicable)
  • Documented in User Guide (if applicable)
  • If adding a new documentation page, doc is added to docs/mkdocs.yml navigation
  • Documentation builds and is formatted properly (tag @/ccmao1130 for docs review)

@github-actions github-actions bot added the chore label May 30, 2025
@@ -1,80 +0,0 @@
name: Run property based tests with Hypothesis
Copy link
Contributor Author

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

Copy link
Member

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:
Copy link
Contributor Author

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?

Copy link
Member

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;
Copy link
Contributor Author

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'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used by pyrunner only

"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")))
Copy link
Contributor Author

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

@srilman srilman marked this pull request as ready for review May 30, 2025 20:54
@srilman srilman requested a review from kevinzwang May 30, 2025 20:54
@@ -1,80 +0,0 @@
name: Run property based tests with Hypothesis
Copy link
Member

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:
Copy link
Member

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

"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()),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this branch?

Copy link
Contributor Author

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).

Copy link
Member

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()?

Copy link
Contributor Author

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?

Copy link
Member

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

Copy link

codecov bot commented May 30, 2025

Codecov Report

Attention: Patch coverage is 64.70588% with 6 lines in your changes missing coverage. Please review.

Project coverage is 78.20%. Comparing base (25ee6fb) to head (f2bc89d).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/daft-context/src/lib.rs 76.92% 3 Missing ⚠️
src/daft-context/src/python.rs 0.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            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     
Files with missing lines Coverage Δ
daft/context.py 78.94% <ø> (-1.06%) ⬇️
daft/runners/runner.py 77.41% <100.00%> (ø)
src/common/daft-config/src/lib.rs 82.92% <ø> (+0.82%) ⬆️
src/common/daft-config/src/python.rs 64.68% <ø> (+0.63%) ⬆️
src/daft-py-runners/src/lib.rs 81.55% <ø> (+2.81%) ⬆️
src/daft-context/src/lib.rs 80.31% <76.92%> (+1.12%) ⬆️
src/daft-context/src/python.rs 68.31% <0.00%> (+1.06%) ⬆️

... and 22 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@srilman srilman enabled auto-merge (squash) May 30, 2025 22:00
@srilman srilman disabled auto-merge May 30, 2025 22:00
@srilman srilman merged commit b1ffba9 into main May 31, 2025
48 of 49 checks passed
@srilman srilman deleted the slade/remove-py-runner branch May 31, 2025 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants