-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Show progress #641
Show progress #641
Conversation
* A dummy_tqdm class added to utils: it replicates the interface used by trainers, but does not show the progress bar; * Added a show_progress argument to the base trainer: when show_progress == True, dummy_tqdm is used in place of tqdm;
Did you use the old version isort? |
Why not use |
Disable does not seem to work – not the way we are using the interface here. With disabled, n does not get incremented when doing update:
|
I think you are right! I assumed it was among the packages updated automatically by the script. I will make sure my versions are as close to yours as possible. What should I do then? Do I need to rerun |
See the version here: https://github.com/thu-ml/tianshou/runs/6470112919?check_suite_focus=true (Install dependencies)
|
# perform n step_per_epoch
with progress(
- total=self.step_per_epoch, desc=f"Epoch #{self.epoch}", **tqdm_config
+ total=self.step_per_epoch, desc=f"Epoch #{self.epoch}", **tqdm_config, disable=True
) as t: I manually tested with |
Are you sure you are in fact running the disable=True on the tqdm version and not the dummy version? Because for me, with disable=True, episodes never terminate – which is what I would expect with t.n not getting updated. |
Yes you're right. I'll take it. |
Codecov Report
@@ Coverage Diff @@
## master #641 +/- ##
==========================================
+ Coverage 93.59% 93.62% +0.02%
==========================================
Files 71 71
Lines 4733 4750 +17
==========================================
+ Hits 4430 4447 +17
Misses 303 303
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
- A DummyTqdm class added to utils: it replicates the interface used by trainers, but does not show the progress bar; - Added a show_progress argument to the base trainer: when show_progress == True, dummy_tqdm is used in place of tqdm.
Hi, I added support for disabling the tqdm progress bar in the base trainer by replacing it with a dummy class that just keeps track of the total and n stats, but doesn't display progress.
I wonder whether you would like to merge this.
by trainers, but does not show the progress bar;
show_progress == True, dummy_tqdm is used in place of tqdm;
Btw. I wonder whether requiring
make format
and then not actually doing it on every commit is a good idea – I think it is going to make the changes I made more difficult to find – but at least I did that step in a separate commit, so that should help.make format
(required)make commit-checks
(required)