Skip to content

Commit 4d8a9ae

Browse files
authored
Merge pull request #549 from PAIR-code/dev
Merge dev to main for v0.4
2 parents 3eb824b + b254192 commit 4d8a9ae

281 files changed

Lines changed: 52748 additions & 4899 deletions

File tree

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
# ==============================================================================
15+
16+
# Config file for GitHub Actions for CI.
17+
18+
name: CI
19+
20+
# Run on pushes and pull requests on main and dev branches.
21+
on:
22+
push:
23+
branches: [ main, dev ]
24+
pull_request:
25+
branches: [ main, dev ]
26+
27+
# Allows you to run this workflow manually from the Actions tab
28+
workflow_dispatch:
29+
30+
jobs:
31+
build-and-test:
32+
name: Build and test (${{ matrix.python-version }})
33+
strategy:
34+
matrix:
35+
python-version: ["3.7"]
36+
defaults:
37+
run:
38+
shell: bash -l {0}
39+
runs-on: ubuntu-latest
40+
41+
steps:
42+
# Checkout the code for this CI operation.
43+
- uses: actions/checkout@v2
44+
45+
# Setup environment for LIT and test python.
46+
- uses: conda-incubator/setup-miniconda@v2
47+
with:
48+
python-version: ${{ matrix.python-version }}
49+
- run: |
50+
conda env create -f environment.yml
51+
conda activate lit-nlp
52+
pip install pytest lime
53+
pytest -v
54+
55+
# Build front-end.
56+
- uses: actions/setup-node@v2
57+
- run: pushd lit_nlp && yarn && yarn build && popd
58+
59+
# TODO(jwexler): Test front-end

.travis.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

README.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# 🔥 Language Interpretability Tool (LIT)
22

3-
<!--* freshness: { owner: 'lit-dev' reviewed: '2020-08-04' } *-->
3+
<!--* freshness: { owner: 'lit-dev' reviewed: '2021-07-13' } *-->
44

55
The Language Interpretability Tool (LIT) is a visual, interactive
6-
model-understanding tool for NLP models. It can be run as a standalone server,
7-
or inside of notebook environments such as Colab and Jupyter.
6+
model-understanding tool for ML models, focusing on NLP use-cases. It can be run
7+
as a standalone server, or inside of notebook environments such as Colab,
8+
Jupyter, and Google Cloud Vertex AI notebooks.
89

910
LIT is built to answer questions such as:
1011

@@ -39,13 +40,12 @@ Stay up to date on LIT by joining the
3940
[lit-announcements mailing list](https://groups.google.com/g/lit-annoucements).
4041

4142
For a broader overview, check out [our paper](https://arxiv.org/abs/2008.05122) and the
42-
[user guide](documentation/user_guide.md).
43+
[user guide](https://github.com/PAIR-code/lit/wiki/ui_guide.md).
4344

4445
## Documentation
4546

46-
* [User Guide](documentation/user_guide.md)
47-
* [Developer Guide](documentation/development.md)
48-
* [FAQ](documentation/faq.md)
47+
* [Documentation index](https://github.com/PAIR-code/lit/wiki/)
48+
* [FAQ](https://github.com/PAIR-code/lit/wiki/faq.md)
4949
* [Release notes](./RELEASE.md)
5050

5151
## Download and Installation
@@ -94,8 +94,8 @@ Explore a collection of hosted demos on the
9494
[LIT website demos page](https://pair-code.github.io/lit/demos).
9595

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

100100
### Quick-start: classification and regression
101101

@@ -134,7 +134,7 @@ the notebook.
134134

135135
### Run LIT in a Docker container
136136

137-
See [docker.md](documentation/docker.md) for instructions on running LIT as
137+
See [docker.md](https://github.com/PAIR-code/lit/wiki/docker.md) for instructions on running LIT as
138138
a containerized web app. This is the approach we take for our
139139
[website demos](https://pair-code.github.io/lit/demos/).
140140

@@ -148,7 +148,7 @@ python -m lit_nlp.examples.<example_name> --port=5432 [optional --args]
148148

149149
## User Guide
150150

151-
To learn about LIT's features, check out the [user guide](documentation/user_guide.md), or
151+
To learn about LIT's features, check out the [user guide](https://github.com/PAIR-code/lit/wiki/ui_guide.md), or
152152
watch this [video](https://www.youtube.com/watch?v=CuRI_VK83dU).
153153

154154
## Adding your own models or data
@@ -158,20 +158,25 @@ launcher, similar to those in [lit_nlp/examples](./lit_nlp/examples). The basic
158158
steps are:
159159

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

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

170170
## Extending LIT with new components
171171

172172
LIT is easy to extend with new interpretability components, generators, and
173-
more, both on the frontend or the backend. See the
174-
[developer guide](documentation/development.md) to get started.
173+
more, both on the frontend or the backend. See our
174+
[documentation](https://github.com/PAIR-code/lit/wiki/index.md) to get started.
175+
176+
## Pull Request Process
177+
178+
To make code changes to LIT, please work off of the `dev` branch and create
179+
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.
175180

176181
## Citing LIT
177182

RELEASE.md

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

3+
## Release 0.4
4+
5+
This release adds a lot of new features. The website and documentation have
6+
been updated accordingly.
7+
8+
The UI has been slightly revamped, bugs have been fixed, and new capabilities
9+
have been added. Noteable changes include:
10+
- Support for Google Cloud Vertex AI notebooks.
11+
- Preliminary support for tabular and image data, in addition to NLP models.
12+
- Addition of TCAV global interpretability method.
13+
- New counterfactual generators for ablating or flipping text tokens for
14+
minimal changes to flip predictions.
15+
- New counterfactual generator for tabular data for minimal changes to flip
16+
predictions.
17+
- Partial depdence plots for tabular input features.
18+
- Ability to set binary classification thresholds separately for different
19+
facets of the dataset
20+
- Controls to find optimal thresholds across facets given different fairness
21+
constraints, such as demographic parity or equal opportunity.
22+
323
## Release 0.3
424

525
This release adds the ability to use LIT directly in colab and jupyter

docs/assets/css/new.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,3 +639,7 @@ img.status-emoji {
639639
height: 24px;
640640
padding-right: 4px;
641641
}
642+
643+
.tutorial-caption {
644+
padding-bottom: 16px;
645+
}
795 KB
Loading
145 KB
Loading
193 KB
Loading
226 KB
Loading
321 KB
Loading

0 commit comments

Comments
 (0)