Repository navigation
Conversation
Add a second self-hosted runtime benchmark that times training and
inference of HyraxAutoencoderV2 + HSCDataset on the HSC1k Zenodo cutouts
against a pure-PyTorch autoencoder and FITS Dataset that reproduce the
same tensors and architecture. A parity guard checks the two model
state_dicts before timing.
run_timebench.py gains --benchmark {cifar,hsc,all} (default cifar) and
writes one <commit>_<benchmark>_<timestamp>.json per benchmark. The
self-hosted workflow now runs both benchmarks and publishes every
result file it prints.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
drewoldag
commented
Oct 26, 2026
Comment on lines
45
to
+47
| export CIFAR_DIR="/astro/store/shiren/wqy37/datasets" | ||
| # path to the HSC1k cutouts (downloaded on first use) | ||
| export HSC_DIR="/astro/store/shiren/wqy37/datasets" |
Collaborator
Author
There was a problem hiding this comment.
Don't have to change this in this PR, but clearly we don't want this to be the place where we store data.
drewoldag
commented
Oct 26, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Different sampling regimes and inconsistent handling of non-default training fractions undermine the framework comparisons.
2 open issues
What changed in this PR
Adds an HSC1k autoencoder runtime benchmark alongside CIFAR-10, extending Hyrax’s performance comparisons to its astronomy workflow.
Changes:
- Adds PyTorch and Hyrax training/inference benchmarks with architecture checks and reconstruction-MSE reporting.
- Adds benchmark selection and separate, labeled JSON results while preserving CIFAR as the default.
- Documents usage and updates the self-hosted workflow to run and collect both benchmarks.
| File | Description |
|---|---|
benchmarks_self_hosted/timebench_hsc_utils.py |
Implements HSC data loading, autoencoder models, and repeated timing comparisons. |
benchmarks_self_hosted/run_timebench.py |
Adds benchmark selection and per-benchmark result files. |
benchmarks_self_hosted/README.md |
Documents benchmark behavior, commands, and environment variables. |
.github/workflows/pipeline_time_bench.yml |
Runs both benchmarks and publishes their result files. |
Review effort: Balanced
| dict | ||
| Benchmark results. | ||
| """ | ||
| data_dir = ensure_hsc_data() |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1080 +/- ##
=======================================
Coverage 71.56% 71.56%
=======================================
Files 93 93
Lines 9309 9309
=======================================
Hits 6662 6662
Misses 2647 2647 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ed code and superfluous print statement.
drewoldag
marked this pull request as ready for review
October 26, 2026 23:00
Collaborator
Author
|
AE+HSC1000 benchmark is looking pretty good! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
The v0.13 performance work was driven by the self-hosted CIFAR-10 CNN benchmark, which only covers one model/dataset path. This adds a second runtime benchmark for the astronomy path Hyrax is built for:
HyraxAutoencoderV2+HSCDataseton the ~1000 HSC1k Zenodo cutouts (g/r/i FITS), timing training and inference against a pure-PyTorch equivalent.benchmarks_self_hosted/timebench_hsc_utils.py(new): mirrorstimebench_utils.py.HSCTorchDataset: a plaintorch.utils.data.Datasetthat reproducesHSCDataset's tensors (same file regex, sorted filters, min-square center crop,tanh). It reads FITS on every__getitem__with no caching, i.e. idiomatic PyTorch.AutoencoderV2: a standalone copy of theHyraxAutoencoderV2architecture with no Hyrax imports.check_architecture_parity: an untimed guard that comparesstate_dictkeys/shapes againstHyraxAutoencoderV2built from default config, so the two can't silently drift apart.benchmark_pytorch_hsc/benchmark_hyrax_hsc/benchmark_repeated_hsc: time train and infer; the quality metric is the final epoch-averaged training MSE (computed sample-weighted like_attach_epoch_metric_averaging; the Hyrax value is read from MLflow'straining/epoch/avg_loss).run_timebench.py: adds--benchmark {cifar,hsc,all}(defaultcifar, so existing behavior is unchanged). Result files are now<commit>_<benchmark>_<timestamp>.jsonwith abenchmarkkey; CIFAR keys are otherwise unchanged.benchmarks_self_hosted/README.md(new): how to run, env vars (CIFAR_DIR,HSC_DIR,RESULT_PATH), what each benchmark compares..github/workflows/pipeline_time_bench.yml: exportsHSC_DIR, runs--benchmark all, and copies everyRESULT_FILE=line intogondor_results/.Design decisions
data_set.use_cache = true.use_cacheis recorded per framework in the result JSON.split = {"train": 1.0}).Verification
state_dicts match.python benchmarks_self_hosted/run_timebench.pywith no flag still runs CIFAR only.ruffand all pre-commit hooks pass except the Sphinx build, which fails on pre-existing docs warnings.🤖 Generated with Claude Code