Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ src/results/*
src/logs/*
idea/*
src/lightning_logs/*
apptainer/*
*.yaml
*.sif
notebooks/.ipynb_checkpoints/RAE-dev-checkpoint.ipynb
src/utils/data/__init__.py
src/utils/evaluation/__init__.py
Expand Down
2 changes: 2 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[tool.isort]
profile = "black"
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# D4L-Hackaton

## Setup
We recommend creating ```venv``` or ```conda``` environment with ```python==3.12```.
We recommend creating ```venv``` or ```conda``` environment with ```python==3.12```.

### Conda and requirements.txt

Expand Down Expand Up @@ -29,14 +29,14 @@ python3 train_and_validate.py [ARGUMENTS]

with possible options:
* ```-h, --help```: show this help message and exit
* ```--method``` {"omivae", "babel", "advae"}
* ```--method``` {"omivae", "babel", "advae"}
* ```--config``` (default="standard"): Name of a configuration in src/config/{method} directory.
* ```--cv-seed``` (default=42): Seed used to make k folds for cross validation.
* ```--n-folds``` (default=5): Number of folds in cross validation.
* ```--subsample-frac``` (default=None): Fraction of the data to use for cross validation.
* ```--retrain``` (default=True): Retrain a model using the whole dataset.

###
###

## Dataset
We use dataset from NeurIPS competition: https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE194122 named GSE194122_openproblems_neurips2021_cite_BMMC_processed.h5ad.gz.
Expand All @@ -50,6 +50,17 @@ log-scaled counts, as well as Spearman correlation.
probability assigned to the correct matching. The latter is a relative measure per dataset that accounts
for non-identifiability among cells with the same identity.

### Pre-commit

Before you can run hooks, you need to have the pre-commit package manager installed.

Using pip: `pip install pre-commit`.

In a python project, add the following to your requirements.txt (or requirements-dev.txt): `pre-commit`.

Then run `pre-commit install` to set up the git hook scripts.


### Viewing logs
To see the logs from different runs from the `src` directory run

Expand Down
32 changes: 32 additions & 0 deletions container_vaes.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
BootStrap: docker
From: ubuntu:22.04


%files
./requirements_vaes.txt

%post
TZ=Europe/Berlin
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

apt -y update && apt -y upgrade

# Install python
apt install -y python3-pip
pip3 install --upgrade pip
apt-get -y install git

echo "PYTHON VERSION"
python3 --version # 3.10.12
pip3 --version # 23.3.2
pip3 install -r requirements_vaes.txt

# Clean cache to reduce size of the image
apt clean
rm -r $(pip cache dir)/*

%startscript
PATH=$PATH:$HOME/.local/bin

%labels
Author Ja
28 changes: 28 additions & 0 deletions mrun.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import glob
import os
from argparse import Namespace

import mrunner
from mrunner.helpers import client_helper
from mrunner.helpers.client_helper import get_configuration

from src.main import main

# mrunner.settings.NEPTUNE_USE_NEW_API = True # comment if running locally

if __name__ == "__main__":
params = get_configuration(
print_diagnostics=True, with_neptune=True, inject_parameters_to_gin=True
)
params.pop("experiment_id")
# verify params: combine_with_defaults(params, defaults=vars(parse_namespace([])))
namespace = Namespace(**params)
try:
client_helper.experiment_["neptune_path"] = os.environ["NEPTUNEPWD"]
except KeyError:
pass

# if not namespace.cpdag and namespace.sampling:
# pass # add constraints here

main(namespace)
File renamed without changes.
Loading