Remove exploratory/branched implementations from main (VQ-VAE, original ResNets, EMA, pre-transformer UNet) - #12
Open
jlotthammer wants to merge 3 commits into
Open
Conversation
…EMA) These modules had zero importers in the production or training paths: - models/quantize.py (VQ-VAE VectorQuantizer2) - models/resnets_original.py (pre-vae_components ResNet enc/dec) - models/ema.py (EMA, never wired into training/diffusion) Also drops their Sphinx autosummary stubs and api.rst entries. Preserved on archive/pre-cleanup.
The production diffusion backbone is the ViT/DiT transformer; the UNet was the pre-transformer implementation. Its only remaining tie to production was vit.py importing SinusoidalPosEmb, which is an identical class already defined in transformer.py. - vit.py: import SinusoidalPosEmb from transformer instead of unet - diffusion_train.py: drop the unused UNetConditional construction (the real backbone passed to the diffusion model was already the ViT); dump the actual diffusion model architecture to model_architecture.txt - delete models/unet.py, configs/unet/unet.yaml (and its defaults entry) - drop unet Sphinx stubs and api.rst entry Preserved on archive/pre-cleanup.
- pyproject: remove starling-sample and ae-train console scripts; both pointed at modules that do not exist (training/vae_generate.py, training/ae_train.py) - diffusion_train.py: remove 'import starling.data.ddpm_loader' (module does not exist; only ddpm_loader_tar is present), which broke starling-ddpm-train at import time. The alias was never referenced.
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
Removes exploratory / branched implementations from
mainthat were not part of the deployed STARLING system, leaving only the production model code (VAE distance-map autoencoder + ViT/DiT latent diffusion) and the training code used to produce it.Full pre-cleanup state is preserved on the
archive/pre-cleanupbranch (tagarchive/pre-cleanup-2026-07-16).Net change: −1937 lines, no production code paths altered.
What was removed
Orphaned model modules (zero importers in production or training):
models/quantize.py— VQ-VAEVectorQuantizer2models/resnets_original.py— pre-vae_componentsResNet enc/decmodels/ema.py—EMA, never wired into training or diffusionPre-transformer UNet backbone (superseded by the ViT/DiT transformer):
models/unet.py,configs/unet/unet.yaml(+ itsconfigs.yamldefaults entry)vit.pyimportingSinusoidalPosEmb; that class is byte-identical to the one already intransformer.py, so the import was redirected there.UNetConditionalconstruction indiffusion_train.py(the real backbone passed to the diffusion model was already the ViT).Broken references / bit-rot:
pyproject.toml: removedstarling-sampleandae-trainconsole scripts (targeted non-existent modulestraining/vae_generate.py,training/ae_train.py).diffusion_train.py: removedimport starling.data.ddpm_loader(module does not exist — onlyddpm_loader_taris present; this brokestarling-ddpm-trainat import time).Docs: removed the Sphinx autosummary stubs and
api.rstentries for all deleted modules.What was deliberately kept
vae.py,vae_components.py,distributions.py) — this is the production distance-map autoencoder, loaded at inference. Only the VQ-VAE variant was exploratory.evaluate_vae.py+benchmark_mds.py— wired to the livestarling-benchmarkCLI.devtools/scripts/— left untouched.Verification
.pybyte-compile;import starling+ all affected modules import at runtime;ViT(12,512,8,512)constructs.pyprojectconsole scripts resolve to realmodule:functiontargets.Out of scope (pre-existing, not caused by this PR)
8 stochastic generation/reconstruction tests in
test_starling.pyfail because ~19/100 generated conformations contain NaN on this environment (torch 2.13.0). Confirmed identical failures on a cleanmainworktree, so this is unrelated to the cleanup and tracked separately.