Skip to content

[Data] Separate test_auto_batch_size.py with integration and unit tests#62874

Merged
bveeramani merged 2 commits intoray-project:masterfrom
Hyunoh-Yeo:in-progress-61125-4
Apr 24, 2026
Merged

[Data] Separate test_auto_batch_size.py with integration and unit tests#62874
bveeramani merged 2 commits intoray-project:masterfrom
Hyunoh-Yeo:in-progress-61125-4

Conversation

@Hyunoh-Yeo
Copy link
Copy Markdown
Contributor

@Hyunoh-Yeo Hyunoh-Yeo commented Apr 23, 2026

Description

Splits test_auto_batch_size.py into unit and integration test files following the tests/unit/ convention.

Moved to tests/unit/ (5 tests):

  • test_compute_auto_batch_size_basic
  • test_compute_auto_batch_size_clamped_to_one
  • test_compute_auto_batch_size_returns_none (parametrized: empty_iterator, zero_rows)
  • test_compute_auto_batch_size_iterator_includes_peeked_block
  • test_auto_batches_respect_target_size

Remain in integration file (1 test):

  • test_map_batches_auto_correctness (uses ray_start_regular_shared, ray.data)

Related issues

Related to #61125

Additional information

Tests were classified by whether they use ray_start_* fixtures or make runtime ray.* calls — not by import paths, since the unit tests still import from ray.data._internal.* to exercise internal classes directly.

Signed-off-by: Hyunoh-Yeo <hyunoh.yeo@gmail.com>
@Hyunoh-Yeo Hyunoh-Yeo changed the title initial commit [Data] Separate test_auto_batch_size.py with integration and unit tests Apr 23, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request reorganizes the test suite by moving unit tests for auto_batch_size from python/ray/data/tests/test_auto_batch_size.py to a new dedicated unit test file at python/ray/data/tests/unit/test_auto_batch_size.py. I have no feedback to provide as there are no review comments and the changes are straightforward test relocations.

Signed-off-by: Hyunoh-Yeo <hyunoh.yeo@gmail.com>
@Hyunoh-Yeo Hyunoh-Yeo marked this pull request as ready for review April 23, 2026 17:49
@Hyunoh-Yeo Hyunoh-Yeo requested a review from a team as a code owner April 23, 2026 17:49
@ray-gardener ray-gardener Bot added data Ray Data-related issues community-contribution Contributed by the community labels Apr 23, 2026
@bveeramani bveeramani enabled auto-merge (squash) April 24, 2026 19:10
@github-actions github-actions Bot added the go add ONLY when ready to merge, run all tests label Apr 24, 2026
@bveeramani bveeramani merged commit f9d5aa9 into ray-project:master Apr 24, 2026
8 checks passed
pushpavanthar pushed a commit to pushpavanthar/ray that referenced this pull request Apr 25, 2026
…ts (ray-project#62874)

## Description

Splits `test_auto_batch_size.py` into unit and integration test files
following the `tests/unit/` convention.

Moved to `tests/unit/` (5 tests):

* `test_compute_auto_batch_size_basic`
* `test_compute_auto_batch_size_clamped_to_one`
* `test_compute_auto_batch_size_returns_none` (parametrized:
`empty_iterator`, `zero_rows`)
* `test_compute_auto_batch_size_iterator_includes_peeked_block`
* `test_auto_batches_respect_target_size`

Remain in integration file (1 test):

* `test_map_batches_auto_correctness` (uses `ray_start_regular_shared`,
`ray.data`)

## Related issues

Related to ray-project#61125

## Additional information

Tests were classified by whether they use `ray_start_*` fixtures or make
runtime `ray.*` calls — not by import paths, since the unit tests still
import from `ray.data._internal.*` to exercise internal classes
directly.

---------

Signed-off-by: Hyunoh-Yeo <hyunoh.yeo@gmail.com>
Signed-off-by: Purushotham Pushpavanth <pushpavanthar@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contributed by the community data Ray Data-related issues go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants