Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp model specification and parameterization #8

Open
alvorithm opened this issue Mar 5, 2020 · 1 comment
Open

Revamp model specification and parameterization #8

alvorithm opened this issue Mar 5, 2020 · 1 comment
Assignees

Comments

@alvorithm
Copy link

alvorithm commented Mar 5, 2020

get_models from nflows doesn't scale, is annoying

Instead, as a minimum, we want a pluggable system (=extensible) for defining models that is based on templating.

  • A designated directory, e.g. zoo or lib contains modules that group parameterizable functions. Lookup is done via getattr. The user gets to specify in global configuration where else to look for models. A model's identifier is the namespace + function name. Parameters can be read from similarly-named dictionaries, serialized as e.g. yaml files (example).
  • Models can be reused simply by copying and renaming.

For extra points:

  • extend the configuration system to training hyperparameters, logging, etc. As an example, consider the respective sections here.
  • study thinc's configuration system and potentially adopt it (needs to cover functionality described above). It's based on Google's gin though they it's "simpler and emphasizes a different workflow via a subset of Gin’s functionality".

What we don't want, under ANY circumstance: magic numbers sprinkled in the code, long command lines that disappear in the console's log (at best). What we want: declarative configuration with a measure of imperative flexibility (this is exactly what gin/thinc.config provide, see thinc's intro notebook).

The system should eventually be reusable in sbi.

@alvorithm alvorithm self-assigned this Mar 5, 2020
@alvorithm
Copy link
Author

A good practice test would be to create the models used in nsf for the uci dataset: linear_transform, base_transform and transform

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

No branches or pull requests

1 participant