feat!: Add the ability to probe a data_batch#77
Draft
dhruv9vats wants to merge 1 commit intoNVIDIA:mainfrom
Draft
feat!: Add the ability to probe a data_batch#77dhruv9vats wants to merge 1 commit intoNVIDIA:mainfrom
data_batch#77dhruv9vats wants to merge 1 commit intoNVIDIA:mainfrom
Conversation
johanpel
suggested changes
Mar 5, 2026
| * while this executes. Primarily intended for bookkeeping purposes. | ||
| */ | ||
| virtual void state_transitioned_to([[maybe_unused]] const batch_state& new_state, | ||
| [[maybe_unused]] const uint64_t& batch_id, |
There was a problem hiding this comment.
Suggested change
| [[maybe_unused]] const uint64_t& batch_id, | |
| [[maybe_unused]] uint64_t batch_id, |
should be trivial to copy (and more of these below)
| virtual void state_transitioned_to([[maybe_unused]] const batch_state& new_state, | ||
| [[maybe_unused]] const uint64_t& batch_id, | ||
| [[maybe_unused]] const idata_representation& data, | ||
| [[maybe_unused]] const size_t& processing_count, |
There was a problem hiding this comment.
Suggested change
| [[maybe_unused]] const size_t& processing_count, | |
| [[maybe_unused]] size_t processing_count, |
| [[maybe_unused]] const uint64_t& batch_id, | ||
| [[maybe_unused]] const idata_representation& data, | ||
| [[maybe_unused]] const size_t& processing_count, | ||
| [[maybe_unused]] const size_t& task_created_count) |
There was a problem hiding this comment.
Suggested change
| [[maybe_unused]] const size_t& task_created_count) | |
| [[maybe_unused]] size_t task_created_count) |
| std::unique_ptr<idata_batch_probe> probe) | ||
| : _batch_id(batch_id), _data(std::move(data)), _probe(std::move(probe)) | ||
| { | ||
| std::lock_guard<std::mutex> lock(_mutex); |
There was a problem hiding this comment.
Nit: shouldn't technically be necessary if update_state_to had a lockless variant
data_batchdata_batch
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Introduces an interface
idata_batch_probethat can used to probe the state of adata_batchat different points in time, currently when thebatch_stateof thedata_batchchanges. Useful to see howdata_batches are working in a system.