@File : _experiment.py @Time : 2026/06/25 12:53:37 @Author : Alejandro Marrero (amarrerd@ull.edu.es) @Version : 1.0 @Contact : amarrerd@ull.edu.es @License : (C)Copyright 2026, Alejandro Marrero @Desc : None
GenerationExperiment
Source code in digneapy/lab/_experiment.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | |
__call__()
Execute all configured runs and return their generated results.
| Returns: |
|
|---|
Source code in digneapy/lab/_experiment.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | |
__init__(experiment_name, base_dir, runs_to_do, max_workers, root_seed)
Run a collection of experiment configurations in parallel.
The experiment creates a shared base directory, stores the root seed, and dispatches each configured run through a process pool. Results are collected and returned keyed by the run name.
Args:
experiment_name (str): Name of the experiment to perform.
It will be used to create a sub-directory in the given base_dir directory.
base_dir (Path): Base directory to store the results.
runs_to_do (Sequence[RunConfig]): Sequence of RunConfig object that define the
runs the experiment must do.
max_workers (int): Number of processes launched in parallel.
root_seed (np.random.SeedSequence): Root seed of the experiment. Save in the base_dir
directory for reproducibility.
Raises:
TypeError: If not all runs_to_do are RunConfig
ValueError: If base_dir is not a valid directory path
Source code in digneapy/lab/_experiment.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | |