-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move TyDi QA demo to its own directory.
PiperOrigin-RevId: 588490476
- Loading branch information
1 parent
ac8ed59
commit 724bdee
Showing
9 changed files
with
53 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,5 +15,6 @@ docs/documentation/.doctrees/** | |
|
||
**/.DS_Store | ||
.dalle-venv/ | ||
.tydi-venv/ | ||
.venv/ | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
TyDi QA Demo for the Learning Interpretability Tool | ||
======================================================= | ||
|
||
This demo showcases how LIT can be used to a multilingual question-answering | ||
model trained on the [TyDi QA dataset](https://doi.org/10.1162/tacl_a_00317) | ||
using FLAX. | ||
|
||
You will need a stand-alone virtual environment for the Python libraries, which you can set up using the following commands from the root of the LIT repo. | ||
|
||
```sh | ||
# Create the virtual environment. You may want to use python3 or python3.10 | ||
# depends on how many Python versions you have installed and their aliases. | ||
python -m venv .tydi-venv | ||
source .tydi-venv/bin/activate | ||
# This requirements.txt file will also install the core LIT library deps. | ||
pip install -r ./lit_nlp/examples/tydi/requirements.txt | ||
# The LIT web app still needs to be built in the usual way. | ||
(cd ./lit_nlp && yarn && yarn build) | ||
``` | ||
|
||
Once your virtual environment is setup, you can launch the demo with the | ||
following command. | ||
|
||
```sh | ||
python -m lit_nlp.examples.tydi.demo | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright 2023 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# ============================================================================== | ||
|
||
-r ../../../requirements_core.txt | ||
|
||
jax==0.3.16 | ||
jaxlib==0.3.15 | ||
flax==0.5.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters