Skip to content

Commit

Permalink
Merge pull request #2 from gmum/fix_minor_issues
Browse files Browse the repository at this point in the history
Update the link and external setup
  • Loading branch information
panpiort8 authored Feb 10, 2025
2 parents b12fc89 + 62d03ec commit 00e68a1
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ conda activate gflownet
pip install torch==2.3.0 --index-url https://download.pytorch.org/whl/cu118
pip install dgl==1.1.2 -f https://data.dgl.ai/wheels/torch-2.3/cu118/repo.html

# If using CPU:
pip install torch==2.3.0 --index-url https://download.pytorch.org/whl/cpu
pip install dgl==1.1.2 -f https://data.dgl.ai/wheels/torch-2.3/cpu/repo.html

pip install -e .

pip install pre-commit
Expand All @@ -45,7 +49,7 @@ To evaluate the RetroGFN using [Syntheseus API](https://github.com/microsoft/syn
```sh
sh external/setup_syntheseus.sh
```
If you want to additionally evaluate the RetroGFN with round-trip accuracy, you need to download the (eval) Chemformer Forward checkpoints from [here](https://ujchmura-my.sharepoint.com/:f:/r/personal/piotr_gainski_doctoral_uj_edu_pl/Documents/feasibility_proxies/chemformer?csf=1&web=1&e=rIjzdH) into `checkpoints` directory.
If you want to additionally evaluate the RetroGFN with round-trip accuracy, you need to download the (eval) Chemformer Forward checkpoints from [here](https://ujchmura-my.sharepoint.com/:f:/g/personal/piotr_gainski_doctoral_uj_edu_pl/EuN67EdWZ6JCs7bkhV0zJCUBRhH-tO7nNrHNSjBzdJuXVg?e=b3sgcs) into `checkpoints` directory.

### Setup RFM Proxy
To train the RetroGFN using Reaction Feasibility Model (RFM) and evaluate it with Feasibility Thresholded Count (FTC) metric, you need to install [our RFM repository](https://github.com/panpiort8/ReactionFeasibilityModel/) with the following command:
Expand Down
13 changes: 13 additions & 0 deletions external/setup_shared.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# Add the `external/` directory to `PYTHONPATH` when the environment is activated.
mkdir -p $CONDA_PREFIX/etc/conda/activate.d
echo "export PYTHONPATH=$PWD/external:.:$PYTHONPATH" >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
source $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh

export GITHUB_NAME="$GITHUB_ORG_NAME/$GITHUB_REPO_NAME"
export MODEL_DIR="external/$GITHUB_REPO_DIR"

echo "Setting up $GITHUB_NAME under $MODEL_DIR"
git -C external clone "git@github.com:$GITHUB_NAME.git" $GITHUB_REPO_DIR
git -C $MODEL_DIR checkout $GITHUB_COMMIT_ID
11 changes: 11 additions & 0 deletions external/setup_syntheseus.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# Install extra dependencies specific to Chemformer.
pip install pytorch-lightning==1.9.4 git+https://github.com/MolecularAI/pysmilesutils.git

export GITHUB_ORG_NAME=panpiort8
export GITHUB_REPO_NAME=syntheseus
export GITHUB_REPO_DIR=syntheseus
export GITHUB_COMMIT_ID=e5754963e4768ceada4fe7a60199bb1c5ceed2ea

source external/setup_shared.sh

0 comments on commit 00e68a1

Please sign in to comment.