eladrich / pyrallis

Pyrallis is a framework for structured configuration parsing from both cmd and files. Simply define your desired configuration structure as a dataclass and let pyrallis do the rest!
https://eladrich.github.io/pyrallis/
MIT License
198 stars 7 forks source link

Configure functions and classes #14

Closed benjs closed 2 years ago

benjs commented 2 years ago

Hey,

Thanks for this library, I will try it in my next project.

One problem I often face is configuring which class or function my code should use, e.g. use ResNet50 or VGG as backbone. This often ends up in if-clauses, and in gin-config one could use the @-Syntax in the config file to bind to functions and classes.

Do you think something similar would be possible with this library too, since we can simply type custom classes like nn.Module/tf.Module/Callable/etc.?