-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
On line 714 of _tqdm.py;
Line 714 in 96d8a3c
smoothing : float, optional |
smoothing : float, optional
Exponential moving average smoothing factor for speed estimates
(ignored in GUI mode). Ranges from 0 (average speed) to 1
(current/instantaneous speed) [default: 0.3].
With the default alpha value of 0.3, past values are given quite a low weighting (and conversely, more recent results are given quite a large effect). I think it would be better to reduce this smoothing parameter to, for example, 0.1 or so, as it'll be less sensitive to skewed outliers then.
Side note: I ended up investigating this because I've been trying to use tqdm to show progress on a number of jobs that have quite a high variance in terms of run time - the low weighting of past results in the EMA meant that the predicted run time of the job was very volatile and was much too sensitive to the most recent value (so I couldn't really draw any useful conclusions from it). I think that a smaller value for alpha would solve this problem.
Edit: I realised that I made a mistake interpreting the definition of EMA - the documentation is correct and I'd misinterpreted the smoothing factor wrong (d'oh). I've since edited this issue. I still think that the choice of coefficient could be improved and have made a PR (#616) with a suggested improvement for the EMA smoothing parameter.