Skip to content

Latest commit

 

History

History
145 lines (93 loc) · 3.51 KB

File metadata and controls

145 lines (93 loc) · 3.51 KB

Developer Guide

This guide will help you get started with developing aiconfigurator. We welcome contributions from the community!

Initial Setup

1. Install Git LFS

Git LFS is required to handle large database files in the repository.

apt-get install git-lfs

2. Clone the Repository

git clone https://github.com/ai-dynamo/aiconfigurator
cd aiconfigurator

# Pull LFS files
git lfs pull

3. Set Up Python Virtual Environment

# Create virtual environment
python3 -m venv .venv

# Activate virtual environment
source .venv/bin/activate

4. Install Development Dependencies

# Install the package in editable mode with dev dependencies
pip install -e ".[dev]"

5. Install Pre-Commit Hooks

pre-commit install

This installs:

  • The aiconfigurator package in editable mode
  • All runtime dependencies
  • Development tools: ruff, pre-commit, pytest and related plugins

Optional: Install Ruff Extension

If you are using VS Code or one of its forks (e.g. Cursor), you can install the Ruff extension which will highlight linting issues in your editor. You can also configure your editor to auto-apply formatting when saving files using the instructions here.

Development Workflow

Code Style and Linting

This project uses Ruff for linting and formatting.

Run Linting

# Check for linting issues
ruff check .

# Auto-fix linting issues
ruff check --fix .

Run Formatting

# Check formatting
ruff format --check .

# Apply formatting
ruff format .

Pre-commit Hooks

Pre-commit hooks automatically run checks before each commit.

Run Pre-commit Manually

pre-commit run --all-files

Running Tests

This project uses pytest for testing.

# Run all tests
pytest tests

# Run tests for a specific component
pytest tests/unit
pytest tests/e2e

# GitHub PR / build subset (unit + a small stable E2E subset)
pytest -m "unit or build"

Data Collection (Advanced)

Data collection is typically not required for development. The repository includes pre-collected performance databases for supported systems.

If you need to collect new data for a new GPU type or framework version, refer to the Collector README.

Contributing

Before contributing, please read:

Common Development Tasks

Adding a New Model

Refer to How to Add a New Model.

Running Automation Scripts

Refer to the Automation README.

Getting Help

  • Documentation: Check the docs/ directory
  • Issues: Open an issue on GitHub
  • Examples: Explore tools/simple_sdk_demo/ for SDK usage examples

License

This project is licensed under Apache 2.0. All contributions must include SPDX license headers and DCO sign-off.