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

Visualization #62

Merged
merged 24 commits into from
Mar 10, 2024
Merged

Visualization #62

merged 24 commits into from
Mar 10, 2024

Conversation

stroblme
Copy link
Member

@stroblme stroblme commented Nov 13, 2023

This PR fixes logscales in heatmaps (closes #49) by applying log_2 and log_10 on the axis data respectively and removes redundant code in the visualization node.
It further introduces some recommendations for title and axis labeling.
Also Plotly version was bumped to the latest one available.

Depends on #61

Signed-off-by: lc3267 <melvin.strobl@kit.edu>
Signed-off-by: lc3267 <melvin.strobl@kit.edu>
Signed-off-by: lc3267 <melvin.strobl@kit.edu>
Signed-off-by: lc3267 <melvin.strobl@kit.edu>
Signed-off-by: lc3267 <melvin.strobl@kit.edu>
Signed-off-by: lc3267 <melvin.strobl@kit.edu>
Signed-off-by: lc3267 <melvin.strobl@kit.edu>
Signed-off-by: lc3267 <melvin.strobl@kit.edu>
Signed-off-by: lc3267 <melvin.strobl@kit.edu>
Signed-off-by: lc3267 <melvin.strobl@kit.edu>
Signed-off-by: lc3267 <melvin.strobl@kit.edu>
Signed-off-by: lc3267 <melvin.strobl@kit.edu>
@pep8speaks
Copy link

pep8speaks commented Nov 13, 2023

Hello @stroblme! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2024-02-13 13:45:04 UTC

@stroblme stroblme requested review from a team, eileen-kuehn and cDenius and removed request for a team November 13, 2023 15:28
Signed-off-by: lc3267 <melvin.strobl@kit.edu>
Signed-off-by: lc3267 <melvin.strobl@kit.edu>
Signed-off-by: lc3267 <melvin.strobl@kit.edu>
Signed-off-by: lc3267 <melvin.strobl@kit.edu>
Signed-off-by: lc3267 <melvin.strobl@kit.edu>
Signed-off-by: lc3267 <melvin.strobl@kit.edu>
@stroblme stroblme requested review from a team and removed request for eileen-kuehn, cDenius and a team November 21, 2023 20:13
@stroblme stroblme requested a review from a team November 30, 2023 10:08
@stroblme stroblme requested review from eileen-kuehn and cDenius and removed request for a team November 30, 2023 10:08
Copy link
Member

@eileen-kuehn eileen-kuehn left a comment

Choose a reason for hiding this comment

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

I left some minor comments, so please check.
Otherwise the poetry.lock has diverged and needs to be updated.

@@ -28,42 +28,48 @@ class design:
qual_main = px.colors.qualitative.Dark2 # set1
qual_second = px.colors.qualitative.Pastel2 # pastel1

seq_main = px.colors.sequential.Viridis # pastel1
seq_main = px.colors.sequential.thermal # pastel1
Copy link
Member

Choose a reason for hiding this comment

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

What does the "pastel1" comment mean?

Copy link
Member Author

Choose a reason for hiding this comment

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

just another option ;)

Copy link
Member Author

Choose a reason for hiding this comment

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

added more descriptive comment, will resolve with #85

@@ -111,6 +117,145 @@ def extract_framework_name_from_id(identifier):
return identifier.replace("fw", "").capitalize().replace("_", " ")


def heatmap_viz(x, y, z, z_title, x_title, log_x, y_title, log_y, plot_title):
Copy link
Member

Choose a reason for hiding this comment

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

It might be helpful to add the data types for the different parameters. Just from reading the code I am currently guessing, that log_x and log_y might be boolean.

Copy link
Member Author

Choose a reason for hiding this comment

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

resolved

Comment on lines +291 to +292
plot_title=f"{framework_name} @ {q} Qubits: "
f"Circuit Depth and # of Shots",
Copy link
Member

Choose a reason for hiding this comment

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

Usually one needs plots without a title (e.g. for publications). So you might consider naming the plots accordingly, so that one is free to add a title with a preferred tool or to also have a flag to decide on how the title should be handled.

Copy link
Member Author

Choose a reason for hiding this comment

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

agree, propose to resolve that in a separate PR -> created issue #84

Comment on lines +447 to 450
# those two color sets are well suited as they correspond regarding
# their color value but differ from their luminosity and saturation values
main_colors_it = iter(design.qual_main)
sec_colors_it = iter(design.qual_second)
Copy link
Member

Choose a reason for hiding this comment

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

You are using the color sets at different places, so you might consider having a function to get your current color set.

Copy link
Member Author

Choose a reason for hiding this comment

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

the idea here is to have a class where the colors are specified and then just refer to the corresponding name later in the code. But I would suggest to move those "hard-coded" parameters to kedro parameters anyway. Thus I propose resolving this in a separate PR -> created issue #85

stroblme and others added 3 commits January 17, 2024 10:31
Co-authored-by: Eileen Kuehn <eileen.kuehn@kit.edu>
Co-authored-by: Eileen Kuehn <eileen.kuehn@kit.edu>
Signed-off-by: lc3267 <melvin.strobl@kit.edu>
Signed-off-by: lc3267 <melvin.strobl@kit.edu>
@stroblme
Copy link
Member Author

Thanks for your review @eileen-kuehn . Fixed some of the issues mentioned in the comments but also shifted some to be resolved in other PRs/Issues because it would introduce further modifications of pipeline+parameters which I would like to see in a separate, clean PR

@stroblme stroblme merged commit c121069 into main Mar 10, 2024
@stroblme stroblme deleted the visualization branch March 10, 2024 16:29
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.

axis scaling issue in heatmaps when using log data
3 participants