Skip to content
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

Merged
merged 23 commits into from
Apr 8, 2024

Conversation

michaelmckinsey1
Copy link
Collaborator

@michaelmckinsey1 michaelmckinsey1 commented Dec 8, 2023

Summary

  • tree() now operates on the Thicket.dataframe
  • Unit tests have been added for tree(). They are also the first unit tests to use the newest version of the rajaperf data rajaperf-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 the dataframe 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.

@michaelmckinsey1 michaelmckinsey1 added area-visualization Issues and PRs involving any of Thicket's provided visualizations area-thicket Issues and PRs involving Thicket's core Thicket datastructure and associated classes priority-normal Normal priority issues and PRs status-ready-for-review This PR is ready to be reviewed by assigned reviewers type-feature Requests for new features or PRs which implement new features labels Dec 8, 2023
}

# 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")]
Copy link
Collaborator Author

@michaelmckinsey1 michaelmckinsey1 Dec 14, 2023

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.

@michaelmckinsey1 michaelmckinsey1 changed the title Print Tree on DataFrame Print Tree on Performance Data Mar 22, 2024
Copy link
Collaborator

@slabasan slabasan left a 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/external/console.py Show resolved Hide resolved


@pytest.fixture
def rajaperf_july_2023(data_dir, tmpdir):
Copy link
Collaborator

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)?

Copy link
Collaborator Author

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.

Michael Richard McKinsey and others added 3 commits April 5, 2024 15:06
@michaelmckinsey1 michaelmckinsey1 force-pushed the feature-dataframe_tree branch from 7f03c36 to 25038e2 Compare April 5, 2024 20:16
@slabasan slabasan merged commit 7019ed1 into LLNL:develop Apr 8, 2024
4 checks passed
@michaelmckinsey1 michaelmckinsey1 deleted the feature-dataframe_tree branch April 9, 2024 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-thicket Issues and PRs involving Thicket's core Thicket datastructure and associated classes area-visualization Issues and PRs involving any of Thicket's provided visualizations priority-normal Normal priority issues and PRs status-ready-for-review This PR is ready to be reviewed by assigned reviewers type-feature Requests for new features or PRs which implement new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants