feat: Add YAML/JSON config system for training and inference#20
Open
KrishanYadav333 wants to merge 1 commit intoML4SCI:mainfrom
Open
feat: Add YAML/JSON config system for training and inference#20KrishanYadav333 wants to merge 1 commit intoML4SCI:mainfrom
KrishanYadav333 wants to merge 1 commit intoML4SCI:mainfrom
Conversation
- Add dataclass-based config schema for project/data/model/diffusion/training/logging - Add load/save helpers for YAML and JSON - Add override and validation support for safe config updates - Add default config file at DENOISING_DIFFUSION/configs/base_config.yaml - Add unit tests for default load, overrides, JSON/YAML IO, and validation This PR establishes a small, reusable configuration layer for upcoming model, scheduler, and trainer implementation PRs.
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.
Pre-GSoC groundwork for the "Denoising Astronomical Observations
of Protoplanetary Disks" project (GSoC 2026).
Started with the config system because everything else — the
U-Net, trainer, inference pipeline — will need a clean way to
load and manage hyperparameters. Felt like the right foundation
to build first before touching any model code.
What's included:
ProjectConfigdataclass that groups all settings (data,model, diffusion, training, logging) in one place
load_config()that reads YAML or JSON and supports nestedoverrides, so running quick experiments doesn't require
editing the base config file
save_config()to snapshot the exact config used in each runFiles changed:
configs/base_config.yaml— default hyperparameterssrc/training/config.py— schema + load/save logicsrc/training/__init__.py— clean exportstests/test_config.py— 6 testsLet me know if anything needs changing!