experiments.experiment_utils.trial_arg_chunker

trial_arg_chunker(data_fracs, n_trials, n_workers)

Convenience function for parallel processing that chunks up the data fractions and trial indices as arguments for use in the map function of a ProcessPoolExecutor.

Parameters:
  • data_fracs (np.ndarray) – 1-D array of data fractions

  • n_trials (int) – The number of trials per data fraction

  • n_workers (int) – The number of parallel processes that will be used.

Return chunked_list:

A list of lists of tuples (data_frac,trial_index)