You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an awesome project! One small enhancement - it would be really nice to support "configurable" population orders for help text beyond the default (look for docstring above argument, then below, then inline).
A common pattern for many codebases I'm working with ends up looking like:
@dataclassclassConfig:
# fmt: offmode: str="train"# Mode in < train | evaluate | visualize ># Data / Preprocessing Parametersdata: Path=Path("data/") # Path to data directory with MNIST images / labelsdownload: bool=True# Whether to download MNIST data (if doesn't already exist)# Model Parametershidden_dim: int=256# Hidden Layer Dimensionality for 2-Layer MLP# fmt: on@pyrallis.wrap()defmain(cfg: Config) ->None:
print(cfg)
Because of style directives (fmt: off) and "factored" configuration arguments, the help text ends up populated as:
usage: main.py [-h] [--config_path str] [--mode str] [--data str] [--download str] [--hidden_dim str]
optional arguments:
-h, --help show this help message and exit
--config_path str Path for a config file to parse with pyrallis
Config:
--mode str fmt: off
--data str Data / Preprocessing Parameters
--download str Whether to download MNIST data (if doesn't already exist) --hidden_dim str Model Parameters
Notably the mode and data and hidden_dim parameters are all populated incorrectly, when ideally they'd be populated inline (e.g. `mode --> "Mode in < train | evaluate | visualize >").
Happy to PR with a fix if that would be easy! I think we just need to pass an additional argument to the initializer in dataclass_wrapper.py!
The text was updated successfully, but these errors were encountered:
This is an awesome project! One small enhancement - it would be really nice to support "configurable" population orders for help text beyond the default (look for docstring above argument, then below, then inline).
A common pattern for many codebases I'm working with ends up looking like:
Because of style directives (
fmt: off
) and "factored" configuration arguments, the help text ends up populated as:Notably the
mode
anddata
andhidden_dim
parameters are all populated incorrectly, when ideally they'd be populated inline (e.g. `mode --> "Mode in < train | evaluate | visualize >").Happy to PR with a fix if that would be easy! I think we just need to pass an additional argument to the initializer in
dataclass_wrapper.py
!The text was updated successfully, but these errors were encountered: