Skip to content

Encoder testing#495

Draft
smaharjan-web wants to merge 20 commits into
boom-astro:mainfrom
smaharjan-web:encoder-testing
Draft

Encoder testing#495
smaharjan-web wants to merge 20 commits into
boom-astro:mainfrom
smaharjan-web:encoder-testing

Conversation

@smaharjan-web

Copy link
Copy Markdown
Contributor

No description provided.

KeshavMajithia and others added 20 commits April 30, 2026 22:44
- rtf.rs: prepare_features() builds (1,257,37) photometry tensor,
  (1,257) pad mask, and (1,3,63,63) CHW cutout from ZTF alert data.
  30 metadata channels match ALERT_META_KEYS from training pipeline.

- mtan.rs: prepare_features() filters g/r photometry, merges nearby
  obs, normalizes magnitudes and time, pads to 200 steps. Adds
  pool_embedding() to mean-pool qz0_mean into 2D vector.

- ztf.rs: ZtfAlertEmbeddings struct, compute_embeddings() method,
  integrated into process_alerts() to store embeddings in MongoDB
  alongside existing classifications.
Adds an initContainer to the ZTF scheduler k8s deployment that pulls
rtf_embed.onnx and mtan_embed.onnx from boom-astro/boomEncoders into
an emptyDir volume mounted at /app/data/models. The main container
reads these model files at startup to initialize ONNX inference.
…dings

- compute_embeddings: replace .lock().unwrap() with match on lock()
  to gracefully handle poisoned mutex instead of panicking the worker
- compute_embeddings: return None when both RTF and mTAN fail, so
  MongoDB doesn't get { rtf: null, mtan: null } written needlessly
- mtan.rs: add comment explaining last-write-wins merge matches the
  Python training pipeline for numerical consistency
- k8s: remove stale NOTE about uploading ACAI/BTSBot (already done)
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