UV is the package manager used in the repo, while Just allows to define custom commands to ease the use of uv commands.
You can check the installation guides for UV and Just at:
- UV: https://docs.astral.sh/uv/getting-started/installation/
- Just: https://github.com/casey/just?tab=readme-ov-file#installation
It follows a quick guide to install them on Linux.
To install UV, run:
curl -LsSf https://astral.sh/uv/install.sh | shTo install Just, run:
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to DESTReplacing DEST with the path to the destination folder (e.g. ~/.local/bin). Ensure that the chosen location is in the PATH.
Go to the root of the project to execute just commands.
To see all available commands, run:
just helpTo install all dependencies, run:
just installAfter the dependencies have been installed, you can either:
- Activate the virtual environment that has been created in the
.venvfolder and run python scripts as usual. - Use directly the
uv runcommand to skip the environment activation step.
The source code and the scripts are organized in the audit directory as follows:
audit
├── README.md
├── audit # Source code
│ ├── attacks
│ │ ├── __init__.py
│ │ ├── attack_utils.py
│ │ └── lira.py
│ ├── constants.py
│ ├── dataset.py
│ ├── main.py
│ ├── models.py
│ ├── one_round_audits
│ │ ├── __init__.py
│ │ ├── approximate.py
│ │ ├── diffusion.py
│ │ ├── global_loss.py
│ │ ├── lira.py
│ │ ├── local_rank.py
│ │ └── utils
│ │ ├── __init__.py
│ │ ├── eps_estimation.py
│ │ ├── guided_diffusion.py
│ │ ├── neighbors.py
│ │ └── stable_diffusion.py
│ ├── train
│ │ ├── __init__.py
│ │ ├── privacy_engine.py
│ │ └── train.py
│ └── utils.py
├── pyproject.toml
└── scripts # Scripts to train models and perform audits via slurm
├── attack.sh
├── audit_dpsgd.sh
├── audit_relax_loss.sh
├── audit_undefended.sh
├── train_dpsgd.sh
├── train_relax_loss.sh
└── train_undefended.sh