Skip to content

Conversation

ColCarroll
Copy link
Member

This increases dependence on external libraries, but saves us from maintaining a progress bar. Uses the https://github.com/tqdm/tqdm library, which is pretty heavily used/maintained.

Will close whichever of this or #1407 does not get merged.

@twiecki
Copy link
Member

twiecki commented Sep 28, 2016

I do like the idea of removing that code. I'll try it out.

@springcoil
Copy link
Contributor

springcoil commented Sep 28, 2016

I like tqdm and the idea of removing that code (reducing burden on us).
So if Thomas is happy with this I vote to merge.
Btw @ColCarroll some awesome contributions lately - I can barely keep up :)

@fonnesbeck
Copy link
Member

I think it looks fine. I wonder, though, if we should have it as a dependency, or integrate it as a submodule.

@coveralls
Copy link

coveralls commented Sep 28, 2016

Coverage Status

Coverage increased (+0.01%) to 84.14% when pulling b8c3bff on ColCarroll:tqdm into 220643d on pymc-devs:master.

eta = (self.iterations / sps) - elapsed
its = self.iterations

prog_str = "[{bar}] {it} of {its} in {s_elapsed} sec. " \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SPS and ETA are kinda nice metrics though. Is there now way to get that with tqdm?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah! Some sample output:

test_disaster_model (pymc3.tests.test_examples.TestDisasterModel) ... 
Applied log-transform to early_mean and added transformed early_mean_log_ to model.
Applied log-transform to late_mean and added transformed late_mean_log_ to model.
Assigned Metropolis to switchpoint
 32%|███████████████████████▎                                                 | 15969/50000 [00:15<00:33, 1016.85it/s]

in the brackets at the end are [time spent < ETA, SPS it/s]. This can all be customized. I did manual checks with examples in a notebook, ipython shell, and from the command line, with similar results. There are fancy jupyter notebook widgets that can be used, but the base functionality is fine.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat. I think we should just add this as a dependency then.

@twiecki twiecki merged commit c4030c1 into pymc-devs:master Sep 28, 2016
@twiecki twiecki mentioned this pull request Sep 28, 2016
@twiecki
Copy link
Member

twiecki commented Sep 28, 2016

Would be cool if it used the JS version when run inside an NB. Would also be cool to have parallel progress bar if we're sampling in parallel.

@fonnesbeck
Copy link
Member

It's slightly worrying that this package hasn't been updated in three years.

@twiecki
Copy link
Member

twiecki commented Sep 28, 2016

They do seem active on their github: https://github.com/tqdm/tqdm/commits/master

Maybe we can ask them for a new release.

@kyleabeauchamp
Copy link
Contributor

FWIW, I've used it before, so it's at least somewhat widely used...

@kyleabeauchamp
Copy link
Contributor

There's also a conda package on conda-forge, which could be useful for some.

@twiecki
Copy link
Member

twiecki commented Sep 28, 2016

Seems like 4.8.4 was released Aug 18 https://github.com/tqdm/tqdm/releases @fonnesbeck where do you get that number from?

@ColCarroll
Copy link
Member Author

Original library is https://github.com/noamraph/tqdm, but the top issue
there helpfully points to the current version.

On Wed, Sep 28, 2016 at 3:33 PM Thomas Wiecki notifications@github.com
wrote:

Seems like 4.8.4 was released Aug 18 https://github.com/tqdm/tqdm/releases
@fonnesbeck https://github.com/fonnesbeck where do you get that number
from?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1408 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACMHEL20O8yzmPSAbU1jd543XOxrNPtNks5qusEfgaJpZM4KIxQT
.

@fonnesbeck
Copy link
Member

Sorry, yes, I was looking at the original repo. Strange that it comes up first on Google search.

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.

6 participants