alan-turing-institute / ThermodynamicAnalyticsToolkit

Sampling-based approach to analyse neural networks using TensorFlow
https://alan-turing-institute.github.io/ThermodynamicAnalyticsToolkit/
GNU General Public License v3.0
22 stars 3 forks source link

Check type of each parameter and give clear error message on fail #42

Closed FrederikHeber closed 6 years ago

FrederikHeber commented 6 years ago

When using the python interface, one gets confusing error message when an option is used with the wrong type. For example, hidden_dimension needs to be a string at the moment. If we use a list of strings, we get an error message.

Python options should have clear types (similar to the ones used by the command-line interface via argparse) and need to admonish if the wrong type is given,

FrederikHeber commented 6 years ago

I need to base the set of options that control sampling, optimization, ..., i.e. 'step_width' and so on, onto a solid base.

To this end, I refactor MockFlags into a full class.

Work has begun in branch *Abstract_Options`.

FrederikHeber commented 6 years ago

Implementation is now done in the following way:

FrederikHeber commented 6 years ago

As this is working and Simulation_interface is merged into v0.9, I close the issue.