Skip to content

About

Data pre-processing and chemprop model for frequent hitter prediction

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Frequent hitter prediction workspace

This repository is organized as follows:

  1. pubchem-etl – download, annotate, and preprocess PubChem BioAssay tables.
  2. pubchem-etl clean-and-score – canonicalize SMILES, deduplicate, compute r-scores, and split assays into biochemical / cellular sets.
    • For datasets other than PubChem BioAssay: python standalone_cleaner.py clean (replacement for the pubchem-etl path; produces the same data/interim/*.parquet inputs expected by downstream tools).
  3. dataset-pipeline – scaffold-aware dataset builder that turns cleaned hits into train/val/test artifacts.
  4. model-jobs / model-jobs-prep – dataset prep and job-script generation helpers.
  5. chemprop – model training CLI, installed from the local clone under ./chemprop/ (with a small patch for new PyTorch defaults).

Documentation

  • docs/cli.md – end-to-end CLI tutorial + repo-wide CLI reference (excluding Chemprop).
  • pubchem-etl/README.md – detailed PubChem ETL pipeline docs (subcommand-level).
  • methods_scaffold_split.md – scaffold split method details used by dataset-pipeline.

Environment setup

To create a shared conda environment named frequent-hitters that can run all of the core components in this repo, run:

conda env create -f environment.frequent-hitters.yml
conda activate frequent-hitters

Install PyTorch via pip (CUDA/CPU/OSX). Use the official PyTorch selector and run the generated command:

https://pytorch.org/get-started/locally/

Install Chemprop from the local clone in this repo:

python -m pip install ./chemprop

Install local packages without pulling in extra deps:

python -m pip install --no-deps ./dataset-pipeline
python -m pip install --no-deps ./model-jobs
python -m pip install --no-deps ./pubchem-etl

Why Chemprop is vendored

This repo installs Chemprop from the local clone under ./chemprop/ (instead of pip install chemprop) because we need a couple of small behavior changes:

  • Checkpoint loading with newer PyTorch/Lightning: newer defaults around weights_only can break Chemprop’s use of load_from_checkpoint / Trainer.predict. The local patch forces weights_only=False in the relevant call sites so Chemprop keeps working without pinning PyTorch to an older version.
  • Multi-label test evaluation edge case: for multi-label problems it’s possible for a target to have no labels in the test split, which makes Chemprop’s test metric evaluation error. The patch adds chemprop train --skip-test-evaluation to still write test_predictions.csv (without filtering targets) while skipping metric computation.

About

Data pre-processing and chemprop model for frequent hitter prediction

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages