Skip to content

[data] fix master using double counting ref bundle + input_files as list - #61774

Merged
alexeykudinkin merged 1 commit into
ray-project:masterfrom
iamjustinhsu:jhsu/master-fix-3-16-2026
Mar 17, 2026
Merged

alexeykudinkin merged 1 commit into
ray-project:masterfrom
iamjustinhsu:jhsu/master-fix-3-16-2026

Conversation

@iamjustinhsu

Copy link
Copy Markdown
Contributor

Description

as titled, this #61059 caused ref bundles to be the same using the same object_ref, so used a unique one. Also, made the input_file to tuples over lists

Related issues

Additional information

@iamjustinhsu
iamjustinhsu requested a review from a team as a code owner March 16, 2026 22:03

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request addresses a double-counting issue with RefBundles and refactors the handling of input_files to centralize deduplication. The test fix for the double-counting issue appears correct by using unique object references. My main feedback is on the deduplication logic for input_files, where I've suggested a change to preserve file order, which can be important for deterministic behavior.

input_files = self._logical_plan.dag.infer_metadata().input_files
if input_files is None:
return None
return list(set(input_files))

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.

medium

Using set() for deduplication changes the order of input_files. If the order of files is important for deterministic data processing, this could lead to unexpected behavior. It's safer to preserve the order while removing duplicates.

You can use dict.fromkeys() to achieve this, which is also generally faster for deduplication.

Suggested change
return list(set(input_files))
return list(dict.fromkeys(input_files))

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.

this is what we are doing before, so not going to change this.

@iamjustinhsu iamjustinhsu added the go add ONLY when ready to merge, run all tests label Mar 16, 2026
@alexeykudinkin
alexeykudinkin enabled auto-merge (squash) March 16, 2026 22:59
@alexeykudinkin
alexeykudinkin merged commit b86462c into ray-project:master Mar 17, 2026
4 checks passed
Lucas61000 pushed a commit to Lucas61000/ray that referenced this pull request May 15, 2026
…ist (ray-project#61774)

## Description
as titled, this ray-project#61059 caused
ref bundles to be the same using the same object_ref, so used a unique
one. Also, made the input_file to tuples over lists

## Related issues

## Additional information

Signed-off-by: iamjustinhsu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants