Skip to content

New parallelization mode & generic loss computation

Pre-release
Pre-release
Compare
Choose a tag to compare
@flohey flohey released this 15 Dec 09:37
· 7 commits to main since this release

Changes:

Renaming

  • renamed launch_process_RunturbESN to parallelize_seeds in study.py
  • renamed Callback to callback_seeds in study.py
  • renamed start_thread_RunturbESN to thread_run_turbESN in study.py
  • renamed nstudy to nsettings in util.py, core.py & study.py
  • renamed istudy to isetting in util.py, core.py & study.py
  • renamed CreateStudyConfigArray to create_study_config_list in util.py
  • renamed SaveStudy, ReadStudy, ReadMSE, ReadESNOutput to snake case equivalents
  • renamed ComputeWassersteinDistance to compute_wasserstein_distance in util.py
  • renamed ComputeMSE to compute_mse in util.py
  • renamed ComputeR2 to compute_r2 in util.py
  • renamed RunturbESN to run_turbESN in util.py
  • renamed setDevice to set_device in core.py
  • renamed toTorch to to_torch in core.py
  • renamed _MSE_DEFAULT to _LOSS_DEFAULT in _modes.py

New functionalities

  • added functionality to parallelize grid & random search setting over subprocesses (before: only random seeds were distributed among processors)

    • added parallelize_settings & callback_setting methods in study.py
    • choose between parallelization in run_gs.py via the parameter use_parallel_setting
    • this speeds up studies, where the no. settings is larger than the no. random seeds
  • changed computation of mse in run_turbESN to more generic way: user uses dict esn.loss_func to specify which loss functions should be computed, results are returned in loss_dict

    • added None init. for esn.loss_func
    • adapted save_study, read_study in util.py
    • adapted read in core.py
    • renamed read_mse to read_loss in util.py
    • adapted read_loss in util.py
    • adapted thread_run_turbESN, callback_settings, callback_seeds in study.py
    • adapted forward_validate_auto_ESN in util.py (not tested)

Misc.

  • fixed minor issues in run_gs.py
  • fixed bug in plot_esn_predictions method in util.py
  • added default values to style_dict in plot_esn_predictions & plot_activation_arg_distribution in util.py
  • fixed error in read method in core.py, where self.xrows was not adapted correctly
    • added member variable u_pre_val to ESN object in core.py
  • added option to set u_pre_val via SetValidationData in core.py
  • use self.u_pre_val (if not None) in run_turbESN to initialize reservoir state before validation phase (make it more comparable to test phase, which is also preceded by state from GT data)
  • self.val_init_input is now taken from self.u_pre_val (if val_init_input is None and u_pre_val is not None)
  • removed iseed argument in read_loss, read_study, read_esn_output in util.py
  • adpated basic_tour.ipynb notebook to new turbESN