-
Notifications
You must be signed in to change notification settings - Fork 9
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
Print Tree on Performance Data #118
Print Tree on Performance Data #118
Conversation
thicket/thicket.py
Outdated
} | ||
|
||
# Prep DataFrame by filling None rows in the "name" column with the node's name. | ||
slice_df["name"] = [n.frame["name"] for n in slice_df.index.get_level_values("node")] |
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.
@slabasan I just found that the filling method for missing rows, which puts "None" values in the name column for the missing rows does not work with tree. We can either revert this for just the name column or keep it as it is useful for functions like intersection
. The above line avoids the issue for the dataframe that is passed to tree.
We should make a decision on how we want to handle this and that should be a separate PR but for now it is in here.
2466dea
to
7f03c36
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.
Small changes, couple quick questions.
thicket/tests/conftest.py
Outdated
|
||
|
||
@pytest.fixture | ||
def rajaperf_july_2023(data_dir, tmpdir): |
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.
Do we still need to reference july2023 for the rajaperf data? Are these datafiles you are adding here already in thicket (thought we had merged in a PR with new datasets)?
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.
The PR is now updated to work with the unit test data that we merged. The merged data happened after this PR so thats why it was in here.
…icket.statsframe.dataframe
7f03c36
to
25038e2
Compare
Summary
tree()
now operates on theThicket.dataframe
tree()
. They are also the first unit tests to use the newest version of the rajaperf datarajaperf-july-2023
.Motivation
The current tree function operates on the
statsframe.dataframe
, which is convenient since it matches the structure that the underlying renderer (Hatchet) expects, since it will only have 1 index level. While convenient from the developer side, we have found this is not intuitive for users as they expect the tree function to use thedataframe
instead.This feature simulates the single-level structure by taking a slice on the dataframe. Supporting printing a tree on any form of a
Thicket.dataframe
(more than 1 index level) would require an additional feature to the renderer to support visualizing the multi-index data structure.