Skip to content

refactor: config plumbing and coding-style cleanup (no functional changes) - #648

Open
alfxu-amd wants to merge 4 commits into
mainfrom
refactor_clean_up
Open

refactor: config plumbing and coding-style cleanup (no functional changes)#648
alfxu-amd wants to merge 4 commits into
mainfrom
refactor_clean_up

Conversation

@alfxu-amd

Copy link
Copy Markdown
Collaborator

Summary

A refactor-only pass. No functional changes — behavior, numerics, and public
APIs are unchanged; this is about structure and coding style.

Config handling

LM_Config had accumulated model-specific members that were all just copies of
values already present in _json_config. Every new model meant another field on
a struct passed by value across the DLL boundary, and the two mirrored
lm_config.hpp copies had to be kept layout-identical by hand.

LM_Config now carries only paths, name, version, and the raw _json_config,
with get<T>(key, default) and sub(key) accessors. Model code reads what it
needs directly. Note that sub()/get<T>() exist rather than plain
nlohmann .value() because real configs carry JSON nulls (e.g.
"sliding_window": null), which .value() throws on.

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