Repository navigation
[data] fix master using double counting ref bundle + input_files as list - #61774
Conversation
Signed-off-by: iamjustinhsu <[email protected]>
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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.
| return list(set(input_files)) | |
| return list(dict.fromkeys(input_files)) |
There was a problem hiding this comment.
this is what we are doing before, so not going to change this.
…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]>
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