From 40f74ce9750fcf2e276a493ac000935935073883 Mon Sep 17 00:00:00 2001 From: Bin Du Date: Fri, 25 Oct 2024 11:09:54 -0700 Subject: [PATCH 1/5] No public description PiperOrigin-RevId: 689848845 --- Dockerfile | 2 +- lit_nlp/examples/gcp/Dockerfile | 4 ++-- lit_nlp/yarn.lock | 8 ++++---- website/sphinx_src/index.md | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5ca68273..9b3a6da6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,7 @@ COPY ./lit_nlp/examples/gunicorn_config.py ./ FROM lit-nlp-base AS lit-nlp-prod -RUN python -m pip install 'lit-nlp[examples-discriminative-ai]' +RUN python -m pip install 'lit-nlp[examples-descai]' WORKDIR $APP_HOME ENTRYPOINT ["gunicorn", "--config=gunicorn_config.py"] diff --git a/lit_nlp/examples/gcp/Dockerfile b/lit_nlp/examples/gcp/Dockerfile index 86217e1d..707ed6a4 100644 --- a/lit_nlp/examples/gcp/Dockerfile +++ b/lit_nlp/examples/gcp/Dockerfile @@ -93,14 +93,14 @@ COPY ./lit_nlp/examples/gcp/model_server_gunicorn_config.py ./ FROM lit-gcp-app-server-base AS lit-gcp-app-server -RUN python -m pip install 'lit-nlp[examples-generative-ai]' +RUN python -m pip install 'lit-nlp[examples-genai]' ENTRYPOINT ["gunicorn", "--config=gunicorn_config.py"] FROM lit-gcp-model-server-base AS lit-gcp-model-server -RUN python -m pip install 'lit-nlp[examples-generative-ai]' +RUN python -m pip install 'lit-nlp[examples-genai]' ENTRYPOINT ["gunicorn", "--config=model_server_gunicorn_config.py"] diff --git a/lit_nlp/yarn.lock b/lit_nlp/yarn.lock index 5c259033..a8c81a07 100644 --- a/lit_nlp/yarn.lock +++ b/lit_nlp/yarn.lock @@ -3613,10 +3613,10 @@ minimatch@^5.1.0: dependencies: brace-expansion "^2.0.1" -mobx@6.1.8: - version "6.1.8" - resolved "https://registry.yarnpkg.com/mobx/-/mobx-6.1.8.tgz#5d03cb76d8f7694dd82bfb2578d886945b66450d" - integrity sha512-U4yCvUeh6yKXRwFxm2lyJjXPVekOEar/R8ZKWAXem/3fthJqYflViawfjDAUh7lZEvbKqljC3NT/pSaUKpE+gg== +mobx@5.15.4: + version "5.15.4" + resolved "https://registry.yarnpkg.com/mobx/-/mobx-5.15.4.tgz#9da1a84e97ba624622f4e55a0bf3300fb931c2ab" + integrity sha512-xRFJxSU2Im3nrGCdjSuOTFmxVDGeqOHL+TyADCGbT0k4HHqGmx5u2yaHNryvoORpI4DfbzjJ5jPmuv+d7sioFw== ms@2.0.0: version "2.0.0" diff --git a/website/sphinx_src/index.md b/website/sphinx_src/index.md index 64921be0..205e830c 100644 --- a/website/sphinx_src/index.md +++ b/website/sphinx_src/index.md @@ -1,6 +1,6 @@ # Learning Interpretability Tool (LIT) - + From 6da70a225bf1fbfe2dd08634be45f87d3e6c64e2 Mon Sep 17 00:00:00 2001 From: Bin Du Date: Wed, 30 Oct 2024 09:45:26 -0700 Subject: [PATCH 2/5] Always use tqdm for progress indicator in LIT notebook. PiperOrigin-RevId: 691453044 --- lit_nlp/notebook.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lit_nlp/notebook.py b/lit_nlp/notebook.py index 02ad0e4e..b1bad3e6 100644 --- a/lit_nlp/notebook.py +++ b/lit_nlp/notebook.py @@ -22,22 +22,18 @@ 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] -is_colab = False try: 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 + is_colab = False +progress_indicator = notebook.tqdm modules = layout.LitModuleName LIT_NOTEBOOK_LAYOUT = layout.LitCanonicalLayout( From c8c26b0705c4daf9da4c3aece64adbf711a79ef5 Mon Sep 17 00:00:00 2001 From: Bin Du Date: Wed, 18 Dec 2024 10:40:46 -0800 Subject: [PATCH 3/5] Ping umap-learn to 0.5.6. PiperOrigin-RevId: 707599300 --- pyproject.toml | 5 ++++- requirements.txt | 1 - requirements_test.txt | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 831d06e8..d506f9d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,6 @@ dependencies = [ "six>=1.16.0", "termcolor>=2.3.0", "tqdm>=4.64.0", - "umap-learn>=0.5.1", "werkzeug>=2.2.3", ] # LINT.ThenChange(./requirements.txt) @@ -105,10 +104,14 @@ examples-generative-ai = [ "vertexai>=1.49.0", ] # LINT.ThenChange(./requirements_examples_generative_ai.txt) +umap = [ + "umap-learn==0.5.6" +] # LINT.IfChange test = [ "lit-nlp[examples-discriminative-ai]", "lit-nlp[examples-generative-ai]", + "lit-nlp[umap]", "lime==0.2.0.1", "pytest>=7.4.0,<8.0.0", "webtest>=2.0", diff --git a/requirements.txt b/requirements.txt index 6e740ce9..9c4707b0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -37,6 +37,5 @@ shap>=0.42.0,<0.46.0 six>=1.16.0 termcolor>=2.3.0 tqdm>=4.64.0 -umap-learn>=0.5.1 werkzeug>=2.2.3 # LINT.ThenChange(./pyproject.toml) diff --git a/requirements_test.txt b/requirements_test.txt index 367a238f..9e2e0556 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -18,5 +18,6 @@ lime==0.2.0.1 pytest>=7.4.0,<8.0.0 +umap-learn==0.5.6 webtest>=2.0 # LINT.ThenChange(./pyproject.toml) From a811207e6257e8111ca8cac7dcf33be2dc70bdec Mon Sep 17 00:00:00 2001 From: Bin Du Date: Fri, 20 Dec 2024 12:05:07 -0800 Subject: [PATCH 4/5] Fix Dockerfile pip install requirements file name and update mbox version in yarn.lock. PiperOrigin-RevId: 708389951 --- Dockerfile | 2 +- lit_nlp/examples/gcp/Dockerfile | 4 ++-- lit_nlp/yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9b3a6da6..5ca68273 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,7 @@ COPY ./lit_nlp/examples/gunicorn_config.py ./ FROM lit-nlp-base AS lit-nlp-prod -RUN python -m pip install 'lit-nlp[examples-descai]' +RUN python -m pip install 'lit-nlp[examples-discriminative-ai]' WORKDIR $APP_HOME ENTRYPOINT ["gunicorn", "--config=gunicorn_config.py"] diff --git a/lit_nlp/examples/gcp/Dockerfile b/lit_nlp/examples/gcp/Dockerfile index 707ed6a4..86217e1d 100644 --- a/lit_nlp/examples/gcp/Dockerfile +++ b/lit_nlp/examples/gcp/Dockerfile @@ -93,14 +93,14 @@ COPY ./lit_nlp/examples/gcp/model_server_gunicorn_config.py ./ FROM lit-gcp-app-server-base AS lit-gcp-app-server -RUN python -m pip install 'lit-nlp[examples-genai]' +RUN python -m pip install 'lit-nlp[examples-generative-ai]' ENTRYPOINT ["gunicorn", "--config=gunicorn_config.py"] FROM lit-gcp-model-server-base AS lit-gcp-model-server -RUN python -m pip install 'lit-nlp[examples-genai]' +RUN python -m pip install 'lit-nlp[examples-generative-ai]' ENTRYPOINT ["gunicorn", "--config=model_server_gunicorn_config.py"] diff --git a/lit_nlp/yarn.lock b/lit_nlp/yarn.lock index a8c81a07..5c259033 100644 --- a/lit_nlp/yarn.lock +++ b/lit_nlp/yarn.lock @@ -3613,10 +3613,10 @@ minimatch@^5.1.0: dependencies: brace-expansion "^2.0.1" -mobx@5.15.4: - version "5.15.4" - resolved "https://registry.yarnpkg.com/mobx/-/mobx-5.15.4.tgz#9da1a84e97ba624622f4e55a0bf3300fb931c2ab" - integrity sha512-xRFJxSU2Im3nrGCdjSuOTFmxVDGeqOHL+TyADCGbT0k4HHqGmx5u2yaHNryvoORpI4DfbzjJ5jPmuv+d7sioFw== +mobx@6.1.8: + version "6.1.8" + resolved "https://registry.yarnpkg.com/mobx/-/mobx-6.1.8.tgz#5d03cb76d8f7694dd82bfb2578d886945b66450d" + integrity sha512-U4yCvUeh6yKXRwFxm2lyJjXPVekOEar/R8ZKWAXem/3fthJqYflViawfjDAUh7lZEvbKqljC3NT/pSaUKpE+gg== ms@2.0.0: version "2.0.0" From 21466fa2a9fb303c3d752d2e3ca06867ef3bcdc3 Mon Sep 17 00:00:00 2001 From: Bin Du Date: Fri, 20 Dec 2024 12:51:26 -0800 Subject: [PATCH 5/5] Update LIT to 1.3.1 for minor version release. PiperOrigin-RevId: 708402792 --- RELEASE.md | 6 ++++++ lit_nlp/package.json | 2 +- pyproject.toml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 248b6461..09591ed8 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,5 +1,11 @@ # Learning Interpretability Tool Release Notes + +## Release 1.3.1 + +This is a minor update to fix issues with running the [LIT Gemma Colab](https://colab.sandbox.google.com/github/google/generative-ai-docs/blob/main/site/en/gemma/docs/lit_gemma.ipynb). + + ## Release 1.3 This release updates how the Learning Interpretability Tool (LIT) can be diff --git a/lit_nlp/package.json b/lit_nlp/package.json index b914daf4..42a26bdd 100644 --- a/lit_nlp/package.json +++ b/lit_nlp/package.json @@ -1,6 +1,6 @@ { "name": "lit-client", - "version": "1.3", + "version": "1.3.1", "description": "Client app for LIT, the Learning Interpretability Tool", "engines": { "node": ">=18.0.0" diff --git a/pyproject.toml b/pyproject.toml index d506f9d8..2a27db38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "lit-nlp" # LINT.IfChange -version = "1.3" +version = "1.3.1" # LINT.ThenChange(./lit_nlp/package.json) authors = [ { name="Google, LLC", email="lit-dev@google.com" }