-
Notifications
You must be signed in to change notification settings - Fork 7k
[Data] Fix obj_store_mem_max_pending_output_per_task reporting #58864
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
Changes from 3 commits
206470a
c93ece0
97e57dd
523bb08
15d5118
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,10 @@ | |
| from ray.data._internal.execution.interfaces.ref_bundle import RefBundle | ||
| from ray.data._internal.memory_tracing import trace_allocation | ||
| from ray.data.block import BlockMetadata | ||
| from ray.data.context import ( | ||
| DEFAULT_TARGET_MAX_BLOCK_SIZE, | ||
| MAX_SAFE_BLOCK_SIZE_FACTOR, | ||
| ) | ||
|
|
||
| if TYPE_CHECKING: | ||
| from ray.data._internal.execution.interfaces.physical_operator import ( | ||
|
|
@@ -679,12 +683,18 @@ def obj_store_mem_max_pending_output_per_task(self) -> Optional[float]: | |
| return None | ||
|
|
||
| bytes_per_output = self.average_bytes_per_output | ||
| # If we don’t have a sample yet and the limit is “unlimited”, we can’t | ||
| # estimate – just bail out. | ||
| if bytes_per_output is None: | ||
| # If we don't have a sample yet, use target_max_block_size, but | ||
| # account for the fact that blocks can be up to | ||
| # MAX_SAFE_BLOCK_SIZE_FACTOR larger before being sliced. | ||
| if context.target_max_block_size is None: | ||
| return None | ||
| bytes_per_output = context.target_max_block_size | ||
| bytes_per_output = ( | ||
| DEFAULT_TARGET_MAX_BLOCK_SIZE * MAX_SAFE_BLOCK_SIZE_FACTOR | ||
| ) | ||
| else: | ||
| bytes_per_output = ( | ||
| context.target_max_block_size * MAX_SAFE_BLOCK_SIZE_FACTOR | ||
| ) | ||
|
Comment on lines
685
to
692
Contributor
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. The logic for determining target_block_size = context.target_max_block_size
if target_block_size is None:
target_block_size = DEFAULT_TARGET_MAX_BLOCK_SIZE
bytes_per_output = target_block_size * MAX_SAFE_BLOCK_SIZE_FACTOR |
||
|
|
||
| num_pending_outputs = context._max_num_blocks_in_streaming_gen_buffer | ||
| if self.average_num_outputs_per_task is not None: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.