Skip to content

Revamp model specification and parameterization #8

@alvorithm

Description

@alvorithm

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions