Skip to content

docs: combine visualization backend examples - #6833

Merged
kAIto47802 merged 7 commits into
optuna:masterfrom
gen740:docs/improve_vilualization_example
Oct 9, 2026
Merged

kAIto47802 merged 7 commits into
optuna:masterfrom
gen740:docs/improve_vilualization_example

Conversation

@gen740

@gen740 gen740 commented Aug 28, 2026

Copy link
Copy Markdown
Member

Motivation

The visualization documentation currently separates Plotly and Matplotlib examples and uses Kaleido-based PNG scraping for Plotly thumbnails. This makes the documentation structure harder to navigate and adds an unnecessary Kaleido dependency to the documentation build.

The screenshots below show the unified visualization page, where the Plotly and Matplotlib examples can be switched using tabs.
スクリーンショット 2026-08-28 16 03 39

Description of the changes

  • Added combined visualization pages for Plotly and Matplotlib.
  • Added Plotly/Matplotlib tabs within each visualization page.
  • Organized the sidebar under API Reference > optuna.visualization.
  • Uses Matplotlib PNGs only for visualization thumbnails.
  • Removed the Plotly/Kaleido thumbnail scraper.
  • Removed Kaleido from the documentation dependencies.
  • Kept Plotly HTML rendering through Sphinx Gallery.
  • Added sphinx-design for the visualization cards.
  • No files under optuna/ were modified.

Validation

  • ruff check passed.
  • ruff format passed.
  • Sphinx HTML output was generated and verified to contain both Plotly and Matplotlib tabs.
  • The full local build is blocked only by the environment missing libomp.dylib, which affects existing LightGBM examples.

Checklist

  • I used an LLM while working on this PR.

@c-bata c-bata self-assigned this Aug 28, 2026
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

This pull request has not seen any recent activity.

@github-actions github-actions Bot added the stale Exempt from stale bot labeling. label Sep 6, 2026
@c-bata c-bata removed the stale Exempt from stale bot labeling. label Sep 8, 2026
@c-bata

c-bata commented Sep 11, 2026

Copy link
Copy Markdown
Member

@kAIto47802 Could you review this PR?

@kAIto47802

Copy link
Copy Markdown
Collaborator

Thank you for the PR. I noticed that the original download link for the example code are dropped in this change. Is this change intentional?
Screenshot_18-Sep_18-29-17_13750

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has not seen any recent activity.

@github-actions github-actions Bot added the stale Exempt from stale bot labeling. label Sep 27, 2026
@c-bata c-bata removed the stale Exempt from stale bot labeling. label Sep 30, 2026
@gen740

gen740 commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

Thank you for the review, and sorry for the late reply. I don’t think the download links are essential here, since this is an API reference rather than a tutorial. The examples are short enough to copy and paste directly.

@c-bata c-bata left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Given that image paths are hardcoded and we only use limited features of Sphinx Gallery, we should consider replacing it in the long run. But this change looks good for now!

LGTM.

@c-bata c-bata removed their assignment Oct 2, 2026
@c-bata c-bata added the document Documentation related. label Oct 2, 2026
@c-bata c-bata added this to the v5.1.0 milestone Oct 2, 2026
@kAIto47802

Copy link
Copy Markdown
Collaborator

Thank you for the comment. OK, I agree that these download links are not so important here.

@kAIto47802

kAIto47802 commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

I noticed two issues with the documentation links (highlighted with red boxes in the screenshots below):

  • API function references still point to the old backend-specific pages instead of the new unified pages with tabs.
  • The module references to optuna.visualization and optuna.visualization.matplotlib are rendered as plain text rather than clickable links.

I've put together an example fix here:

Applying these changes to this PR branch should resolve both issues.

Screenshot_07-Oct_17-05-35_26586_annotated Screenshot_07-Oct_17-04-39_14429_annotated Screenshot_07-Oct_17-03-36_2970_annotated

@gen740

gen740 commented Oct 9, 2026

Copy link
Copy Markdown
Member Author

@kAIto47802
Thank you for your review comments! I just merged your commits. PTAL!

@kAIto47802 kAIto47802 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for the update! LGTM

@kAIto47802
kAIto47802 merged commit 6281907 into optuna:master Oct 9, 2026
13 checks passed
@gen740
gen740 deleted the docs/improve_vilualization_example branch October 9, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

document Documentation related.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants