Benchmark select_best_assets - #1446
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## benchmark_examples #1446 +/- ##
=====================================================
Coverage ? 89.65%
=====================================================
Files ? 60
Lines ? 8568
Branches ? 8568
=====================================================
Hits ? 7682
Misses ? 562
Partials ? 324 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
alexdewar
left a comment
There was a problem hiding this comment.
This looks cool! Nothing to add really, except that it will be interesting to see how this changes with parallelisation 😄.
I suppose this would potentially make it a little harder to change the interface for select_best_assets as the benchmark will also need updating in that case, but I guess this is the kind of thing that LLMs are good at fixing anyway.
Also, might we want to verify that benchmarks at least compile and maybe run to completion as a CI workflow? Given that we won't be looking at the numbers in this context, we could possibly run it with a reduced number of iterations, if that's an option.
Let's do this as part of #1453 . There's a |
Co-authored-by: Alex Dewar <alexdewar@users.noreply.github.com>
|
Looks good! On board with this in principal, just a few comments:
|
I was reluctant to this complex setup, but for functions with complex inputs, there not that many options.
I agree. In Python it would be a piece of cake, but in rust things seem to be quite separated and I'm not sure how easy that would be. We could explore the options, though.
Indeed, that might happen. Just don't do anything else while doing the benchmarking 😅 . Jokes aside, we could explore the options, but it might be simpler to just re-run the benchmark if you spot a weird behaviour.
Yeah, probably not great making things public unless needed.
I haven't explored the options much. There were other plots in the report, and then you could access the individual reports for 1s, 2s, etc. maybe there is a more useful plot. I cannot check today, but can have a look tomorrow. |
Description
Very much Copilot's work, with me supervising, to be honest. As pointed out, the input to
select_best_assetsis very complicated, so I asked Copilot to create such in input starting from thetwo_outputsexample. Then, I elaborated making a sweep on the number of competing technologies. To avoid code duplication, some functions in MUSE2 were made public, but otherwise left unchanged.To run it use:
cargo bench --bench assetsOr for a quick run:
cargo bench --bench assets -- --quickOne of the outputs is the following plot, which as expected shows a linear dependency with the number of competting assets. When parallelize, we would - hopefully - see a different behaviour.
Fixes #1444
Type of change
Key checklist
$ cargo test$ cargo docpresent in the previous release
Further checks