Skip to content

Commit

Permalink
Always use tqdm for progress indicator in LIT notebook.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 690649826
  • Loading branch information
bdu91 authored and LIT team committed Oct 28, 2024
1 parent 40f74ce commit a3361e7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lit_nlp/notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from lit_nlp import server_config
from lit_nlp.api import layout
from lit_nlp.lib import wsgi_serving
from tqdm import notebook

JsonDict = Mapping[str, Any]

Expand All @@ -30,14 +31,10 @@
import google.colab # pylint: disable=g-import-not-at-top,unused-import
from google.colab import output # pylint: disable=g-import-not-at-top,unused-import # pytype: disable=import-error
is_colab = True
# Can disable import error as this package is always
# included in colab kernels.
from colabtools import interactive_widgets # pylint: disable=g-import-not-at-top # pytype: disable=import-error
progress_indicator = interactive_widgets.ProgressIter
except (ImportError, ModuleNotFoundError):
from tqdm import notebook # pylint: disable=g-import-not-at-top
progress_indicator = notebook.tqdm
pass

progress_indicator = notebook.tqdm
modules = layout.LitModuleName

LIT_NOTEBOOK_LAYOUT = layout.LitCanonicalLayout(
Expand Down

0 comments on commit a3361e7

Please sign in to comment.