opencobra / cobrapy

COBRApy is a package for constraint-based modeling of metabolic networks.
http://opencobra.github.io/cobrapy/
GNU General Public License v2.0
467 stars 218 forks source link

Showing progress during flux variability analysis. #1279

Open achillesrasquinha opened 2 years ago

achillesrasquinha commented 2 years ago

Checklist

Is your feature related to a problem? Please describe it.

Describe the solution you would like.

The currently implementation of FVA within cobrapy is generally slow (definitely improved using the processes flag. Would be nice to see the current progress since the program sometimes seems stalled for large networks. What say? I was planning on using tqdm within variability.py at line 247.

e.g.

Screen Shot 2022-09-19 at 2 57 36 PM

Describe alternatives you considered

Additional context

cdiener commented 2 years ago

Good idea. We already have rich as a dependency, so would be better to use rich.progress.track for that. There should also be a toggle to turn that on and off, since some workloads may run an FVA for thousands of models and may not want a progress bar for each iteration. Or one could couple it to the logging level and only show it on INFO...

achillesrasquinha commented 2 years ago

I'll do that accordingly.

achillesrasquinha commented 2 years ago

@cdiener Done. PF Pull Request.