-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Data] Deprecate Dataset.get_internal_block_refs()
#46455
Merged
bveeramani
merged 29 commits into
ray-project:master
from
scottjlee:0705-get_internal_block_refs
Jul 11, 2024
Merged
Changes from 26 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
c313a52
add iter_internal_block_refs
scottjlee 09b905d
Merge branch 'master' into 0701-count
scottjlee 5ef8041
return iterator over refbundles
scottjlee 172e423
Merge branch '0701-count' of https://github.com/scottjlee/ray into 07…
scottjlee 374898b
fix docs
scottjlee b0ec894
update consumption api usage
scottjlee f0b49f1
fix
scottjlee aa368d4
clean up
scottjlee ab8d6ed
comments
scottjlee 128614d
comments
scottjlee 65c3f4e
lint
scottjlee 7956f35
Merge branch 'master' into 0701-count
scottjlee 958d306
fix tests
scottjlee d6a1d79
Merge branch '0701-count' of https://github.com/scottjlee/ray into 07…
scottjlee 87151ee
update tests
scottjlee 6d15acd
replace get_internal_block_refs usages
scottjlee 3e4d9b0
add deprecation warning
scottjlee 3ea9759
Merge branch 'master' into 0701-count
scottjlee b6df226
snapshot metadata only
scottjlee 70f82de
clean up
scottjlee 97d177b
Merge branch '0701-count' into 0705-get_internal_block_Refs
scottjlee f520c62
update parquet test
scottjlee 629d6bb
only cache metadata once iteration terminates
scottjlee 1abdb63
Merge branch '0701-count' into 0705-get_internal_block_refs
scottjlee 7c2710a
log deprecation warning
scottjlee 52944e9
Merge branch 'master' into 0705-get_internal_block_refs
scottjlee a6e99c2
clean up
scottjlee fc0a334
comments
scottjlee 615b03a
Merge branch 'master' into 0705-get_internal_block_refs
scottjlee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from dataclasses import dataclass | ||
from typing import List, Optional, Tuple | ||
from typing import Iterator, List, Optional, Tuple | ||
|
||
import ray | ||
from .common import NodeIdStr | ||
|
@@ -59,7 +59,7 @@ def __setattr__(self, key, value): | |
object.__setattr__(self, key, value) | ||
|
||
@property | ||
def block_refs(self) -> List[BlockMetadata]: | ||
def block_refs(self) -> List[ObjectRef[Block]]: | ||
"""List of block references in this bundle.""" | ||
return [block_ref for block_ref, _ in self.blocks] | ||
|
||
|
@@ -125,3 +125,12 @@ def __hash__(self) -> int: | |
|
||
def __len__(self) -> int: | ||
return len(self.blocks) | ||
|
||
|
||
def _ref_bundles_iterator_to_block_refs_list( | ||
ref_bundles: Iterator[RefBundle], | ||
) -> List[ObjectRef[Block]]: | ||
"""Convert an iterator of RefBundles to a list of object references to Blocks.""" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Change to "Convert an iterator of RefBundles to a list of Block object references." to avoid the double to, for a sec thought this was a double transformation. |
||
return [ | ||
block_ref for ref_bundle in ref_bundles for block_ref in ref_bundle.block_refs | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix incorrect typehint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice