-
Notifications
You must be signed in to change notification settings - Fork 4
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
Issue 340: Add a prefix to benchmarks #414
Conversation
Try this Pull Request!Open Julia and type: import Pkg
Pkg.activate(temp=true)
Pkg.add(url="https://github.com/CDCgov/Rt-without-renewal", rev="partial-issue340", subdir="EpiAware")
using EpiAware |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #414 +/- ##
=======================================
Coverage 93.57% 93.57%
=======================================
Files 54 54
Lines 560 560
=======================================
Hits 524 524
Misses 36 36 ☔ View full report in Codecov by Sentry. |
Annoyingly it looks like we might not get any transcient gradient warnings on this go which makes checking this really is working a bit of a pain! |
Doesn't seem wise to approve without a demonstration of it working in CI. Can you force it to warn and then fix it so we see a demonstration? |
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Rt-without-renewal/Rt-without-renewalJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Rt-without-renewal/Rt-without-renewalJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Rt-without-renewal/Rt-without-renewalJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
|
urggh checking... also it doesn't work :(. I think that this means it is calling the check after the suite has been constructed i.e in benchmarktools which is why wrapping |
So running this
locally it catches the depreciation warnings as you might expect but that showed no gradient warnings (the target of interest). Running that suite now to see if this is where they show up (vs when building the suite which was how I thought it was set up to work). I'm using this as I think this might be where gradient issues live but will also try some of the other submodules (this is worth doing anyway as it helps inform #340) |
So these are rendered stochastically when you make the suite and they are happening in the obs model (which is good to know for the future). It seems like they aren't actually warnings as expected hence not being caught |
Hmm weird but they definitely appear to be based on the output of the CI
|
Okay so locally I am seeing these (when they happen): Warnings from Model{typeof(generate_observations), (:obs_model, :y_t, :Y_t), (), (), Tuple{NegativeBinomialError{HalfNormal{Float64}}, Vector{Float64}, Vector{Float64}}, Tuple{}, DefaultContext}(EpiAware.EpiAwareBase.generate_observations, (obs_model = NegativeBinomialError{HalfNormal{Float64}}(HalfNormal{Float64}(μ=0.01)), y_t = [10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0], Y_t = [10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0]), NamedTuple(), DefaultContext()):
┌ Warning: There is disagreement in the log-density values!
└ @ TuringBenchmarking ~/.julia/packages/TuringBenchmarking/0wcdT/src/TuringBenchmarking.jl:268
┌ Warning: There is disagreement in the gradients!
└ @ TuringBenchmarking ~/.julia/packages/TuringBenchmarking/0wcdT/src/TuringBenchmarking.jl:275
┌ Warning: There is disagreement in the log-density values!
└ @ TuringBenchmarking ~/.julia/packages/TuringBenchmarking/0wcdT/src/TuringBenchmarking.jl:268
┌ Warning: There is disagreement in the gradients!
└ @ TuringBenchmarking ~/.julia/packages/TuringBenchmarking/0wcdT/src/TuringBenchmarking.jl:275 So that is good. I think they aren't showing in the Ci as the thing throwing the warning there is Also this is a good indication that this functionality is helping as we thought this implementation might be a problem but were not quite sure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As all potential reviewers are on AL self reviewing. Based on the output in benchmarks I think this is working as expected. Merging is low risk as this is the benchmark suite. There approving.
This PR partially addresses #340 by adding a prefix to any warnings produced by
make_turing_suite
based on the inputmodel
. This should help us locate potential issues more easily.@damonbayer if you have time to review this that would be great. We are looking at the output of the
benchmark
CI to see if it has worked.You can run the
prefix_warnings
wrapper using this example/In principle yes the code in benchmarks should also have tests but I think we can leave for now as I am hoping that the Turing devs put something better than this in upstream.