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

Progress bar #492

Open
iosonofabio opened this issue Dec 21, 2021 · 3 comments
Open

Progress bar #492

iosonofabio opened this issue Dec 21, 2021 · 3 comments
Labels
todo Triaged for implementation in some unspecified future version

Comments

@iosonofabio
Copy link
Member

What is the feature or improvement you would like to see?
There's been a discussion on progress bars in #485 that deserves its own issue.

Use cases for the feature
C core, python, ipython, Jupyter notebook, Jupyterlab, Google Colab, Data Bricks, etc.

References
#485

@szhorvat
Copy link
Member

This is the code I used for out CZI EOSS presentation:

import ipywidgets as widgets
import igraph as ig

prog = widgets.FloatProgress(min=0, max=100)

import math
def update_progress(msg, p):
    if p < prog.value or p >= math.ceil(prog.value):
        prog.value = p    

ig.set_progress_handler(update_progress)

display(prog)
g = ig.Graph.Barabasi(100000,m=2)
g.community_fastgreedy()

Note that you need to install ipywidgets before you start the notebook, otherwise it will not display correctly.

I do remember looking into tqdm, possibly at @vtraag 's suggestion, but ended up not using it. I don't recall why exactly, but I think it only allowed monotonic updates (i.e. increments) instead of setting the progress to arbitrary values, which is required by igraph.

@szhorvat
Copy link
Member

Before looking at this seriously for Python, we should make this improvement in the C core: igraph/igraph#1884 It may require changes to the API.

@stale
Copy link

stale bot commented Feb 24, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 24, 2022
@ntamas ntamas added todo Triaged for implementation in some unspecified future version and removed stale labels Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
todo Triaged for implementation in some unspecified future version
Projects
None yet
Development

No branches or pull requests

3 participants