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

fix: unified graph captions. #410

Merged
merged 11 commits into from
Nov 13, 2023
Merged

Conversation

emori-ctc
Copy link
Contributor

@emori-ctc emori-ctc commented Oct 27, 2023

Description

Related links

Notes for reviewers

Pre-review checklist for the PR author

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

  • The PR has been properly tested.
  • The PR has been reviewed.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • (Optional) The PR has been properly tested with CARET_report verification.
  • There are no open discussions or they are tracked via tickets.
  • The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

@emori-ctc emori-ctc changed the title feat: Unified graph captions. fix: Unified graph captions. Oct 27, 2023
@emori-ctc emori-ctc changed the title fix: Unified graph captions. fix: unified graph captions. Oct 27, 2023
@rokamu623 rokamu623 self-requested a review October 30, 2023 02:10
Copy link
Contributor

@rokamu623 rokamu623 left a comment

Choose a reason for hiding this comment

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

As shown below, the hoge case is also displayed when create_latency_timeseries is visualised.
bokeh_plot
The same applies for create_frequency_timeseries and create_period_timeseries.
Resolve this issue.

We also list two additional trivial mistake as follow:

target_objects = self._metrics.target_objects
data, y_labels = self._metrics.to_stacked_bar_data()
title: str = f"Stacked bar of '{getattr(target_objects, 'path_name')}'"
title: str = f'Stacked bar of Response Time --- {self._case} case ---'
Copy link
Contributor

Choose a reason for hiding this comment

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

Together with latency, etc., it should be lower-cased.

Suggested change
title: str = f'Stacked bar of Response Time --- {self._case} case ---'
title: str = f'Stacked bar of response time --- {self._case} case ---'

Comment on lines 65 to 66
title: str = f'Histogram of {data_type}'if self._case is None else\
f'histogram of {data_type} --- {self._case} case ---'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
title: str = f'Histogram of {data_type}'if self._case is None else\
f'histogram of {data_type} --- {self._case} case ---'
title: str = f'Timeseries of {data_type}'if self._case is None else\
f'Timeseries of {data_type} --- {self._case} case ---'

Signed-off-by: emb4 <[email protected]>
target_objects = self._metrics.target_objects
data, y_labels = self._metrics.to_stacked_bar_data()
title: str = f"Stacked bar of '{getattr(target_objects, 'path_name')}'"
title: str = f'Stacked bar of response Time --- {self._case} case ---'
Copy link
Contributor

@rokamu623 rokamu623 Nov 2, 2023

Choose a reason for hiding this comment

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

Not fixed.

Suggested change
title: str = f'Stacked bar of response Time --- {self._case} case ---'
title: str = f'Stacked bar of response_time --- {self._case} case ---'

Copy link
Contributor

@rokamu623 rokamu623 left a comment

Choose a reason for hiding this comment

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

Careless mistakes can still be found. Please fix.

@@ -214,7 +214,8 @@ def histogram(
raise NotImplementedError()

plot: Figure = Figure(
title=data_type if case is None else f'{data_type} --- {case} case ---',
title=f'Histogram of {data_type}'
if case is None else f'histogram of {data_type} --- {case} case ---',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if case is None else f'histogram of {data_type} --- {case} case ---',
if case is None else f'Histogram of {data_type} --- {case} case ---',

Copy link
Contributor

@rokamu623 rokamu623 left a comment

Choose a reason for hiding this comment

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

It is not compatible with bokeh 3.x.

x_axis_label=x_label, y_axis_label='Probability', width=800
title=f'Histogram of {data_type}'
if case is None else f'Histogram of {data_type} --- {case} case ---',
x_axis_label=x_label, y_axis_label='Probability', plot_width=800
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
x_axis_label=x_label, y_axis_label='Probability', plot_width=800
x_axis_label=x_label, y_axis_label='Probability', width=800

rokamu623
rokamu623 previously approved these changes Nov 8, 2023
Copy link
Contributor

@rokamu623 rokamu623 left a comment

Choose a reason for hiding this comment

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

LGTM!

@rokamu623 rokamu623 requested a review from isp-uetsuki November 8, 2023 04:34
@isp-uetsuki isp-uetsuki requested review from xygyo77 and removed request for isp-uetsuki November 8, 2023 05:02
Copy link
Contributor

@rokamu623 rokamu623 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@xygyo77 xygyo77 left a comment

Choose a reason for hiding this comment

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

LGTM
stacked_bar_bokeh_plot

@emori-ctc emori-ctc merged commit b2a3eda into tier4:main Nov 13, 2023
10 checks passed
xygyo77 pushed a commit to xygyo77/caret_analyze that referenced this pull request Nov 17, 2023
* Unified graph captions.

Signed-off-by: emb4 <[email protected]>

* Unified conditional branching of graph captions.

Signed-off-by: emb4 <[email protected]>

* Fixed flake8 errors.

Signed-off-by: emb4 <[email protected]>

* Point corrected.

Signed-off-by: emb4 <[email protected]>

* Corrected string notation.

Signed-off-by: emb4 <[email protected]>

* Corrected string notation.

Signed-off-by: emb4 <[email protected]>

* Corrected the points pointed out.

Signed-off-by: emb4 <[email protected]>

* Corrected caption.

Signed-off-by: emb4 <[email protected]>

* Corrected caption.

Signed-off-by: emb4 <[email protected]>

---------

Signed-off-by: emb4 <[email protected]>
xygyo77 added a commit that referenced this pull request Dec 11, 2023
* create_response_time_timeseries_plot() API for sim_time.

Signed-off-by: ISP akm <[email protected]>

* Add support sim_time to histogram APIs.

Signed-off-by: ISP akm <[email protected]>

* fix: unified graph captions. (#410)

* Unified graph captions.

Signed-off-by: emb4 <[email protected]>

* Unified conditional branching of graph captions.

Signed-off-by: emb4 <[email protected]>

* Fixed flake8 errors.

Signed-off-by: emb4 <[email protected]>

* Point corrected.

Signed-off-by: emb4 <[email protected]>

* Corrected string notation.

Signed-off-by: emb4 <[email protected]>

* Corrected string notation.

Signed-off-by: emb4 <[email protected]>

* Corrected the points pointed out.

Signed-off-by: emb4 <[email protected]>

* Corrected caption.

Signed-off-by: emb4 <[email protected]>

* Corrected caption.

Signed-off-by: emb4 <[email protected]>

---------

Signed-off-by: emb4 <[email protected]>

* chore(histogram): display number for Y-axis instead of probability (#430)

* chore(histogram): display number instead of probability

Signed-off-by: takeshi.iwanari <[email protected]>

* fix: change hover label

Signed-off-by: takeshi.iwanari <[email protected]>

---------

Signed-off-by: takeshi.iwanari <[email protected]>

* Add sim_time support to create_response_time_stacked_bar_plot() API

Signed-off-by: ISP akm <[email protected]>

* Histogram legends click policy is set to "hide"

Signed-off-by: ISP akm <[email protected]>

* Skip invalid records that are involved in sim_time conversion but are invalid.

Signed-off-by: ISP akm <[email protected]>

* ci(pre-commit): autofix

* chore: spell miss coverter->converter

Signed-off-by: ISP akm <[email protected]>

* fixed pytest errors

Signed-off-by: ISP akm <[email protected]>

* ci(pre-commit): autofix

* fixed pytest errors

Signed-off-by: ISP akm <[email protected]>

* fixed pytest errors

Signed-off-by: ISP akm <[email protected]>

* fixed pytest errors

Signed-off-by: ISP akm <[email protected]>

* fixed pytest errors

Signed-off-by: ISP akm <[email protected]>

* fixed pytest errors

Signed-off-by: ISP akm <[email protected]>

* ci(pre-commit): autofix

* fixed pytest errors

Signed-off-by: ISP akm <[email protected]>

* fixed pytest errors

Signed-off-by: ISP akm <[email protected]>

* add test codes

Signed-off-by: ISP akm <[email protected]>

* Reflection of PR comments (Part 1)

Signed-off-by: ISP akm <[email protected]>

* spelling convert->round_convert

Signed-off-by: ISP akm <[email protected]>

* Supported removal of _convert_timeseries_records_to_sim_time().

Signed-off-by: ISP akm <[email protected]>

* ci(pre-commit): autofix

* Add sim_time support to StackedBarPlot.to_dataframe.

Signed-off-by: ISP akm <[email protected]>

* Fixed pytest error.

Signed-off-by: ISP akm <[email protected]>

* Fixed pytest error.

Signed-off-by: ISP akm <[email protected]>

* Fixed pytest error.

Signed-off-by: ISP akm <[email protected]>

* Reflection of PR comments (Part 2)

Signed-off-by: ISP akm <[email protected]>

* Reflection of PR comments (Part 3)

Signed-off-by: ISP akm <[email protected]>

---------

Signed-off-by: ISP akm <[email protected]>
Signed-off-by: emb4 <[email protected]>
Signed-off-by: takeshi.iwanari <[email protected]>
Co-authored-by: emori-ctc <[email protected]>
Co-authored-by: iwatake <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
isp-uetsuki added a commit to isp-uetsuki/CARET_analyze that referenced this pull request Dec 27, 2023
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.

3 participants