-
-
Notifications
You must be signed in to change notification settings - Fork 719
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
Shuffle metrics 2/4: Add background metrics #8365
Conversation
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 27 files ± 0 27 suites ±0 11h 40m 34s ⏱️ + 2m 18s For more details on these failures, see this check. Results for commit faa5bd7. ± Comparison against base commit 4d41d32. ♻️ This comment has been updated with latest results. |
size += s | ||
self.sizes[part_id] -= s | ||
except IndexError: | ||
break |
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.
pretty sure this is a SyntaxError
since the break
is outside a loop
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.
I'm a bit confused how this isn't lighting up CI
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.
because it breaks the inner while size < self.max_message_size:
, not the outer one
distributed/shuffle/_disk.py
Outdated
else: | ||
# Unserialized numpy arrays | ||
with context_meter.meter("serialize", func=thread_time): | ||
frames = list(concat(pickle_bytelist(shard) for shard in shards)) |
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.
I imagine this list
call could have a non-trivial impact on performance since it forces the entire list of shards to be serialized and the serialized bytes to be retained before anything is written to disk, doesn't it?
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.
In theory, yes.
In practice, no, because it uses pickle buffers. There shouldn't be any use cases where the buffer will be temporarily deep-copied (as we do not cater for object dtypes). So the only thing that will be temporarily kept in memory is the pickle metadata, which is always trivial (~120 bytes per shard, while the worst use case we currently care to monitor is 8 kiB worth of buffer per shard).
This said, I reworked the code to remove the list, so that we avoid any and all doubts.
7309237
to
ef0b8fe
Compare
reverted |
9fe4b2e
to
d7d8558
Compare
00d5f57
to
a0a0f03
Compare
ac648fd
to
8fc2f5e
Compare
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.
Thanks, @crusaderky!
0b80228
to
faa5bd7
Compare
faa5bd7
to
4d92aff
Compare
Please read: #7943 (comment)
There are two commits in this PR. All but the last are the previous PRs in the chain.