Skip to content

Add CPU-only classifier pipeline and Windows-native setup guide#1

Open
ernesttyx wants to merge 1 commit into
bioinfodlsu:mainfrom
ernesttyx:cpu-pipeline-windows-support
Open

Add CPU-only classifier pipeline and Windows-native setup guide#1
ernesttyx wants to merge 1 commit into
bioinfodlsu:mainfrom
ernesttyx:cpu-pipeline-windows-support

Conversation

@ernesttyx

Copy link
Copy Markdown

Summary

  • experiments/run_cpu.py - standalone script that trains and evaluates the PHIStruct MLP classifier using the team's precomputed SaProt embeddings, with no GPU, no Foldseek, and no WSL required. Works on Windows natively with just pip install pandas scikit-learn imbalanced-learn. Covers all four similarity bands (40/60/80/100%) and supports --similarity, --output, and --seed flags.

  • reproduce_on_colab.ipynb - end-to-end independent reproduction notebook for Google Colab (T4 GPU). Runs init.sh, downloads the team's ColabFold-predicted PDB structures, generates SaProt embeddings from scratch via Foldseek + SaProt, trains the classifier, and compares the freshly generated macro F1 against the committed pickle outputs as an independent reproducibility check.

  • README.md - new section "Running Without a GPU (Windows Native / Any CPU)" documenting the run_cpu.py path with exact Google Drive download links and usage examples.

Motivation

I tried to run the full pipeline on Windows (no GPU) and hit the wall described in the README: init.sh requires a Linux/macOS Foldseek binary and a CUDA PyTorch wheel. The precomputed embeddings path (Option 1 in notebook 5.0) works perfectly on any OS with just scikit-learn, but it is buried in the notebook prerequisites and requires reading through several notebooks to piece together. This PR makes that path a first-class, single-command entry point.

The Colab notebook is a separate contribution: an independent reproduction of the full pipeline (embeddings from scratch, classifier training, compare to committed outputs) on a fresh Linux+GPU environment.

Test plan

  • run_cpu.py tested on Windows 11 (no GPU) with the two prerequisite downloads
  • reproduce_on_colab.ipynb designed for Colab T4 GPU; currently running
  • README section verified against existing download links

- experiments/run_cpu.py: trains PHIStruct MLP using precomputed SaProt
  embeddings; no GPU, no Foldseek, no WSL required; works on Windows natively.
  Covers all four similarity bands (<=40/60/80/100%). Flags: --similarity,
  --output, --seed.

- reproduce_on_colab.ipynb: end-to-end reproduction notebook for Google Colab
  (T4 GPU). Runs init.sh, downloads PDB structures, generates SaProt embeddings
  from scratch, trains classifier, compares output to committed pickles.

- README.md: new section documenting the CPU/Windows path with download links.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants