Last active
August 29, 2015 13:57
-
-
Save joshp123/9449352 to your computer and use it in GitHub Desktop.
diffev and model methods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> print([m for m in dir(diffev.DiffEv) if m.startswith('set')]) | |
['set_autosave_func', 'set_autosave_interval', 'set_chunksize', 'set_create_trial', 'set_fitting_ended_func', 'set_fom_allowed_dis', 'set_km', 'set_kr', 'set_max_generation_mult', 'set_max_generations', 'set_max_log', 'set_parameter_output_func', 'set_plot_output_func', 'set_pop_mult', 'set_pop_size', 'set_processes', 'set_sleep_time', 'set_text_output_func', 'set_use_autosave', 'set_use_boundaries', 'set_use_max_generations', 'set_use_parallel_processing', 'set_use_pop_mult', 'set_use_start_guess', 'setup_parallel'] | |
>>> print([m for m in dir(model.Model) if m.startswith('')]) | |
['__doc__', '__init__', '__module__', '_read_from_file', '_reset_module', '_save_to_file', 'calc_fom', 'compile_script', 'create_fit_func', 'eval_in_model', 'evaluate_fit_func', 'evaluate_sim_func', 'export_data', 'export_script', 'export_table', 'get_data', 'get_data_as_asciitable', 'get_filename', 'get_fit_pars', 'get_fit_values', 'get_parameters', 'get_possible_parameters', 'get_script', 'get_sim_pars', 'get_table_as_ascii', 'import_script', 'import_table', 'is_compiled', 'load', 'load_addition', 'new_model', 'pickable_copy', 'read_config', 'save', 'save_addition', 'set_fom_func', 'set_script', 'simulate'] | |
>>> | |
>>> m.func_code.co_varnames[:m.func_code.co_argcount] | |
('self',) | |
this guy's getter/setter and architecture is a good strenght and we can build on this, it just took bloody ages to understand because it's very monolthic (not split up into smaller manageble parts)
args -> input fields
catch their generic errors? (could)
filename is file else string nomfp lol
inb4 someone starts executing code hehehe
(snapshot and restart from API)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
getters/setters -> config dashboard
metaprogram it - repr, docstrincs? and errors?
exception flow upwards