Skip to content

Colab-ready GPU validation for ArtP and DArtP - #1

Closed
jsalsman wants to merge 19 commits into
karkirowle:mainfrom
jsalsman:main
Closed

jsalsman wants to merge 19 commits into
karkirowle:mainfrom
jsalsman:main

Conversation

@jsalsman

Copy link
Copy Markdown

Summary

This PR adds a reproducible GPU setup and smoke-test workflow for PathBench’s ArtP and DArtP evaluators, including support for Google Colab T4 runtimes.

The new tools/test_gpu_predictors.py helper:

  • creates and reuses an isolated Python virtual environment;
  • installs pinned CUDA-enabled PyTorch and torchaudio packages;
  • verifies that PyTorch can access the NVIDIA GPU;
  • installs PathBench and its test dependencies;
  • runs focused ArtP and DArtP smoke tests;
  • uses a headless Matplotlib backend in notebook environments;
  • optionally retrieves the English KenLM model from the existing Zenodo archive using HTTP byte ranges, avoiding a download of the complete 35 GB archive;
  • validates the downloaded model using its compressed and expanded sizes, ZIP CRC-32, SHA-256, and KenLM;
  • reuses an existing verified model on subsequent runs;
  • retains the previous skip behavior when the optional language-model download is not requested.

The dependency configuration now uses the published phonemizer-fork==3.3.2 release instead of an inaccessible Git repository.

Documentation and network-free tests cover the GPU workflow, range-based ZIP extraction, archive validation, checksum failures, interrupted requests, insufficient disk space, cache reuse, and related failure cases. An opt-in live test verifies that the expected English model remains available at the pinned location in the Zenodo archive.

Colab validation

Proof: https://colab.research.google.com/drive/1o3G8XjImfuzn2mpvtDrl3_7Y4LEixsfL

The cumulative changes were tested in Google Colab with:

  • Python 3.12.14
  • T4 GPU
  • NVIDIA driver 580.82.07
  • PyTorch 2.6.0+cu124
  • PyTorch CUDA runtime 12.4
  • wiki_en_token.arpa.bin size: 14,600,342,241 bytes

Results:

  • ArtP smoke test: passed
  • DArtP smoke test: passed
  • GPU-helper unit suite: 33 passed, 1 skipped

The skipped default unit test is the intentionally opt-in live-network check.

This upstream PR consolidates the work developed and validated through PRs #1–#6 in the fork.

…dd-script

Add GPU setup guide and predictor smoke-test helper
…oke-tests

Fix GPU setup reruns and repository-relative smoke tests
…y-in-pyproject.toml

Use credential-free phonemizer dependency
…for-language-model-download

Add opt-in cached English KenLM download and validation for GPU smoke tests
…test_gpu_predictors.py

Range-extract the English model from the Zenodo archive
…m-and-documentation

Correct the built-in Zenodo language model checksum
@jsalsman jsalsman closed this Sep 20, 2026
@jsalsman

Copy link
Copy Markdown
Author

Premature; forgot to include:

  • install Ubuntu build packages;
  • build and install the pinned espeak-ng;
  • install or configure the NVIDIA driver

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.

1 participant