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

update plot scripts to work with Python 3 changes; improve heatmap legibility #10

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

milthorpe
Copy link

Use a portable interpreter line for Python 3
Update in line with Numpy, Matplotlib, Pandas deprecations and removals
Use a data-dependent (rather than fixed) heatmap size
Return 0 for geomean if any input is 0 (previously, would crash for Python versions < 3.13)
Don't display decimal point in heatmap for integer values
Use viridis in heatmap for colourblind viewing
Display percentages in heatmap to one decimal place

@milthorpe
Copy link
Author

Thanks for making your performance portability framework public; I found it exceedingly useful in replicating your work on different hardware! I made a few changes to the plotting scripts (included in this PR) which I hope you'll agree are improvements.

Copy link
Contributor

@Pennycook Pennycook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for using the scripts, and for proposing changes!

You might also be interested in our efforts over at https://github.com/intel/p3-analysis-library; we've basically been trying to turn some of these scripts into a library, and it contains a few improvements (to the cascade plots in particular).

Comment on lines 109 to +111
# Set color map to match blackbody, growing brighter for higher values
colors = "gist_heat"
fig.set_figwidth(fig.get_figwidth() / 5 * len(l))
colors = "viridis"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the comment above this still accurate?

Comment on lines +19 to +21
if 0 in n:
return 0
return geometric_mean(n)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously this branch was being used to prevent geometric_mean from being imported with Python versions that didn't exist. I don't think this new code will work with older Python versions. That may be okay, but I'm not sure what @tomdeakin plans for compatibility here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants