flambe
flambe copied to clipboard
Early checks for constructor argument incompatibilities
Is your feature request related to a problem? Please describe. Given that an experiment can take a long time to get to the latest object initialization step, any incompatibilities of arguments to the constructors should be caught as early as possible.
Describe the solution you'd like
I think that flambe.component
should have a classmethod check_constructor_args(*args, **kwargs)
that's automatically called very early after starting an experiment. This would offer the option to override that method, so that any kind of exception could be raised very, very early in the experiment's pipeline.
@jeremyasapp I propose we have some kind of test run functionality that initializes all objects but doesn't run them, as that will cover this feature request in a general way that doesn't require additional non-standard functions from users
@nmatthews-asapp I like the idea. I can try to make a PR for it