Skip to content

Add rotate option to profile_solvers layout#201

Merged
dpo merged 8 commits into
JuliaSmoothOptimizers:mainfrom
arnavk23:fix-issue-115-rotate-profiles
May 11, 2026
Merged

Add rotate option to profile_solvers layout#201
dpo merged 8 commits into
JuliaSmoothOptimizers:mainfrom
arnavk23:fix-issue-115-rotate-profiles

Conversation

@arnavk23
Copy link
Copy Markdown
Contributor

@arnavk23 arnavk23 commented Apr 4, 2026

@dpo @tmigot
Fixes #115

arnavk23 added 3 commits April 4, 2026 09:30
…bjects directly. It now asserts size(p.layout.grid) == (4, 2) for the default layout and (2, 4) for rotate = true, which is stable and avoids the false failure I saw in CI.
Copilot AI review requested due to automatic review settings April 4, 2026 05:55
@arnavk23 arnavk23 changed the title Add rotate option to profile_solvers layout Add rotate option to profile_solvers layout Apr 4, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a rotate keyword to profile_solvers to allow swapping the layout orientation of the generated profile grid.

Changes:

  • Introduce rotate::Bool = false to profile_solvers and adjust layout/size computation accordingly.
  • Document the new rotate keyword in the profile_solvers docstring.
  • Update test/profiles.jl to exercise rotate = true.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/profiles.jl Adds rotate keyword and uses it to compute plot grid dimensions and figure size.
test/profiles.jl Calls profile_solvers with rotate = true as part of smoke testing plot generation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/profiles.jl
Comment thread src/profiles.jl
@arnavk23
Copy link
Copy Markdown
Contributor Author

arnavk23 commented Apr 4, 2026

SolverBenchmark.jl> julia --project -e "using Plots; p = plot(rand(2), rand(2), layout=(2,1)); println(typeof(p)); println(fieldnames(typeof(p))); println(hasproperty(p, :layout)); println(getproperty(p, :layout));"
Plots.Plot{Plots.GRBackend}
(:backend, :n, :attr, :series_list, :o, :subplots, :spmap, :layout, :inset_subplots, :init)
true
Plots.GridLayout(2, 1)

Comment thread src/profiles.jl Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.22%. Comparing base (4c0fcd2) to head (c1cae5c).
⚠️ Report is 42 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #201       +/-   ##
===========================================
+ Coverage   76.71%   87.22%   +10.51%     
===========================================
  Files          12       10        -2     
  Lines         292      321       +29     
===========================================
+ Hits          224      280       +56     
+ Misses         68       41       -27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dpo
Copy link
Copy Markdown
Member

dpo commented Apr 7, 2026

@arnavk23 Could you please show an example of a plot with rotate = true and false ?

@arnavk23
Copy link
Copy Markdown
Contributor Author

arnavk23 commented Apr 9, 2026

@dpo Seeing
At rotate = false
profile_rotate_false
At rotate = true
profile_rotate_true

@tmigot tmigot requested a review from dpo April 18, 2026 14:50
Copy link
Copy Markdown
Member

@dpo dpo 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. When rotate = true, the titles are misplaced. Which plots are for elapsed time, and which are for evaluations?

@arnavk23
Copy link
Copy Markdown
Contributor Author

@dpo Updated plot
profile_rotate_true

@dpo
Copy link
Copy Markdown
Member

dpo commented Apr 26, 2026

I think the titles are still in weird places:

  • "Within this factor of ..." is lost by itself all the way to the right;
  • "Proportion of ..." looks like a bug in the middle of the grid and covers part of the plot and/or legend box.

I think

  • "Within this factor of ..." should appear below the x-axis of all plots in the bottom row;
  • "Proportion of ..." should appear along the y-axis of the two leftmost plots only;
  • I guess the titles "Elapsed time" and "Iterations" should also appear along the y-axis of the two leftmost plots only, but somehow clearly look like a title and not the legend of the axis.

@arnavk23
Copy link
Copy Markdown
Contributor Author

@dpo
profile_rotate_true

Copy link
Copy Markdown
Member

@dpo dpo 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! I think it looks alright now.

@dpo dpo merged commit ddd93f0 into JuliaSmoothOptimizers:main May 11, 2026
20 checks passed
@arnavk23 arnavk23 deleted the fix-issue-115-rotate-profiles branch May 11, 2026 03:24
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.

Rotate performances profiles

4 participants