Skip to content

feat(ray-data): add scheduler observability - #2293

Merged
praateekmahajan merged 4 commits into
NVIDIA-NeMo:mainfrom
praateekmahajan:nmcur-214
Aug 7, 2026
Merged

praateekmahajan merged 4 commits into
NVIDIA-NeMo:mainfrom
praateekmahajan:nmcur-214

Conversation

@praateekmahajan

@praateekmahajan praateekmahajan commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Adds an opt-in Ray 2.56.1 runtime shim that writes Ray Data scheduling decisions to session logs without requiring a patched wheel.

Tests: 26 Ray Data backend tests passed in Docker.

@copy-pr-bot

copy-pr-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

Signed-off-by: Praateek <praateekm@gmail.com>
@praateekmahajan praateekmahajan changed the title NMCUR-214: Add Ray Data scheduler observability feat(ray-data): add scheduler observability Aug 4, 2026
Comment on lines +136 to +139
_install_resource_admission_diagnostics(resource_manager_module, resource_policy_module)
_install_downstream_capacity_diagnostics(downstream_policy_module)
_install_scheduling_reasons(executor_state_module)
_install_actor_autoscaling_diagnostics(autoscaler_module)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@weijiac0619 main 4 new additions

Signed-off-by: Praateek <praateekm@gmail.com>
Signed-off-by: Praateek <praateekm@gmail.com>
weijiac0619 added a commit that referenced this pull request Aug 5, 2026
1. Deadlock prevention (liveness guarantee): when all ops are blocked
   and no tasks running, Ray Data bypasses backpressure to prevent
   deadlock -- tasks can dispatch even when scheduling_reason shows block

2. scheduling_reason clarification: no_actor_slot and
   operator_cannot_accept_input come from operator slot availability
   (op.can_add_input()), not from any backpressure policy

3. Document execution_resource_fields pattern: each resource group
   (allocation, usage, remaining_budget) emits _cpu/_gpu/_heap_memory/
   _object_store_memory; note GPU pipelines need _gpu/_object_store variants

4. Add missing remaining_budget_heap_memory to
   ray_data_resource_budget_admission table

5. initial_size defaults to min_size when not specified

6. Add target_max_block_size to tuning knobs (default 128MB);
   critical for Curator video/embedding pipelines where large
   per-item payloads drive object store pressure and the
   pending_output_exceeds_object_store_budget throttle

Signed-off-by: Weijia Chen <weijiac@nvidia.com>
@praateekmahajan
praateekmahajan marked this pull request as ready for review August 6, 2026 17:16
@greptile-apps

greptile-apps Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds an opt-in runtime shim for Ray 2.56.1 that records Ray Data resource-admission, downstream-backpressure, scheduling, and actor-autoscaling decisions in Ray session logs.

  • Installs version-gated, idempotent driver-side hooks when diagnostics are enabled.
  • Enables diagnostics by default for benchmark runs and reports unsupported Ray versions.
  • Adds formatting, installation, and end-to-end session-log tests.

Confidence Score: 5/5

The PR appears safe to merge with no concrete blocking or independently actionable non-blocking issues identified.

The version and opt-in guards constrain the private-API shim appropriately, and the investigated hooks preserve Ray’s scheduling, backpressure, and actor-scaling decisions while adding diagnostic logging.

Important Files Changed

Filename Overview
nemo_curator/backends/ray_data/diagnostics.py Adds the version-gated runtime hooks and structured diagnostic events while preserving the underlying scheduling and scaling decisions.
nemo_curator/backends/ray_data/executor.py Installs diagnostics before Ray Data execution and warns when an enabled shim is unsupported.
benchmarking/run.py Enables scheduler diagnostics by default for benchmark processes without overriding an explicit environment setting.
tests/backends/ray_data/test_diagnostics.py Covers event formatting, opt-in and idempotent installation, and emission of all diagnostic event families to the Ray session log.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Env["Diagnostics environment variable"] --> Executor["RayDataExecutor.execute"]
  Executor --> Installer["Install Ray 2.56.1 runtime hooks"]
  Installer --> Admission["Resource admission hook"]
  Installer --> Backpressure["Downstream backpressure hook"]
  Installer --> Scheduling["Scheduling-reason hook"]
  Installer --> Autoscaling["Actor autoscaling hook"]
  Admission --> Logs["Ray Data session log"]
  Backpressure --> Logs
  Scheduling --> Autoscaling
  Autoscaling --> Logs
Loading

Reviews (1): Last reviewed commit: "Merge branch 'main' into nmcur-214" | Re-trigger Greptile

@praateekmahajan
praateekmahajan enabled auto-merge (squash) August 6, 2026 17:34

@weijiac0619 weijiac0619 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! Awesome work on this, thanks!

@praateekmahajan
praateekmahajan merged commit a4470c6 into NVIDIA-NeMo:main Aug 7, 2026
49 of 50 checks passed
tromanski-nv pushed a commit to tromanski-nv/Curator that referenced this pull request Sep 14, 2026

This branch was previously deployed

2 inactive deployments
nemo-ci — 7553be35 Deployed Aug 6, 2026 by copy-pr-bot[bot] via L0_Unit_Test_GPU-image #5173
test — 7553be35 Deployed Aug 6, 2026 by copy-pr-bot[bot] via cicd-wait-in-queue #5173
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants