Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the link and external setup #2

Merged
merged 1 commit into from
Feb 10, 2025
Merged
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
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