TRAIS-Lab / dattri

`dattri` is a PyTorch library for developing, benchmarking, and deploying efficient data attribution algorithms.
https://trais-lab.github.io/dattri/
MIT License
28 stars 8 forks source link

Add makefile #39

Closed jiaqima closed 4 months ago

jiaqima commented 4 months ago

Description

Added a Makefile for local test.

Usage:

# set up the test environment and install the package
make setup

# run ruff and pytest
make test

# run ruff, pytest, and darglint (on changed files)
make test-more

# run ruff, pytest, and darglint (on all files; note this may be slow)
make test-full

The test logs will be stored in the folder test_logs. Run make clean to remove it.


Also makes darglint more efficient by restricting the check to files that have been changed in this PR.