Skip to content

Asv benchmarks for cellfinder workflow#18

Closed
sfmig wants to merge 19 commits intomainfrom
smg/cellfinder-wf1-benchmark
Closed

Asv benchmarks for cellfinder workflow#18
sfmig wants to merge 19 commits intomainfrom
smg/cellfinder-wf1-benchmark

Conversation

@sfmig
Copy link
Collaborator

@sfmig sfmig commented Sep 22, 2023

This PR adds asv benchmarks to time the workflow defined in #15

The benchmarks time the full workflow and also its individual steps. They are grouped under classes: the time_ methods of one class share setup and teardown functions and other benchmark attributes.

Some points where feedback is welcome:

  • I am not sure we really need a teardown function after each benchmark.... 🤔 (right now it just removes the cellfinder-benchmark temporary directory)

  • I was looking for a way of defining setup functions for each benchmark abstracting the common bits to avoid too much repetition. I ended up with this approach that uses the @classmethod decorator, but not sure it is the best way (I'm not super familiar with OOP). I also considered setup_cache but I think it serves a different purpose (mainly running computationally intense setup methods only once). I basically wanted to do what it says in the docs:

    You can also include a module-level setup function, which will be run for every benchmark within the module, prior to any setup assigned specifically to each function",

    but not sure how. Any thoughts welcome!

  • Should we have the benchmarks in a different repo? I know we want to minimise number so maybe here they are fine. I don't see strong arguments for or against apart from that one.

  • Is it repetitive to benchmark the whole workflow and also its parts? Should we just benchmark the whole, and rely on profiling when issues are found?

  • the main advantage of asv seems its ability to identify performance regressions across commits....but here the commits we track against would be those from the workflows repo. I understand it would be more interesting for us to track performance regressions for the cellfinder-core commits right? I think it could be done but we may need to rethink the structure.


replace "cellfinder-core" with "cellfinder"

@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (8665e74) 0.00% compared to head (c100671) 0.00%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main     #18   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files          1       2    +1     
  Lines          5      63   +58     
=====================================
- Misses         5      63   +58     
Files Changed Coverage Δ
brainglobe_workflows/__init__.py 0.00% <0.00%> (ø)
brainglobe_workflows/cellfinder/cellfinder_main.py 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

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

@sfmig
Copy link
Collaborator Author

sfmig commented Apr 25, 2024

superseded by #94

@sfmig sfmig closed this Apr 25, 2024
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.

1 participant