Skip to content
/ astra-rl Public

The Adaptive Stress Testing for Robust AI (ASTRA) toolbox provides tooling to support model developers and testing in the full life cycle of making more robust AI Systems through the application of adaptive stress testing and adversarial training.

License

Notifications You must be signed in to change notification settings

sisl/astra-rl

Repository files navigation

ASTRA - Adaptive Stress Testing for Robust AI

Test Coverage Status Docs License


ASTRA-RL Toolbox

ASTRA-RL is a python toolbox for training and evaluating language models and generative AI systems that use textual inputs. It provides a set of tools for training, evaluating, and analyzing language models, with a focus on applying reinforcement learning based refinement techniques to improve evaluator model performance.

Installation

To install the ASTRA-RL toolbox, you can use pip. The package is available on PyPI, so you can install it directly from there.

pip install astra-rl

You can then import the library in your Python code:

import astra_rl
# or
import astra_rl as astral

Development

This section provides instructions for setting up the development environment and running tests.

To start, we STRONGLY recommend using uv to manage your Python environment. This will ensure that you have the correct dependencies and versions installed.

Setting Up the Development Environment

  1. Clone the repository:

    git clone https://github.com/sisl/astra-rl.git
    cd astra-rl
  2. Sync package dependencies:

    uv sync --dev

    This will create a .venv directory in the project root with all the necessary dependencies installed.

  3. Install pre-commit hooks:

    uv run pre-commit install

    This will ensure that the linter (ruff), formatter (ruff), and type checker (mypy) is happy with your code every time you commit.

Running Tests

Assuming you've set up your environment using uv, you can run the tests using the following command:

pytest

or

uv run pytest

To generate local coverage reports, you can use:

uv run coverage run -m pytest
uv run coverage report # Generate CLI report
uv run coverage html   # Generate HTML report

Generating Documentation

To generate the documentation, you can use the following command:

uv run mkdocs serve

This will build the documentation and start a local server. You can then view the documentation in your web browser.

About

The Adaptive Stress Testing for Robust AI (ASTRA) toolbox provides tooling to support model developers and testing in the full life cycle of making more robust AI Systems through the application of adaptive stress testing and adversarial training.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages