Skip to content

DPBayes/DP-HMC-experiments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Differentially Private Hamiltonian Monte Carlo

Installing dependencies

We use Anaconda, specifically Miniconda to manage our dependencies. Once you have Anaconda installed, run

conda env create -f environment.yml

to create the Anaconda environment named dp-hmc-env with the dependencies. Next, activate the environment with

conda activate dp-hmc-env

Running the Experiments

The experiments are run with Snakemake, which is installed as part of the dependencies.

The command

snakemake -j 4

runs all of the experiments on the CPU and produces the all of the figures to ../latex/figures. Intermediate results are placed in results/. The number after -j sets the number of concurrent jobs that are run, and can be set according to the number of available CPU cores.

Using the GPU

To run the experiments on the GPU, first reinstall JAX using the installations instructions for GPU into the dp-hmc-env Anaconda environment. The command to run the experiments is the same

snakemake -j 1

but you must use -j 1, as JAX allocates 90% of GPU memory per job, so running more than one job concurrently will crash any extra jobs.

About

Differentially Private Hamiltonian Monte Carlo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages