ray-project / ray-project/ray

[Data] Ray Data continues autoscaling even when pipeline is backpressured by iteration

Open
#45,331 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug data P1 triage
Dominant language
Python
Stars
43.9k
Forks
8.1k
PR merge metrics
PR metrics pending

Description

What happened + What you expected to happen

I'm doing training, and my compute config looks like this:
image

My cluster autoscales CPU nodes and eventually GPU nodes to process more data, even though my trainer doesn't need more data.

Versions / Dependencies

2.21

Reproduction script
import ray
import numpy as np
import time

def generate_block(row):
    return {"data": np.zeros((128 * 1024 * 1024,), dtype=np.uint8)}


ds = ray.data.range(1000, override_num_blocks=1000).map(generate_block)
for block in ds.iter_batches(batch_size=None):
    time.sleep(5)
image image
Issue Severity

Medium: It is a significant difficulty but I can work around it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproduction script using ray.data.range, map, and iter_batches, then trace how Data iteration applies backpressure while autoscaling. Confirm the behavior with the provided slow-consumer example and define done as preventing unnecessary CPU or GPU node scaling while the pipeline is backpressured.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
data-engineering, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.