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

adds Dict{Symbol,DataFrame} as input for performance_profile #54

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

Conversation

lrsantos11
Copy link
Contributor

Implemented according to #48 and with SolverBenchmark.jl as metioned by @tmigot

@codecov
Copy link

codecov bot commented Apr 6, 2021

Codecov Report

Merging #54 (3b6688f) into master (6717159) will decrease coverage by 3.63%.
The diff coverage is 45.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #54      +/-   ##
==========================================
- Coverage   94.96%   91.33%   -3.64%     
==========================================
  Files           4        4              
  Lines         139      150      +11     
==========================================
+ Hits          132      137       +5     
- Misses          7       13       +6     
Impacted Files Coverage Δ
src/BenchmarkProfiles.jl 100.00% <ø> (ø)
src/performance_profiles.jl 80.59% <45.45%> (-6.91%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6717159...3b6688f. Read the comment docs.

test/runtests.jl Outdated Show resolved Hide resolved
test/runtests.jl Outdated Show resolved Hide resolved
@abelsiqueira abelsiqueira requested a review from dpo April 7, 2021 18:01
src/performance_profiles.jl Outdated Show resolved Hide resolved
src/performance_profiles.jl Outdated Show resolved Hide resolved
src/performance_profiles.jl Outdated Show resolved Hide resolved
src/performance_profiles.jl Outdated Show resolved Hide resolved
test/runtests.jl Show resolved Hide resolved
Project.toml Show resolved Hide resolved
src/BenchmarkProfiles.jl Show resolved Hide resolved
Project.toml Outdated Show resolved Hide resolved
@dpo
Copy link
Member

dpo commented Apr 7, 2021

Do you have a really old branch that GitHub Actions aren’t running?

@lrsantos11
Copy link
Contributor Author

I don't now what to say. Sorry for that. I guess I cannot have, because I'm in a new computer. First folder in ~/.julia/dev.

@lrsantos11
Copy link
Contributor Author

lrsantos11 commented Apr 7, 2021

Is this related with some error onGR? See JuliaLang/julia#36617 (comment)

@abelsiqueira
Copy link
Member

Cirrus has been failing for a while, can we just remove it? @dpo

@lrsantos11, can you rebase this, it has conflicting files now.

@dpo
Copy link
Member

dpo commented Apr 8, 2021

Cirrus fails because I think the GR jll isn’t yet available there. For the tests, I really think we should just depend on UnicodePlots or some such. In fact, now that we can export the profile data without producing a plot, I wonder if we should make Plots optional and use Require.jl.

@abelsiqueira
Copy link
Member

Makes sense. Do you want to do that before this is merged?

@dpo
Copy link
Member

dpo commented Apr 9, 2021

Done in #58 (not fun to review).

@dpo
Copy link
Member

dpo commented Apr 13, 2021

@lrsantos11 would you mind rebasing this? It shouldn’t be too hard (famous last words).

@lrsantos11
Copy link
Contributor Author

@lrsantos11 would you mind rebasing this? It shouldn’t be too hard (famous last words).

I really think I did it in the last push. I asked @abelsiqueira but though I was done. Certanly not. Can you guys guide this newbee?

@dpo
Copy link
Member

dpo commented Apr 13, 2021

Yes but there have been new changes in master and now your PR has conflicts. You can do

git checkout master
git pull
git checkout dataframe
git rebase master
# now fix any conflicts

@abelsiqueira
Copy link
Member

We had other changes in #58 to fix the error in the Cirrus CI, and this has conflicts again. I can fix it though, I have it open right now.

lrsantos11 and others added 5 commits April 13, 2021 17:03
Co-authored-by: Dominique <dominique.orban@gmail.com>
Co-authored-by: Dominique <dominique.orban@gmail.com>
Co-authored-by: Dominique <dominique.orban@gmail.com>
Co-authored-by: Dominique <dominique.orban@gmail.com>
@abelsiqueira
Copy link
Member

Took longer than I hoped because of last-minute issues popping up for the classes of next semester, so naturally, something broke.

lrsantos11 and others added 4 commits April 13, 2021 17:18
Co-authored-by: Abel Siqueira <nepper271@gmail.com>
Co-authored-by: Abel Siqueira <nepper271@gmail.com>
Co-authored-by: Dominique <dominique.orban@gmail.com>
Co-authored-by: Dominique <dominique.orban@gmail.com>
@abelsiqueira
Copy link
Member

Ok, I've uncovered several things.

  • Plots only support Julia-1.3 up to version 1.6
  • Plots 1.6 has Reexport 0.2 as requirement
  • Some package requests Reexport 1.0, don't know which one, because DataFrames allows Reexport 0.2. But DataFrames has a lot of deps, so maybe one of those.
    The only solution I thought of is to drop Julia 1.3 and move the bound to 1.5. You guys have other ideas?

@abelsiqueira
Copy link
Member

I made a PR to this branch in your repo @lrsantos11. Instead of using Dict{Symbol, DataFrames}, your new method function would be based on a Dict{Symbol,<: Any} instead. @dpo what do you think?

@lrsantos11
Copy link
Contributor Author

I agree with @abelsiqueira. Just let me know @dpo if it is ok for you, then I can accept the PR and we can finally finish this.

@dpo
Copy link
Member

dpo commented Apr 13, 2021

Why not make DataFrames an optional dependency?

@@ -129,3 +129,26 @@ function performance_profile(b::AbstractBackend,
(x_plot, y_plot, max_ratio) = performance_profile_data(T, logscale=logscale, sampletol=sampletol, drawtol=drawtol)
performance_profile_plot(b, x_plot, y_plot, max_ratio, xlabel, ylabel, labels, title, logscale; kwargs...)
end

performance_profile(b::AbstractBackend, T :: Array{Tn,2}, labels :: Vector{S}; kwargs...) where {Tn <: Number, S <: AbstractString} =
performance_profile(b, convert(Array{Float64,2}, T), convert(Vector{AbstractString}, labels); kwargs...)
Copy link
Member

Choose a reason for hiding this comment

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

I removed this because it’s ambiguous. At some point I got a StackOverflow because of it. In addition, it’s not tested.

Examples of cost functions:
- `cost(df) = df.elapsed_time`: Simple `elapsed_time` cost. Assumes the solver solved the problem.
- `cost(df) = (df.status .!= :first_order) * Inf + df.elapsed_time`: Takes the status of the solver into consideration.
"""
Copy link
Member

Choose a reason for hiding this comment

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

Could we use the same docstring format as in the existing performance_profile?

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