A simple (and work-in-progress) Django app for interacting with a database of XAI techniques.
git clone https://github.com/chrisdburr/tea-XAI-demo.git && cd tea-XAI-demo
- Create a
.env
file in the root directory and ensure the following environment variables are set
# PostgreSQL settings
DB_USER=username
DB_PASSWORD=password
DB_HOST=localhost
DB_NAME=xai-techniques
DB_PORT=5432 # change if necessary in case of port conflicts
Warning
This repository contains a pyproject.toml
file, created using Poetry to manage virtual environments and packages. Instructions for poetry are below, but will need to be modified if using alternatives, such as conda or pyvenv.
poetry install
poetry shell
- Ensure environment variables are set (see above)
- Create docker container using
docker compose up -d
- Test to ensure the container is running correctly using
docker ps
Once the virtual environment, packages, and container are created/running, you can populate the database.
python manage.py makemigrations
python manage.py migrate
python run load_and_import.py
Assuming no errors were reported in the previous steps, you can now create a superuser and run the webserver.
python manage.py createsuperuser
# Fill in details as required
python manage.py runserver
You can then navigate to one of the following urls:
- Admin Page: http://127.0.0.1:8000/admin/
- Home Page: http://127.0.0.1:8000/
- List of Techniques: http://127.0.0.1:8000/
- Main API Endpoint: http://127.0.0.1:8000/api/
[!INFO]
You can also runpython manage.py show_urls
in the terminal to see a list of all available urls.
This project is a work-in-progress. Eventually, a proper project page with issues will be developed for the following tasks:
- Move to Turing org (and convert following list to issues)
- Review DB schema to ensure integrity and completeness
- Add full CRUD operations
- Add new columns (i.e. 'Related Techniques', 'Model Details' for "Model Specificity', and 'Complexity (???)' )
- Allow submission of new techniques (for review by admin)
- Add user authentication (i.e. hook into TEA platform)
- Improve descriptions for techniques, i.e. split into short description (for
techniques_list
view) and longer explanation (fortechnique_detail
view) - Add 'sort by' function for 'Technique Name' in
techniques_list
view. - Add unit tests
- Update API endpoints to provide greater interactivity
- Build views and HTML templates for better navigation
- Integrate into TEA platform