BUG: Fix reading of NVTX and fix _match_caller_callee to work with re-indexed dataframes#147
Merged
lithomas1 merged 4 commits intohpcgroup:developfrom Apr 18, 2025
Merged
Conversation
…-indexed dataframes
Collaborator
Author
|
OK, I think I have a bug where this doesn't work with a filtered df. Solution is probably to rewrite this using loc. |
jhdavis8
approved these changes
Apr 17, 2025
lithomas1
commented
Apr 18, 2025
| assert np.isclose(norm.loc[61]["MPI_Comm_size"], 0.0) | ||
| assert np.isclose(norm.loc[61]["MPI_Comm_rank"], 0.0) | ||
| assert np.isclose(norm.loc[61]["MPI_Finalize"], 0.01614835) | ||
| assert_allclose(norm.loc[0]["int main(int, char**)"], 0.00299437, rtol=1e-05) |
Collaborator
Author
There was a problem hiding this comment.
assert_allclose is the cleaner/more recommended way for comparing numpy arrays.
I had to adjust the tolerances since assert_allclose uses stricter tolerances than isclose for some of them.
(I'm not sure how the expected numbers were acquired, but I'm guessing that some of them were rounded which would make us off by a little here).
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.
We were reading extraneous NVTX events (e.g. domain creation).
Modified to only read range events.
In _match_caller_callee, we should always be assigning to the list using integer indices, instead of the dataframe index.
(This is wrong when the dataframe index is not a range index going from 0...n, which happens after we select a subset of rows for example)