Skip to content

aidos-lab/mantra-benchmarks

Repository files navigation

MANTRA: Manifold Triangulations

Setup

Either via Docker or a standard setup. Start with:

git submodule update --init --recursive

Standard setup

  1. Setup python version 3.10.13. E.g. with pyenv install 3.10.13 and pyenv local 3.10.13. Set up a virtual environment, e.g. via python3 -m venv ./venv and source ./venv/bin/activate,
  2. Install dependencies via poetry
$ python -m pip install --upgrade pip
$ pip install poetry
$ poetry install
  1. pip install -e ./dependencies/TopoModelX/
  2. pip install -e ./dependencies/mantra/

Docker

Depending on your setup, you may need to run the docker commands via sudo.

  1. Install Docker on your device. On Ubuntu, for instance, refer to official_installation_instructions
  2. Edit the variables USER_NAME to GROUP_ID in the Dockerfile
  3. docker compose up --build -d. Check that container is running via docker ps
  4. docker exec -it mantra_container /bin/bash
  5. When inside the container, run source /deps/venv/bin/activate to source the ready virtual environment

Usage

  1. Change in code directory.
  2. Generate experiment configurations: ./generate_configs.sh
  3. Run experiments:
$ python ./experiments/run.py --mode "single" --config "/path/to/config.yaml" --wandb "wandb-project-id"

for running a single experiment or

$ python ./experiments/run.py --mode "all" --wandb "wandb-project-id"

for running all experiments.

  1. Run benchmarking
$ python ./experiments/run.py --mode "<single/all>" --checkpoints "<checkpoints/to/be/benchmarked>"
  1. Result processing and table generation.
$ python ./experiments/generate_tables.py
# optional
$ pandoc results_2fullmanifolds.md -o results_2fullmanifolds.pdf -V geometry:margin=0.1in -V geometry:a1paper

Results

Results can be inspected in notebooks/interpret_results.ipynb

Development

  • Formatting using black 24.4.2. Install via pip (pip install black==24.4.2).

Dataset distribution

Name
'S^2' 'RP^2' 'T^2' 'Klein bottle' ''
306 1367 2229 4655 34584
Orientability
True False
3420 39718
Betti Numbers
Betti_0
1
43138
Betti_1
0 1 2 3 4 5 6
1670 4655 14146 13694 7917 1022 34
Betti_2
0 1
39718 3420

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •