TX$^2$
TX$^2$: Transformer eXplainability and eXploration - Published in JOSS (2021)
Science Score: 98.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 8 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org -
✓Committers with academic emails
1 of 3 committers (33.3%) from academic institutions -
✓Institutional organization owner
Organization ornl has institutional domain (software.ornl.gov) -
✓JOSS paper metadata
Published in Journal of Open Source Software
Scientific Fields
Repository
Transformer eXplainability and eXploration
Basic Info
- Host: GitHub
- Owner: ORNL
- License: bsd-3-clause
- Language: Python
- Default Branch: main
- Size: 8.35 MB
Statistics
- Stars: 19
- Watchers: 3
- Forks: 2
- Open Issues: 4
- Releases: 7
Metadata Files
README.md
TX2
Welcome to TX2! This library is intended to aid in the explorability and explainability of transformer classification networks, or transformer language models with sequence classification heads. The basic function of this library is to take a trained transformer and test/train dataset and produce an ipywidget dashboard as seen in the screenshot below, which can be displayed in a jupyter notebook or jupyter lab.

NOTE: Currently this library's implementation is partially torch-dependent, and so will not work with tensorflow/keras models - we hope to address this limitation in the future!
Installation
You can install this package from pypi:
bash
pip install tx2
NOTE: depending on the environment, it may be better to install some of the dependencies separately before
pip installing tx2, e.g. in conda:
bash
conda install pytorch pandas scikit-learn=1.1 numpy=1.22 -c conda-forge
Examples
Example jupyter notebooks demonstrating and testing the usage of this library can be found in the examples folder.
Note that these notebooks can take a while to run the first time, especially if a GPU is not in use.
Packages you'll need to install for the notebooks to work (in addition to the conda installs above):
bash
pip install tqdm transformers==4.21 datasets==2.4
Running through each full notebook will produce the ipywidget dashboard near the end.
The tests in this repository do not depend on transformers, so raw library
functionality can be tested by running pytest in the project root.
Documentation
The documentation can be viewed at https://ornl.github.io/tx2/.
The documentation can also be built from scratch with sphinx as needed.
Install all required dependencies:
bash
pip install -r requirements.txt
Build documentation:
bash
cd docs
make html
The docs/build/html folder will now contain an index.html
Two notebooks demonstrating the dashboard and how to use TX2 are included
in the examples folder, highlighting the default and custom approaches
as discussed in the Basic Usage page of the documentation.
Citation
To cite usage of TX2 in a publication, the DOI for this code is https://doi.org/10.21105/joss.03652
bibtex:
bibtex
@article{Martindale2021,
doi = {10.21105/joss.03652},
url = {https://doi.org/10.21105/joss.03652},
year = {2021},
publisher = {The Open Journal},
volume = {6},
number = {68},
pages = {3652},
author = {Nathan Martindale and Scott L. Stewart},
title = {TX$^2$: Transformer eXplainability and eXploration},
journal = {Journal of Open Source Software}
}
Owner
- Name: Oak Ridge National Laboratory
- Login: ORNL
- Kind: organization
- Email: software@ornl.gov
- Location: Oak Ridge TN
- Website: http://software.ornl.gov
- Repositories: 99
- Profile: https://github.com/ORNL
Software repositories from Oak Ridge National Laboratory
JOSS Publication
TX$^2$: Transformer eXplainability and eXploration
Authors
Tags
explainability natural language processing deep networks transformersGitHub Events
Total
- Create event: 3
- Release event: 2
- Issues event: 1
- Push event: 7
Last Year
- Create event: 3
- Release event: 2
- Issues event: 1
- Push event: 7
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Martindale, Nathan | m****a@o****v | 95 |
| Scott Stewart | 1****l | 13 |
| Scott Stewart | r****k | 4 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 10
- Total pull requests: 0
- Average time to close issues: 27 days
- Average time to close pull requests: N/A
- Total issue authors: 3
- Total pull request authors: 0
- Average comments per issue: 2.5
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- deniederhut (6)
- WildfireXIII (3)
- WarmCyan (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 16 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 7
- Total maintainers: 2
pypi.org: tx2
Transformer eXplainability and eXploration
- Homepage: https://github.com/ORNL/tx2
- Documentation: https://ornl.github.io/tx2/
- License: BSD License
-
Latest release: 1.3.1
published about 1 year ago
Rankings
Maintainers (2)
Dependencies
- autodocsumm *
- ipywidgets *
- matplotlib *
- nltk *
- numpy *
- pandas *
- pytest *
- pytest-mock *
- scikit-learn *
- sphinx *
- sphinx-rtd-theme *
- torch *
- tqdm *
- umap-learn *
- wordcloud *
- ipywidgets *
- matplotlib *
- nltk *
- numpy <=1.20
- pandas *
- scikit-learn <=1.2
- torch *
- tqdm *
- umap-learn *
- wordcloud *
- actions/checkout v2 composite
- actions/setup-python v2 composite
- pytest-profiling *
- black
- ca-certificates
- ipympl
- ipywidgets
- isort
- jupyter
- jupyterlab
- matplotlib
- numpy
- openssl
- pandas
- pre-commit
- pytest
- pytest-mock
- python
- pytorch
- scikit-learn
- tqdm
- transformers
- umap-learn
- wordcloud
