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

v0.5 Release #969

Merged
merged 394 commits into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
394 commits
Select commit Hold shift + click to select a range
1d1c3dd
Update environment.yml
aryan1107 Jun 21, 2022
7dc03f1
Cleaning
aryan1107 Jun 21, 2022
82860cc
Transformers 4.5.0 doesn't work for FlaxBertForQuestionAnswering usin…
aryan1107 Jun 21, 2022
ccd47cc
Saving work
aryan1107 Jun 21, 2022
35417b2
TyDi Demo : Trying to add attentions and embeddings
aryan1107 Jun 21, 2022
9ff6f36
TyDi Model: Shows Generated text & Scalar score
aryan1107 Jun 21, 2022
c4269e3
Update tydi.py
aryan1107 Jun 21, 2022
0558ef5
Fix AUC/AUCPR metrics calculation; support binary classification task…
cjqian Jun 23, 2022
ed30b23
Updates! Please ignore dalle files
aryan1107 Jun 23, 2022
5df8588
Removed dalle-mini for separate branch
aryan1107 Jun 23, 2022
26fd3df
Generated output to show context instead of question
aryan1107 Jun 23, 2022
a6c039d
MultiSegmentAnnotations
aryan1107 Jun 24, 2022
0b9998e
Update tydi.py
aryan1107 Jun 24, 2022
0ae6a8f
Update question_answering.py
aryan1107 Jun 24, 2022
5889bcd
Update question_answering.py
aryan1107 Jun 24, 2022
2774650
Other languages added!
aryan1107 Jun 26, 2022
6699735
Annotated Text (gold)
aryan1107 Jun 26, 2022
a28f203
Adds tab bar position preset buttons and reduces drag jitter.
RyanMullins Jun 28, 2022
3f2ae88
Metrics Update
aryan1107 Jun 28, 2022
5bb0c65
Update after new feedback! & Metrics
aryan1107 Jun 28, 2022
9a1198d
Display MultiSegmentAnnotations as a comma-separated list in DataTable
RyanMullins Jun 29, 2022
dad8edb
Fixes bug in use of regression and classification source prefixes in
RyanMullins Jun 29, 2022
ecddf59
Merge pull request #4 from PAIR-code/dev
aryan1107 Jun 29, 2022
db1ef3d
Refactor backend types based on shared attributes.
cjqian Jun 30, 2022
c85e556
Add initial class-based LitTypes module and tests.
cjqian Jun 30, 2022
9026a67
Non-editable display formatting for MultiSegmentAnnotations in Datapo…
RyanMullins Jul 1, 2022
f11a242
Merge pull request #5 from PAIR-code/dev
aryan1107 Jul 1, 2022
0cda2a5
Adds type check to CorpusBLEU metric.
RyanMullins Jul 1, 2022
f970958
Use more sensible default values for settings in the clustering module.
eberts-google Jul 6, 2022
99105f7
Merge pull request #6 from PAIR-code/dev
aryan1107 Jul 6, 2022
ba36c67
Update .gitignore
RyanMullins Jul 6, 2022
0e665c0
Merge pull request #7 from PAIR-code/dev
aryan1107 Jul 7, 2022
b9b112c
Adds Python and TypeScript linters and docs
RyanMullins Jul 8, 2022
b8c1097
Adds VS Code settings based on Google's recommendations
RyanMullins Jul 8, 2022
660b8ef
Add utilities for class-based LitTypes.
cjqian Jul 8, 2022
db58fa4
Add another batch of class-based LitTypes and replace existing refere…
cjqian Jul 8, 2022
4b777d7
Better filtering in data table for different types
jameswex Jul 12, 2022
c020d25
Add final batch of class-based LitTypes and replace existing referenc…
cjqian Jul 12, 2022
eb02465
Replace dictionary-based `LitType` approximations with real class con…
cjqian Jul 12, 2022
f846772
Adds a color legend element and integrates it into the embedding proj…
jswong65 Jul 12, 2022
ed07199
Scalars now pulls data from the DataService.
RyanMullins Jul 12, 2022
ffc9996
Some initial updates to help scale # of datapoints usable in LIT.
jameswex Jul 13, 2022
4197a44
Merge pull request #9 from PAIR-code/dev
aryan1107 Jul 13, 2022
33fa5fe
Metrics Logging
aryan1107 Jul 14, 2022
37b15d7
Update app.py
aryan1107 Jul 15, 2022
aca35d8
Closes the onboarding docs dialog when you click the
RyanMullins Jul 18, 2022
6f4dd57
Makes LitCheckbox label clickable and adds tests
RyanMullins Jul 18, 2022
80f5d5d
Updates definition of tabular data and models in docs.
RyanMullins Jul 18, 2022
7a5e8e4
Merge pull request #10 from PAIR-code/dev
aryan1107 Jul 18, 2022
b43044e
Update metrics.py
aryan1107 Jul 18, 2022
4b861df
Metrics
aryan1107 Jul 18, 2022
dd60c3d
Update metrics.py
aryan1107 Jul 18, 2022
64c8b8f
Delete .DS_Store
aryan1107 Jul 18, 2022
e9ff91b
Fixed exact match metrics logic
RyanMullins Jul 19, 2022
d7f8ba8
import clean up
RyanMullins Jul 19, 2022
6baf09f
Added test and language categories for loading mixed dataset!
aryan1107 Jul 19, 2022
fb81dab
Update tydi.py
aryan1107 Jul 19, 2022
c1683ff
Updates Scalars to use .module-* class pattern.
RyanMullins Jul 20, 2022
0e2b8b8
Merge pull request #13 from PAIR-code/dev
aryan1107 Jul 20, 2022
72edd26
Rename String LitType to StringLitType.
cjqian Jul 21, 2022
65c5b8a
Rename remaining instances of `String` to `StringLitType`.
cjqian Jul 22, 2022
0d8341d
Improves robustness of Metrics compatibility checks.
RyanMullins Jul 22, 2022
abb8889
Add default `signed` value to Salience types.
cjqian Jul 22, 2022
0b83f4a
Store calculated numeric feature bins so as not to recalculate them c…
jameswex Jul 25, 2022
0e0d4aa
Merge pull request #15 from PAIR-code/dev
aryan1107 Jul 25, 2022
61596bd
merge conflict update!
aryan1107 Jul 26, 2022
4c93b62
Add boolean typing to ImageSalience's signed property.
cjqian Jul 26, 2022
3e8735b
Remove inaccurate comment about Dataset loading
iftenney Jul 27, 2022
8c6ac11
Replace hard-coded type approximations with references to the new cla…
cjqian Jul 27, 2022
2522e4f
Replace references to hard-coded `List` field types with references t…
cjqian Jul 27, 2022
0f8ff8e
Merge `isLitSubtype` and `findSpecKeys` implementations from `lit_typ…
cjqian Jul 27, 2022
58970de
Consolidate implementations of `createLitTypes` and migrate it into t…
cjqian Jul 27, 2022
4baf746
Merge pull request #17 from PAIR-code/dev
aryan1107 Jul 28, 2022
d12bcb3
Fixes #755. Tabular Feature Attribution Tutorial.
iamshnoo Jul 28, 2022
bb657ba
Pause module reactions and rendering when they are hidden.
jameswex Jul 28, 2022
d0ba035
Adding Multisegment Annotation support to Generated Text Module and V…
RyanMullins Jul 29, 2022
b165b28
Update remaining modules for render/reaction pausing.
jameswex Jul 29, 2022
ba7ad82
Merge pull request #18 from PAIR-code/dev
aryan1107 Jul 29, 2022
7ae9217
Revert "Adding Multisegment Annotation support to Generated Text Modu…
aryan1107 Jul 29, 2022
4dd6ee6
Revert "Merge pull request #18 from PAIR-code/dev"
aryan1107 Jul 29, 2022
afb2e04
Ryan's Generated Text Module update to latest PR
aryan1107 Jul 29, 2022
ef72bfc
Don't pass serialized LitType metadata from the Python back-end, now …
cjqian Aug 1, 2022
40d14e5
Rename Boolean LitType to BooleanLitType.
cjqian Aug 1, 2022
ccbb72c
Add tests for deserializing LitTypes from LitMetadata.
cjqian Aug 1, 2022
a5b9f65
Rename `FieldMatcher` to `SingleFieldMatcher` and consolidate shared …
cjqian Aug 1, 2022
ab1e06a
Remove unused `__mro__` and `__class__` properties from front-end Lit…
cjqian Aug 1, 2022
563cd3d
Solving merge conflict!
aryan1107 Aug 2, 2022
37e24a2
Resolving merge Conflict!
aryan1107 Aug 2, 2022
78a36cf
merge conflict
aryan1107 Aug 2, 2022
6c449a1
Merge branch 'dev' into dev
aryan1107 Aug 2, 2022
8d8cc7a
Revert "Remove unused `__mro__` and `__class__` properties from front…
aryan1107 Aug 2, 2022
d54522a
Updates for better performance on large datasets
jameswex Aug 2, 2022
853edd0
Fix Spec -> object conversion during JSON serialization by removing J…
cjqian Aug 3, 2022
9ec5324
Rename URL to URLLitType in the front end.
cjqian Aug 3, 2022
4a29334
Apply all suggestions from Ryan's code review.
iamshnoo Aug 3, 2022
5336a0b
Explicit use of window.*Timeout() call to resolve typing conflict
RyanMullins Aug 3, 2022
28443bc
Fixes #812. Text Salience Maps Tutorial.
iamshnoo Aug 4, 2022
194fc82
Apply suggestions. Img captions not added yet.
iamshnoo Aug 4, 2022
cb528f1
Update utility signatures to take in LitTypes instead of LitType names.
cjqian Aug 4, 2022
a36a936
Create LitTypes from a generic LitType constructor instead of a strin…
cjqian Aug 5, 2022
74b5dbb
Pass requested LitTypes directly into API `getPreds` query.
cjqian Aug 5, 2022
40a661e
Add Python datatypes (dtypes) to front-end for more specific type-che…
cjqian Aug 5, 2022
e811359
Wrap up typing migration tasks. Replace `__name__` property in front-…
cjqian Aug 5, 2022
d869b8c
Add Dataset.filter() method.
iftenney Aug 8, 2022
c70c9ff
Apply suggestions from code review
iamshnoo Aug 8, 2022
5b73398
Internal change
cjqian Aug 8, 2022
0ead420
Collapse Attention Module by default
RyanMullins Aug 9, 2022
08abc2c
Sync selection state to Python when working in notebooks.
iftenney Aug 9, 2022
3d82886
Progress indicators for warm_start, and fix slow startup in notebooks.
iftenney Aug 9, 2022
32e1224
WebPack build fix while we sort out TS 4.7 and Typings transition.
RyanMullins Aug 12, 2022
0758f89
Fix missing ground truth indicator in classification module.
jameswex Aug 15, 2022
1be609a
Relax required field enforcement in datapoint editor.
iftenney Aug 15, 2022
49cc156
Internal change.
iftenney Aug 15, 2022
7a1e26a
Integrates a color legend into the sequence salience.
jswong65 Aug 18, 2022
d50f7ae
Add suggestions from code review.
iamshnoo Aug 18, 2022
1a6e39f
Replace [Grad ˙ Input] with [Grad · Input]
iamshnoo Aug 18, 2022
fae59e6
Fix info box 2 title.
iamshnoo Aug 19, 2022
ca80f79
Fixes OSS build issue with Potato and other demos
RyanMullins Aug 22, 2022
ab057b5
Adds autorun and config init params to configurable text salience int…
RyanMullins Aug 22, 2022
9ea4ab2
Adds components.core library w/ functions for default interpreters + …
RyanMullins Aug 22, 2022
c8bc872
Integrate the color legend into the salience map module.
jswong65 Aug 24, 2022
60cd69e
Silence type errors generated by new pytype features.
sinopalnikov Aug 28, 2022
a0ad3b5
Fix the blank page issue caused by the invalid layout url param value.
jswong65 Aug 29, 2022
10e2548
Update LIT to TypeScript 4.7
RyanMullins Aug 29, 2022
948adb3
Fixes LIT_TYPES_REGISTRY in OSS builds by preserving TS/JS class names
RyanMullins Aug 29, 2022
24006e7
Fixing bugs causing CI failures in OSS release
RyanMullins Aug 29, 2022
3f990d9
Fixing Python env and test issues in GitHub CI
RyanMullins Aug 30, 2022
fac7ee4
Fixes #812. Text Salience Maps Tutorial.
iamshnoo Aug 4, 2022
1d35979
Apply suggestions from code review
iamshnoo Aug 8, 2022
a586cd3
Add suggestions from code review.
iamshnoo Aug 18, 2022
70bcf7f
Replace [Grad ˙ Input] with [Grad · Input]
iamshnoo Aug 18, 2022
b585e71
Merge branch 'tutorial-text-salience-gsoc' of github.com:PAIR-code/li…
RyanMullins Aug 31, 2022
fc30fcb
Update "Send Feedback" internal redirect.
cjqian Sep 2, 2022
b18d887
Remove the color module.
cjqian Sep 2, 2022
6048e74
Update cache persistence logic.
jameswex Sep 8, 2022
ca3367a
Internal change
a-googler Sep 9, 2022
4056a2e
Documentation update.
iftenney Sep 9, 2022
4dee37e
An improvement for the color legend element by showing a range info f…
jswong65 Sep 21, 2022
4760b4d
Use TypedDict for IndexedInputs
RyanMullins Sep 22, 2022
5e91b19
Adds a threshold property to MulticlassPreds type.
RyanMullins Sep 22, 2022
9f68ef7
Silence new type errors in Python 3.10.
rchen152 Sep 23, 2022
11a60ff
Add a slider for the color legend in the salience map module to allow…
jswong65 Sep 27, 2022
53bd99a
Remove default LIT landing page pop-up on launch.
cjqian Sep 28, 2022
184c8c6
Integrate MegaPlot into Scalars module
RyanMullins Sep 28, 2022
14f82d5
Fixing brush behavior typing in Scalars
RyanMullins Sep 29, 2022
0fef77a
Add dataset and model validation.
jameswex Sep 29, 2022
5f20e0c
Do not select text when shift-click in data table
jameswex Sep 30, 2022
0eaa00c
Support markdown in component descriptions.
iftenney Oct 5, 2022
3c0929f
Support Embeddings in input data.
iftenney Oct 6, 2022
e7ac98b
Enable embedding projector to show for input embeddings.
iftenney Oct 10, 2022
2873bee
JPEGBytes and PNGBytes subtypes to specify encoding format.
iftenney Oct 10, 2022
16d6463
Removes dead color modules styles code.
RyanMullins Oct 11, 2022
4561680
Fixes array access error in TCAV module
RyanMullins Oct 12, 2022
0cc934c
Selected Color by value synced to URL param
jswong65 Oct 12, 2022
14c0977
Fixes rounding error in GroupService.numericBinRange().
RyanMullins Oct 14, 2022
f5b2777
Makes "copy link" button more descriptive.
RyanMullins Oct 17, 2022
8bbcb2d
Show pinned input when filtering view to selected data.
cjqian Oct 17, 2022
9bbd6af
Eliminates snap when opening IG interpreter controls.
RyanMullins Oct 17, 2022
b3c3c60
Fix datapoint selection confusion.
jameswex Oct 17, 2022
2443e4a
Improved formatting for Model and Dataset descriptions in the Setting…
iftenney Oct 17, 2022
9b2de92
Adds HotFip.is_compatible() implementaiton.
RyanMullins Oct 17, 2022
c4a7181
Allow launching with new datapoints through POST operation.
jameswex Oct 17, 2022
be51efd
Fix LIME crash on fields containing only whitespace.
iftenney Oct 17, 2022
db94849
Adds AblationFlip.is_compatible() implementation.
RyanMullins Oct 18, 2022
dc79136
Tidying DataTable UX
RyanMullins Oct 18, 2022
f895b07
Fixes page jump in Data Table when adding datapoints.
RyanMullins Oct 18, 2022
c3b6a0c
Allow selection by row clicking in metrics table.
jameswex Oct 18, 2022
7ef4cc3
Eliminates row highlight if only one token-chip-label in a list.
RyanMullins Oct 19, 2022
cbe17dd
Clarify inline documentation of ablation-flip and hot-flip.
jameswex Oct 19, 2022
8bb54d8
Adding informative error msg for dataset load fail.
DeepakRamachandran Oct 19, 2022
5648376
Improve collapse/expand interaction icons, titles and styling.
cjqian Oct 19, 2022
005a7f0
Improve collapse/expand interaction icons, titles and styling.
iftenney Oct 19, 2022
68cb051
Improve collapse/expand interaction icons and titles; leave 16px icon…
cjqian Oct 19, 2022
20a8f31
Adds sparse mode to Classification Results module.
RyanMullins Oct 19, 2022
cd6864e
Use title to clarify function of dice button in Table element
RyanMullins Oct 20, 2022
4851c9d
Adds show only generated toggle to DataTable
RyanMullins Oct 20, 2022
cd14f35
Move starring interaction from app toolbar to per-table data entry.
cjqian Oct 20, 2022
66fbc24
Set primary selection to most newly selected point.
cjqian Oct 20, 2022
840d78e
Update attention module to only return single field being displayed.
jameswex Oct 21, 2022
c2501d4
Unify mwc-icon styles in shared styles.
jameswex Oct 21, 2022
ad657d6
Replace hash values with `primary: [id]` for primary data selection.
cjqian Oct 21, 2022
b774ff8
Add and clean up title text on icons.
cjqian Oct 21, 2022
e4ab24f
Bolds best value in each metric column in the Metrics table.
RyanMullins Oct 21, 2022
1994425
Use expansion panels and pop-out controls for salience module.
iftenney Oct 21, 2022
acea31a
Fix pin/star artifacts and ordering.
cjqian Oct 22, 2022
159ac06
Adds support for GeneratedText[Candidates] in Data Table.
RyanMullins Oct 24, 2022
764674a
Update Scalars to use revised Megaplot binding APIs
RyanMullins Oct 24, 2022
cc5fba2
Fix threshold slider
iftenney Oct 27, 2022
a065a4d
Tidy up pin and star icon handling in the data table
iftenney Oct 27, 2022
670abeb
Port faceting control to use popup-container
iftenney Oct 28, 2022
cca3511
Use <popup-container> for data table column controls
iftenney Oct 28, 2022
7254de3
Add documentation links to modules.
cjqian Oct 31, 2022
ba98322
Adds info button and text to Salience color maps.
RyanMullins Nov 1, 2022
ecd3a66
Adds dataset arg to Component is_compatible() functions.
RyanMullins Nov 3, 2022
de7d8ba
Adds Metrics class to lit_nlp.api.components
RyanMullins Nov 3, 2022
7db22ae
Move the Slice Module to the main toolbar button
jswong65 Nov 3, 2022
77a86f4
Adds title text for metrics table headers.
RyanMullins Nov 3, 2022
4efd58e
Ensure PR and ROC curves have points in correct order for plotting
jameswex Nov 7, 2022
06613b9
Fix state syncing in notebooks.
iftenney Nov 8, 2022
d23ecfc
Option to download or copy Data Table contents and generator output.
iftenney Nov 8, 2022
fd2b976
Don't show sequence salience in regular salience module
iftenney Nov 9, 2022
eac9382
Adds exact match metrics to LIT.
RyanMullins Nov 10, 2022
353b96e
Refactors Scalars module to eliminate duplication for different models.
RyanMullins Nov 11, 2022
757cea5
Merge branch 'dev' of github.com:PAIR-code/lit into tutorial-text-sal…
RyanMullins Nov 12, 2022
636db02
Merge branch 'dev' of github.com:PAIR-code/lit into tutorial-tab-feat…
RyanMullins Nov 12, 2022
2c0703d
Merge pull request #801 from PAIR-code:tutorial-tab-feat-attr-gsoc
a-googler Nov 14, 2022
dce80cd
Merge branch 'dev' of github.com:PAIR-code/lit into tutorial-text-sal…
RyanMullins Nov 14, 2022
4159527
Merge pull request #815 from PAIR-code:tutorial-text-salience-gsoc
a-googler Nov 14, 2022
155e0c4
Adds a "static" Facets Dive-like visualization to LIT.
RyanMullins Nov 14, 2022
1d17ca2
Adds selection states and interactivity to Dive module.
RyanMullins Nov 14, 2022
a0da9cf
Adds zoom and pan interactions to Dive module.
RyanMullins Nov 14, 2022
2392e3f
Bug fix for unused args passing to main() in container demos
RyanMullins Nov 15, 2022
6f7db10
Improved docs for running LIT with Docker.
RyanMullins Nov 15, 2022
902d775
Fix broken link and example parameter in documentation.
cjqian Nov 16, 2022
a090561
docs: cleanup LaTex in Gradient-dot-Input docs
dleve123 Aug 10, 2022
c51d9d6
docs: cleanup LaTex in Gradient Norm docs
dleve123 Aug 10, 2022
0e16619
docs: cleanup LaTex in Integrated Gradients docs
dleve123 Aug 15, 2022
2c913aa
Hotflip integration test fixes
RyanMullins Nov 16, 2022
616a713
Update package versions and clean up dependencies
iftenney Nov 16, 2022
e70c21f
Merge pull request #833 from dleve123:improve-latex-for-saliency-docs
a-googler Nov 16, 2022
691058e
Internal change
RyanMullins Nov 16, 2022
829bc3f
Redo of GitHub PR #833.
RyanMullins Nov 16, 2022
931a782
Rename `Learning Interpretability Tool` to `Language Interpretability…
cjqian Nov 16, 2022
cb5a708
Updated images and captions for the website.
RyanMullins Nov 17, 2022
8c572d6
Update notebook examples and feature documentation
iftenney Nov 17, 2022
94a2f33
LIT v0.5 release notes and docs for Dive and Tabular Feature Attribution
RyanMullins Nov 17, 2022
2e61eb5
Update g3doc images for 0.5 release.
cjqian Nov 17, 2022
e5f0907
T5 demo uses 5% slices of datasets
RyanMullins Nov 17, 2022
1300857
Final content updates for v0.5.0
RyanMullins Nov 18, 2022
ea97b2e
Change the description of the input salience eval demo.
eberts-google Nov 18, 2022
cb560ff
Fixes duplicate pinned datapoint when DataTable.onlySelected == true
RyanMullins Nov 21, 2022
1311081
Fixes SHAP explainer for Multiclass and SparseMulticlass preds.
RyanMullins Nov 22, 2022
3daa9c7
Adds support for loading T5 demo datasets from CSV files.
RyanMullins Nov 23, 2022
dac2128
Fix inconsistent shift-selection bug when toolbar navigation is used.
cjqian Nov 23, 2022
b600cd4
Fix unsorted navigation through datapoint selection bug.
cjqian Nov 23, 2022
bb05699
Consolidate datapoint navigation controls.
cjqian Nov 23, 2022
9a76c10
Adds color block to color legend when "Color By" is None.
RyanMullins Nov 28, 2022
78c4f13
Add padding between widget buttons.
cjqian Nov 29, 2022
fb5f793
Remove "unused" prefix when model isn't used.
cjqian Nov 29, 2022
2d40606
Fixes ScatterGL jitter and disappearance in Embeddings projector
RyanMullins Nov 29, 2022
98b23d7
Fixes LitType parsing bug in serialize._obj_from_json()
RyanMullins Nov 30, 2022
46a4c92
Fixes embedding projector color by behavior
RyanMullins Nov 30, 2022
c3d58d0
Update g3doc images for 0.5 release.
cjqian Nov 30, 2022
2efbb07
Tabular feature attribution tutorial content updates after SHAP inter…
RyanMullins Dec 1, 2022
dc7efed
Ensures "show selected" and "show generated" act as a set intersection.
RyanMullins Dec 1, 2022
ed90576
Support shift select across generated points in Data Table
RyanMullins Dec 1, 2022
febfc5a
Updated gifs for v0.5 release
RyanMullins Dec 1, 2022
f8faefe
Update external images for 0.5 release.
cjqian Dec 1, 2022
93ee4fd
Adding jinja2 to environment.yml
RyanMullins Dec 2, 2022
8653090
Website update for v0.5 release
RyanMullins Dec 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
name: Build and test (${{ matrix.python-version }})
strategy:
matrix:
python-version: ["3.7"]
python-version: ["3.9"]
defaults:
run:
shell: bash -l {0}
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
lit_nlp/yarn-error.log
**/npm-debug.log*
**/yarn-debug.log*
**/yarn-error.log*
website/www/**
**/build/**
**/node_modules/**
**/__pycache__/**
**/*.pyc

**/.DS_Store
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Use the official lightweight Python image.
# https://hub.docker.com/_/python
FROM python:3.7-slim
FROM python:3.9-slim

# Update Ubuntu packages and install basic utils
RUN apt-get update
Expand Down
145 changes: 91 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# 🔥 Language Interpretability Tool (LIT)
# 🔥 Learning Interpretability Tool (LIT)

<!--* freshness: { owner: 'lit-dev' reviewed: '2021-07-13' } *-->
<!--* freshness: { owner: 'lit-dev' reviewed: '2022-11-15' } *-->

The Language Interpretability Tool (LIT) is a visual, interactive
model-understanding tool for ML models, focusing on NLP use-cases. It can be run
as a standalone server, or inside of notebook environments such as Colab,
Jupyter, and Google Cloud Vertex AI notebooks.
The Learning Interpretability Tool (🔥LIT, formerly known as the Language
Interpretability Tool) is a visual, interactive ML model-understanding tool that
supports text, image, and tabular data. It can be run as a standalone server, or
inside of notebook environments such as Colab, Jupyter, and Google Cloud Vertex
AI notebooks.

LIT is built to answer questions such as:

Expand Down Expand Up @@ -50,12 +51,12 @@ For a broader overview, check out [our paper](https://arxiv.org/abs/2008.05122)

## Download and Installation

LIT can be installed via pip, or can be built from source. Building from source
is necessary if you wish to update any of the front-end or core back-end code.
LIT can be installed via `pip` or built from source. Building from source is
necessary if you update any of the front-end or core back-end code.

### Install from source

Download the repo and set up a Python environment:
Clone the repo and set up a Python environment:

```sh
git clone https://github.com/PAIR-code/lit.git ~/lit
Expand All @@ -68,11 +69,11 @@ conda install cudnn cupti # optional, for GPU support
conda install -c pytorch pytorch # optional, for PyTorch

# Build the frontend
pushd lit_nlp; yarn && yarn build; popd
(cd lit_nlp; yarn && yarn build)
```

Note: if you see [an error](https://github.com/yarnpkg/yarn/issues/2821)
running yarn on Ubuntu/Debian, be sure you have the
running `yarn` on Ubuntu/Debian, be sure you have the
[correct version installed](https://yarnpkg.com/en/docs/install#linux-tab).

### pip installation
Expand All @@ -81,62 +82,79 @@ running yarn on Ubuntu/Debian, be sure you have the
pip install lit-nlp
```

The pip installation will install all necessary prerequisite packages for use
of the core LIT package. It also installs the code to run our demo examples.
It does not install the prerequisites for those demos, so you need to install
those yourself if you wish to run the demos. See
[environment.yml](./environment.yml) for the list of all packages needed for
running the demos.
The `pip` installation will install all necessary prerequisite packages for use
of the core LIT package.

It **does not** install the prerequisites for the provided demos, so you need to
install those yourself. See [environment.yml](./environment.yml) for the list of
packages required to run the demos.

## Running LIT

Explore a collection of hosted demos on the
[LIT website demos page](https://pair-code.github.io/lit/demos).

Colab notebooks showing the use of LIT inside of notebooks can be found at [lit_nlp/examples/notebooks](./lit_nlp/examples/notebooks).
A simple example can be viewed
[here](https://colab.research.google.com/github/pair-code/lit/blob/main/lit_nlp/examples/notebooks/LIT_sentiment_classifier.ipynb).

### Quick-start: classification and regression

To explore classification and regression models tasks from the popular [GLUE benchmark](https://gluebenchmark.com/):
To explore classification and regression models tasks from the popular
[GLUE benchmark](https://gluebenchmark.com/):

```sh
python -m lit_nlp.examples.glue_demo --port=5432 --quickstart
```

Navigate to http://localhost:5432 to access the LIT UI.
Navigate to http://localhost:5432 to access the LIT UI.

Your default view will be a
Your default view will be a
[small BERT-based model](https://arxiv.org/abs/1908.08962) fine-tuned on the
[Stanford Sentiment Treebank](https://nlp.stanford.edu/sentiment/treebank.html),
but you can switch to
[STS-B](http://ixa2.si.ehu.es/stswiki/index.php/STSbenchmark) or [MultiNLI](https://cims.nyu.edu/~sbowman/multinli/) using the toolbar or the gear icon in
the upper right.
but you can switch to
[STS-B](http://ixa2.si.ehu.es/stswiki/index.php/STSbenchmark) or
[MultiNLI](https://cims.nyu.edu/~sbowman/multinli/) using the toolbar or the
gear icon in the upper right.

### Quick-start: language modeling

### Quick start: language modeling

To explore predictions from a pretrained language model (BERT or GPT-2), run:
To explore predictions from a pre-trained language model (BERT or GPT-2), run:

```sh
python -m lit_nlp.examples.lm_demo --models=bert-base-uncased \
--port=5432
python -m lit_nlp.examples.lm_demo --models=bert-base-uncased --port=5432
```

And navigate to http://localhost:5432 for the UI.

### Notebook usage

A simple colab demo can be found [here](https://colab.research.google.com/github/PAIR-code/lit/blob/main/lit_nlp/examples/notebooks/LIT_sentiment_classifier.ipynb).
Just run all the cells to see LIT on an example classification model right in
the notebook.
Colab notebooks showing the use of LIT inside of notebooks can be found at
google3/third_party/py/lit_nlp/examples/notebooks.

We provide a simple
[Colab demo](https://colab.research.google.com/github/PAIR-code/lit/blob/main/lit_nlp/examples/notebooks/LIT_sentiment_classifier.ipynb).
Run all the cells to see LIT on an example classification model in the notebook.

### Run LIT in a Docker container

See [docker.md](https://github.com/PAIR-code/lit/wiki/docker.md) for instructions on running LIT as
a containerized web app. This is the approach we take for our
[website demos](https://pair-code.github.io/lit/demos/).
LIT can be run as a containerized app using [Docker](https://www.docker.com/) or
your preferred engine. Use the following shell commands to build the default
Docker image for LIT from the provided `Dockerfile`, and then run a container
from that image. Comments are provided in-line to help explain each step.

```shell
# Build the docker image using the -t argument to name the image. Remember to
# include the trailing . so Docker knows where to look for the Dockerfile
docker build -t lit_app .

# Now you can run LIT as a containerized app using the following command. Note
# that the last parameter to the run command is the value you passed to the -t
# argument in the build command above.
docker run --rm -p 5432:5432 lit-app
```

The image above defaults to launching the GLUE demo on port 5432, but you can
override this using environment variables. See our
[advanced guide](https://github.com/PAIR-code/lit/wiki/docker.md) for detailed instructions on using the default
LIT Docker image, running LIT as a containerized web app in different scenarios,
and how to creating your own LIT images.

### More Examples

Expand All @@ -154,33 +172,52 @@ watch this [video](https://www.youtube.com/watch?v=CuRI_VK83dU).
## Adding your own models or data

You can easily run LIT with your own model by creating a custom `demo.py`
launcher, similar to those in [lit_nlp/examples](./lit_nlp/examples). The basic
steps are:
launcher, similar to those in [lit_nlp/examples](./lit_nlp/examples). The
basic steps are:

* Write a data loader which follows the
[`Dataset` API](https://github.com/PAIR-code/lit/wiki/api.md#datasets)
* Write a data loader which follows the [`Dataset` API](https://github.com/PAIR-code/lit/wiki/api.md#datasets)
* Write a model wrapper which follows the [`Model` API](https://github.com/PAIR-code/lit/wiki/api.md#models)
* Pass models, datasets, and any additional
[components](https://github.com/PAIR-code/lit/wiki/api.md#interpretation-components) to the LIT server
class
[components](https://github.com/PAIR-code/lit/wiki/api.md#interpretation-components) to the LIT server class

For a full walkthrough, see
[adding models and data](https://github.com/PAIR-code/lit/wiki/api.md#adding-models-and-data).

## Extending LIT with new components

LIT is easy to extend with new interpretability components, generators, and
more, both on the frontend or the backend. See our
[documentation](https://github.com/PAIR-code/lit/wiki) to get started.
more, both on the frontend or the backend. See our [documentation](https://github.com/PAIR-code/lit/wiki) to get
started.

## Pull Request Process

To make code changes to LIT, please work off of the `dev` branch and create
pull requests against that branch. The `main` branch is for stable releases, and it is expected that the `dev` branch will always be ahead of `main` in terms of commits.
To make code changes to LIT, please work off of the `dev` branch and
[create pull requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request)
(PRs) against that branch. The `main` branch is for stable releases, and it is
expected that the `dev` branch will always be ahead of `main`.

[Draft PRs](https://github.blog/2019-02-14-introducing-draft-pull-requests/) are
encouraged, especially for first-time contributors or contributors working on
complex tasks (e.g., Google Summer of Code contributors). Please use these to
communicate ideas and implementations with the LIT team, in addition to issues.

Prior to sending your PR or marking a Draft PR as "Ready for Review", please run
the Python and TypeScript linters on your code to ensure compliance with
Google's [Python](https://google.github.io/styleguide/pyguide.html) and
[TypeScript](https://google.github.io/styleguide/tsguide.html) Style Guides.

```sh
# Run Pylint on your code using the following command from the root of this repo
pushd lit_nlp & pylint & popd

# Run ESLint on your code using the following command from the root of this repo
pushd lit_nlp & yarn lint & popd
```

## Citing LIT

If you use LIT as part of your work, please cite [our EMNLP paper](https://arxiv.org/abs/2008.05122):
If you use LIT as part of your work, please cite
[our EMNLP paper](https://arxiv.org/abs/2008.05122):

```
@misc{tenney2020language,
Expand All @@ -198,8 +235,8 @@ If you use LIT as part of your work, please cite [our EMNLP paper](https://arxiv

This is not an official Google product.

LIT is a research project, and under active development by a small team.
There will be some bugs and rough edges, but we're releasing at an early stage
because we think it's pretty useful already. We want LIT to be an open platform,
not a walled garden, and we'd love your suggestions and feedback - drop us a
line in the [issues](https://github.com/pair-code/lit/issues).
LIT is a research project and under active development by a small team. There
will be some bugs and rough edges, but we're releasing at an early stage because
we think it's pretty useful already. We want LIT to be an open platform, not a
walled garden, and we would love your suggestions and feedback - drop us a line
in the [issues](https://github.com/pair-code/lit/issues).
Loading