flambe icon indicating copy to clipboard operation
flambe copied to clipboard

Early checks for constructor argument incompatibilities

Open cle-ros opened this issue 5 years ago • 2 comments

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.

cle-ros avatar Feb 20 '20 20:02 cle-ros

@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 avatar Feb 26 '20 20:02 nmatthews-asapp

@nmatthews-asapp I like the idea. I can try to make a PR for it

jeremyasapp avatar Mar 02 '20 18:03 jeremyasapp