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

Cell output flashes when using fastprogress package (was: cell output erased after execution/model training is complete.) #1674

Closed
agigao opened this issue Jul 24, 2020 · 11 comments
Labels
bug Issue identified by VS Code Team member as probable bug notebook-output

Comments

@agigao
Copy link

agigao commented Jul 24, 2020

Bug: Notebook Editor, Interactive Window, Editor cells

Hi guys,

I'd love to use VSCode for my Data Science endeavours but this break the workflow:

Progress bar generated report gets erased after it's finished, not very convenient when training models:
Peek 2020-07-24 15-03
Steps to Reproduce:

  1. pip install fastprogress
  2. open a new notebook in VSCode and run the snippet
from fastprogress.fastprogress import master_bar, progress_bar
from time import sleep
mb = master_bar(range(10))
for i in mb:
    for j in progress_bar(range(100), parent=mb):
        sleep(0.01)
        mb.child.comment = f'second bar stat'
    mb.main_bar.comment = f'first bar stat'
    mb.write(f'Finished loop {i}.')
    #mb.update_graph(graphs, x_bounds, y_bounds)

Finished Loop 0, 1, 2...
Peek 2020-07-24 14-47

Does this issue occur when all extensions are disabled?: Yes

  • VSCode Version:
Version: 1.47.2
Commit: 17299e413d5590b14ab0340ea477cdd86ff13daf
Date: 2020-07-15T18:22:15.161Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 5.4.0-42-generic
  • OS Version:
Operating System: Linux Mint 20
Kernel: Linux 5.4.0-42-generic
Architecture: x86-64
  • Python
Version 3.8.2
Anaconda? - Nope

Cheers,
Giga

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl

@claudiaregio
Copy link
Contributor

Hi @agigao , is it the progress bar being deleted that bothers you or the execution time being deleted that bothers you?

@agigao
Copy link
Author

agigao commented Jul 24, 2020

@claudiaregio hi, well the execution report: error rate, validation loss, etc.

@claudiaregio
Copy link
Contributor

claudiaregio commented Jul 24, 2020

@agigao To make sure I'm understanding correctly, when you use this command in another tool it does not clear the output of those stats, it just shows them? Does not require a print statement to view them?

@claudiaregio
Copy link
Contributor

@agigao I was able to validate that that is the behavior in different tools.

@agigao
Copy link
Author

agigao commented Jul 25, 2020

@claudiaregio it isn't erased in a regular jupyter notebook.

312

@joyceerhl joyceerhl assigned joyceerhl and unassigned joyceerhl Jul 31, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 13, 2020
@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug temp-parking and removed temp-parking labels Nov 13, 2020
@claforte
Copy link

claforte commented Jan 29, 2021

FYI, I tried to work-around the issue using:

import fastprogress
fastprogress.fastprogress.master_bar, fastprogress.fastprogress.progress_bar = \
    fastprogress.fastprogress.force_console_behavior()
fastprogress.fastprogress.workaround_empty_console_output()

... but unfortunately that doesn't help. It would be fantastic if this could be fixed... this is the #1 issue preventing me from switching from "Jupyter notebook" to vscode's.

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Jan 29, 2021

@claforte
This issue has been resolved in Native notebooks
Please have a look at native notebooks (a better UI for editing of Notebooks):

Apologies, this has n't been resolved in native notebooks either.

@claforte
Copy link

claforte commented Jan 30, 2021

Thanks DonJayamanne, for me the priority isn't as high now that I tried the native notebooks. The fastai library tends to output a report at the end, after the fastprogress messages are shown. With the old notebooks, that report wouldn't appear.

I just tried it in native notebooks today, and while the fastprogress disappears, at least this time I see the resulting dataframe/report, so it's more usable:
image

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Feb 1, 2021

Thanks for trying that, if i'm not mistaken this (Native Notebooks UX) is more inline with what Juptyer does (see Jupyter output here #1674 (comment))

@claforte
Copy link

claforte commented Feb 1, 2021

Yes, at this point, the only remaining issue is that the Native Notebooks UX keeps resizing/flashing while the fastprogress is shown. But it's just annoying, not a showstopper. Thank you!

@greazer greazer changed the title Bug: cell output erased after execution/model training is complete. Cell output flashes when using fastprogress package (was: cell output erased after execution/model training is complete.) Jun 6, 2021
@DonJayamanne
Copy link
Contributor

@claforte I'm going to close this issue as it now works as expected.

remaining issue is that the Native Notebooks UX keeps resizing/flashing while the fast

I'll file a seprate issue for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug notebook-output
Projects
None yet
Development

No branches or pull requests

6 participants