Skip to content

Commit a88c580

Browse files
authored
Merge pull request #158 from PAIR-code/dev
Merge dev into main
2 parents c3ab0ac + 140f257 commit a88c580

File tree

264 files changed

+13180
-1297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

264 files changed

+13180
-1297
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
lit_nlp/node_modules/**
21
lit_nlp/yarn-error.log
2+
website/www/**
33
**/build/**
4+
**/node_modules/**
45
**/__pycache__/**
56
**/*.pyc

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ COPY . ./
1212

1313
# Update Ubuntu packages and install basic utils
1414
RUN apt-get update
15-
RUN apt-get install -y wget curl gnupg2
15+
RUN apt-get install -y wget curl gnupg2 gcc g++
1616

1717
# Install yarn
1818
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -

README.md

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ LIT is built to answer questions such as:
1313
* **Does my model behave consistently** if I change things like textual style,
1414
verb tense, or pronoun gender?
1515

16-
![Example of LIT UI](docs/images/figure-1.png)
16+
![Example of LIT UI](documentation/images/figure-1.png)
1717

1818
LIT supports a variety of debugging workflows through a browser-based UI.
1919
Features include:
@@ -32,13 +32,13 @@ Features include:
3232
* **Framework-agnostic** and compatible with TensorFlow, PyTorch, and more.
3333

3434
For a broader overview, check out [our paper](https://arxiv.org/abs/2008.05122) and the
35-
[user guide](docs/user_guide.md).
35+
[user guide](documentation/user_guide.md).
3636

3737
## Documentation
3838

39-
* [User Guide](docs/user_guide.md)
40-
* [Developer Guide](docs/development.md)
41-
* [FAQ](docs/faq.md)
39+
* [User Guide](documentation/user_guide.md)
40+
* [Developer Guide](documentation/development.md)
41+
* [FAQ](documentation/faq.md)
4242
* [Release notes](./RELEASE.md)
4343

4444
## Download and Installation
@@ -61,8 +61,7 @@ conda install cudnn cupti # optional, for GPU support
6161
conda install -c pytorch pytorch # optional, for PyTorch
6262

6363
# Build the frontend
64-
cd ~/lit/lit_nlp
65-
yarn && yarn build
64+
pushd lit_nlp; yarn && yarn build; popd
6665
```
6766

6867
Note: if you see [an error](https://github.com/yarnpkg/yarn/issues/2821)
@@ -84,25 +83,29 @@ running the demos.
8483

8584
## Running LIT
8685

87-
### Quick-start: sentiment classifier
86+
### Quick-start: classification and regression
87+
88+
To explore classification and regression models tasks from the popular [GLUE benchmark](https://gluebenchmark.com/):
8889

8990
```sh
90-
cd ~/lit
91-
python -m lit_nlp.examples.quickstart_sst_demo --port=5432
91+
python -m lit_nlp.examples.glue_demo --port=5432 --quickstart
9292
```
9393

94-
This will fine-tune a [BERT-tiny](https://arxiv.org/abs/1908.08962) model on the
94+
Navigate to http://localhost:5432 to access the LIT UI.
95+
96+
Your default view will be a
97+
[small BERT-based model](https://arxiv.org/abs/1908.08962) fine-tuned on the
9598
[Stanford Sentiment Treebank](https://nlp.stanford.edu/sentiment/treebank.html),
96-
which should take less than 5 minutes on a GPU. After training completes, it'll
97-
start a LIT server on the development set; navigate to http://localhost:5432 for
98-
the UI.
99+
but you can switch to
100+
[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
101+
the upper right.
102+
99103

100104
### Quick start: language modeling
101105

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

104108
```sh
105-
cd ~/lit
106109
python -m lit_nlp.examples.pretrained_lm_demo --models=bert-base-uncased \
107110
--port=5432
108111
```
@@ -114,14 +117,13 @@ And navigate to http://localhost:5432 for the UI.
114117
See [lit_nlp/examples](./lit_nlp/examples). Run similarly to the above:
115118

116119
```sh
117-
cd ~/lit
118120
python -m lit_nlp.examples.<example_name> --port=5432 [optional --args]
119121
```
120122

121123
## User Guide
122124

123-
To learn about LIT's features, check out the [user guide](docs/user_guide.md), or
124-
watch this [short video](https://www.youtube.com/watch?v=j0OfBWFUqIE).
125+
To learn about LIT's features, check out the [user guide](documentation/user_guide.md), or
126+
watch this [video](https://www.youtube.com/watch?v=CuRI_VK83dU).
125127

126128
## Adding your own models or data
127129

@@ -130,33 +132,34 @@ launcher, similar to those in [lit_nlp/examples](./lit_nlp/examples). The basic
130132
steps are:
131133

132134
* Write a data loader which follows the
133-
[`Dataset` API](docs/python_api.md#datasets)
134-
* Write a model wrapper which follows the [`Model` API](docs/python_api.md#models)
135+
[`Dataset` API](documentation/python_api.md#datasets)
136+
* Write a model wrapper which follows the [`Model` API](documentation/python_api.md#models)
135137
* Pass models, datasets, and any additional
136-
[components](docs/python_api.md#interpretation-components) to the LIT server
138+
[components](documentation/python_api.md#interpretation-components) to the LIT server
137139
class
138140

139141
For a full walkthrough, see
140-
[adding models and data](docs/python_api.md#adding-models-and-data).
142+
[adding models and data](documentation/python_api.md#adding-models-and-data).
141143

142144
## Extending LIT with new components
143145

144146
LIT is easy to extend with new interpretability components, generators, and
145147
more, both on the frontend or the backend. See the
146-
[developer guide](docs/development.md) to get started.
148+
[developer guide](documentation/development.md) to get started.
147149

148150
## Citing LIT
149151

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

152154
```
153155
@misc{tenney2020language,
154-
title={The Language Interpretability Tool: Extensible, Interactive Visualizations and Analysis for NLP Models},
156+
title={The Language Interpretability Tool: Extensible, Interactive Visualizations and Analysis for {NLP} Models},
155157
author={Ian Tenney and James Wexler and Jasmijn Bastings and Tolga Bolukbasi and Andy Coenen and Sebastian Gehrmann and Ellen Jiang and Mahima Pushkarna and Carey Radebaugh and Emily Reif and Ann Yuan},
156-
year={2020},
157-
eprint={2008.05122},
158-
archivePrefix={arXiv},
159-
primaryClass={cs.CL}
158+
booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations",
159+
year = "2020",
160+
publisher = "Association for Computational Linguistics",
161+
pages = "107--118",
162+
url = "https://www.aclweb.org/anthology/2020.emnlp-demos.15",
160163
}
161164
```
162165

@@ -165,7 +168,7 @@ If you use LIT as part of your work, please cite [our paper](https://arxiv.org/a
165168
This is not an official Google product.
166169

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

RELEASE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Language Interpretability Tool releases
22

3+
## Release 0.2
4+
5+
This release of LIT coincides with the EMNLP 2020 conference, where the LIT
6+
paper was presented, and the publication of the LIT website, including tutorials
7+
and hosted demos.
8+
9+
The UI has been slightly revamped, bugs have been fixed, and new capabilities
10+
have been added.
11+
312
## Release 0.1.1
413

514
This release of LIT adds a pip package for easy installation, cleans up some of

0 commit comments

Comments
 (0)