study_da
create(path_config_scan='config_scan.yaml', force_overwrite=False, dic_parameter_all_gen=None, dic_parameter_all_gen_naming=None, add_prefix_to_folder_names=False)
Create a study based on the configuration file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path_config_scan
|
str
|
Path to the configuration file for the scan. Defaults to "config_scan.yaml". |
'config_scan.yaml'
|
force_overwrite
|
bool
|
Flag to force overwrite the study. Defaults to False. |
False
|
dic_parameter_all_gen
|
Optional[dict[str, dict[str, Any]]]
|
Dictionary of parameters for the scan, if not provided through the scan config. Defaults to None. |
None
|
dic_parameter_all_gen_naming
|
Optional[dict[str, dict[str, Any]]]
|
Dictionary of parameters for the naming of the scan subfolders, if not provided through the scan config. Defaults to None. |
None
|
add_prefix_to_folder_names
|
bool
|
Whether to add a prefix to the folder names. Defaults to False. |
False
|
Returns:
| Type | Description |
|---|---|
tuple[str, str]
|
tuple[str, str]: The path to the tree file and the name of the main configuration file. |
Source code in study_da/study_da.py
create_single_job(name_main_configuration, name_executable_generation_1, name_executable_generation_2=None, name_executable_generation_3=None, name_study='single_job_study', force_overwrite=False)
Create a single job study (not a parametric scan) with the specified configuration and executables. Limited to three generations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name_main_configuration
|
str
|
The name of the main configuration file for the study. |
required |
name_executable_generation_1
|
str
|
The name of the executable for the first generation. |
required |
name_executable_generation_2
|
Optional[str]
|
The name of the executable for the second generation. Defaults to None. |
None
|
name_executable_generation_3
|
Optional[str]
|
The name of the executable for the third generation. Defaults to None. |
None
|
name_study
|
str
|
The name of the study. Defaults to "single_job_study". |
'single_job_study'
|
force_overwrite
|
bool
|
Whether to force overwrite existing files. Defaults to False. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The path to the tree file. |
Source code in study_da/study_da.py
submit(path_tree, path_python_environment='', path_python_environment_container='', path_container_image=None, force_configure=False, dic_config_jobs=None, one_generation_at_a_time=False, keep_submit_until_done=False, wait_time=30, max_try=100, force_submit=False, dic_additional_commands_per_gen=None, dic_dependencies_per_gen=None, dic_copy_back_per_gen=None, name_config='config.yaml')
Submits the jobs to the cluster. Note that copying back large files (e.g. json colliders) can trigger a throttling mechanism in AFS.
The following arguments are only used for HTC jobs submission: - dic_additional_commands_per_gen - dic_dependencies_per_gen - dic_copy_back_per_gen - name_config
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path_tree
|
str
|
The path to the tree file. |
required |
path_python_environment
|
str
|
The path to the python environment. Default to "". |
''
|
path_python_environment_container
|
str
|
The path to the python environment in the container. Default to "". |
''
|
path_container_image
|
Optional[str]
|
The path to the container image. Defaults to None. |
None
|
force_configure
|
bool
|
Whether to force reconfiguration. Defaults to False. |
False
|
dic_config_jobs
|
Optional[dict[str, dict[str, Any]]]
|
A dictionary containing the configuration of the jobs. Defaults to None. |
None
|
one_generation_at_a_time
|
bool
|
Whether to submit one full generation at a time. Defaults to False. |
False
|
keep_submit_until_done
|
bool
|
Whether to keep submitting jobs until all jobs are finished or failed. Defaults to False. |
False
|
max_try
|
int
|
The maximum number of tries to submit a job. Defaults to 100. |
100
|
force_submit
|
bool
|
If True, jobs are resubmitted even though they failed. Defaults to False. |
False
|
wait_time
|
float
|
The wait time between submissions in minutes. Defaults to 30. |
30
|
dic_additional_commands_per_gen
|
dict[int, str]
|
Additional commands per generation. Defaults to None. |
None
|
dic_dependencies_per_gen
|
dict[int, list[str]]
|
Dependencies per generation. Only used when doing a HTC submission. Defaults to None. |
None
|
dic_copy_back_per_gen
|
Optional[dict[int, dict[str, bool]]]
|
A dictionary containing the files to copy back per generation. Accepted keys are "parquet", "yaml", "txt", "json", "zip" and "all". Defaults to None, corresponding to copying back only "light" files, i.e. parquet, yaml and txt. |
None
|
name_config
|
str
|
The name of the configuration file for the study. Defaults to "config.yaml". |
'config.yaml'
|
Returns:
| Type | Description |
|---|---|
None
|
None |
Source code in study_da/study_da.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | |