omniopt2 7100__py3-none-any.whl → 7102__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- .omniopt.py +120 -51
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/.omniopt.py +120 -51
- {omniopt2-7100.dist-info → omniopt2-7102.dist-info}/METADATA +1 -1
- {omniopt2-7100.dist-info → omniopt2-7102.dist-info}/RECORD +35 -35
- omniopt2.egg-info/PKG-INFO +1 -1
- pyproject.toml +1 -1
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/.colorfunctions.sh +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/.general.sh +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/.helpers.py +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/.omniopt_plot_cpu_ram_usage.py +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/.omniopt_plot_general.py +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/.omniopt_plot_gpu_usage.py +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/.omniopt_plot_kde.py +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/.omniopt_plot_scatter.py +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/.omniopt_plot_scatter_generation_method.py +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/.omniopt_plot_scatter_hex.py +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/.omniopt_plot_time_and_exit_code.py +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/.omniopt_plot_trial_index_result.py +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/.omniopt_plot_worker.py +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/.random_generator.py +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/.shellscript_functions +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/.tpe.py +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/LICENSE +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/apt-dependencies.txt +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/omniopt +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/omniopt_docker +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/omniopt_evaluate +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/omniopt_plot +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/omniopt_share +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/requirements.txt +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/setup.py +0 -0
- {omniopt2-7100.data → omniopt2-7102.data}/data/bin/test_requirements.txt +0 -0
- {omniopt2-7100.dist-info → omniopt2-7102.dist-info}/WHEEL +0 -0
- {omniopt2-7100.dist-info → omniopt2-7102.dist-info}/licenses/LICENSE +0 -0
- {omniopt2-7100.dist-info → omniopt2-7102.dist-info}/top_level.txt +0 -0
.omniopt.py
CHANGED
@@ -3226,44 +3226,104 @@ def get_return_in_case_of_errors() -> dict:
|
|
3226
3226
|
return return_in_case_of_error
|
3227
3227
|
|
3228
3228
|
@beartype
|
3229
|
-
def write_job_infos_csv(parameters: dict, stdout: Optional[str], program_string_with_params: str,
|
3230
|
-
|
3229
|
+
def write_job_infos_csv(parameters: dict, stdout: Optional[str], program_string_with_params: str,
|
3230
|
+
exit_code: Optional[int], _signal: Optional[int],
|
3231
|
+
result: Optional[Union[Dict[str, Optional[float]], List[float], int, float]],
|
3232
|
+
start_time: Union[int, float], end_time: Union[int, float],
|
3233
|
+
run_time: Union[float, int]) -> None:
|
3234
|
+
_write_job_infos_csv_main(parameters, stdout, program_string_with_params, exit_code, _signal, result, start_time, end_time, run_time)
|
3235
|
+
|
3236
|
+
@beartype
|
3237
|
+
def _write_job_infos_csv_main(parameters: dict, stdout: Optional[str], program_string_with_params: str,
|
3238
|
+
exit_code: Optional[int], _signal: Optional[int],
|
3239
|
+
result: Optional[Union[Dict[str, Optional[float]], List[float], int, float]],
|
3240
|
+
start_time: Union[int, float], end_time: Union[int, float],
|
3241
|
+
run_time: Union[float, int]) -> None:
|
3242
|
+
str_parameters_values = _write_job_infos_csv_parameters_to_str(parameters)
|
3243
|
+
extra_vars_names, extra_vars_values = _write_job_infos_csv_extract_extra_vars(stdout)
|
3244
|
+
extra_vars_names, extra_vars_values = _write_job_infos_csv_add_slurm_job_id(extra_vars_names, extra_vars_values)
|
3231
3245
|
|
3232
|
-
|
3246
|
+
parameters_keys = list(parameters.keys())
|
3247
|
+
|
3248
|
+
headline = _write_job_infos_csv_build_headline(parameters_keys, extra_vars_names)
|
3249
|
+
result_values = _write_job_infos_csv_result_to_strlist(result)
|
3250
|
+
|
3251
|
+
values = _write_job_infos_csv_build_values(start_time, end_time, run_time, program_string_with_params,
|
3252
|
+
str_parameters_values, result_values, exit_code, _signal,
|
3253
|
+
extra_vars_values)
|
3254
|
+
|
3255
|
+
headline = _write_job_infos_csv_replace_none_with_str(headline)
|
3256
|
+
values = _write_job_infos_csv_replace_none_with_str(values)
|
3257
|
+
|
3258
|
+
run_folder = get_current_run_folder()
|
3259
|
+
if run_folder is not None and os.path.exists(run_folder):
|
3260
|
+
try:
|
3261
|
+
add_to_csv(f"{run_folder}/job_infos.csv", headline, values)
|
3262
|
+
except Exception as e:
|
3263
|
+
print_red(f"Error writing job_infos.csv: {e}")
|
3264
|
+
else:
|
3265
|
+
print_debug(f"evaluate: get_current_run_folder() {run_folder} could not be found")
|
3266
|
+
|
3267
|
+
@beartype
|
3268
|
+
def _write_job_infos_csv_parameters_to_str(parameters: dict) -> List[str]:
|
3269
|
+
return [str(v) for v in list(parameters.values())]
|
3270
|
+
|
3271
|
+
|
3272
|
+
@beartype
|
3273
|
+
def _write_job_infos_csv_extract_extra_vars(stdout: Optional[str]) -> Tuple[List[str], List[str]]:
|
3274
|
+
# extract_info ist hier eine vorhandene Funktion, die extra Variablen aus stdout extrahiert
|
3275
|
+
return extract_info(stdout)
|
3233
3276
|
|
3277
|
+
|
3278
|
+
@beartype
|
3279
|
+
def _write_job_infos_csv_add_slurm_job_id(extra_vars_names: List[str], extra_vars_values: List[str]) -> Tuple[List[str], List[str]]:
|
3234
3280
|
_SLURM_JOB_ID = os.getenv('SLURM_JOB_ID')
|
3235
3281
|
if _SLURM_JOB_ID:
|
3236
3282
|
extra_vars_names.append("OO_Info_SLURM_JOB_ID")
|
3237
3283
|
extra_vars_values.append(str(_SLURM_JOB_ID))
|
3284
|
+
return extra_vars_names, extra_vars_values
|
3238
3285
|
|
3239
|
-
parameters_keys = list(parameters.keys())
|
3240
3286
|
|
3241
|
-
|
3287
|
+
@beartype
|
3288
|
+
def _write_job_infos_csv_build_headline(parameters_keys: List[str], extra_vars_names: List[str]) -> List[str]:
|
3289
|
+
return [
|
3242
3290
|
"start_time",
|
3243
3291
|
"end_time",
|
3244
3292
|
"run_time",
|
3245
3293
|
"program_string",
|
3246
3294
|
*parameters_keys,
|
3247
|
-
*arg_result_names,
|
3295
|
+
*arg_result_names, # arg_result_names muss global definiert sein
|
3248
3296
|
"exit_code",
|
3249
3297
|
"signal",
|
3250
3298
|
"hostname",
|
3251
3299
|
*extra_vars_names
|
3252
3300
|
]
|
3253
3301
|
|
3254
|
-
|
3302
|
+
|
3303
|
+
@beartype
|
3304
|
+
def _write_job_infos_csv_result_to_strlist(result: Optional[Union[Dict[str, Optional[float]], List[float], int, float]]) -> List[str]:
|
3305
|
+
result_values: List[str] = []
|
3255
3306
|
|
3256
3307
|
if isinstance(result, list):
|
3257
3308
|
for rkey in result:
|
3258
3309
|
result_values.append(str(rkey))
|
3259
3310
|
elif isinstance(result, dict):
|
3260
|
-
result_keys
|
3311
|
+
result_keys = list(result.keys())
|
3261
3312
|
for rkey in result_keys:
|
3262
3313
|
rval = str(result[str(rkey)])
|
3263
|
-
|
3264
3314
|
result_values.append(rval)
|
3315
|
+
elif result is not None: # int or float
|
3316
|
+
result_values.append(str(result))
|
3317
|
+
|
3318
|
+
return result_values
|
3265
3319
|
|
3266
|
-
|
3320
|
+
|
3321
|
+
@beartype
|
3322
|
+
def _write_job_infos_csv_build_values(start_time: Union[int, float], end_time: Union[int, float], run_time: Union[float, int],
|
3323
|
+
program_string_with_params: str, str_parameters_values: List[str],
|
3324
|
+
result_values: List[str], exit_code: Optional[int], _signal: Optional[int],
|
3325
|
+
extra_vars_values: List[str]) -> List[str]:
|
3326
|
+
return [
|
3267
3327
|
str(start_time),
|
3268
3328
|
str(end_time),
|
3269
3329
|
str(run_time),
|
@@ -3276,16 +3336,10 @@ def write_job_infos_csv(parameters: dict, stdout: Optional[str], program_string_
|
|
3276
3336
|
*extra_vars_values
|
3277
3337
|
]
|
3278
3338
|
|
3279
|
-
headline = ['None' if element is None else element for element in headline]
|
3280
|
-
values = ['None' if element is None else element for element in values]
|
3281
3339
|
|
3282
|
-
|
3283
|
-
|
3284
|
-
|
3285
|
-
except Exception as e:
|
3286
|
-
print_red(f"Error writing job_infos.csv: {e}")
|
3287
|
-
else:
|
3288
|
-
print_debug(f"evaluate: get_current_run_folder() {get_current_run_folder()} could not be found")
|
3340
|
+
@beartype
|
3341
|
+
def _write_job_infos_csv_replace_none_with_str(elements: List[Optional[str]]) -> List[str]:
|
3342
|
+
return ['None' if element is None else element for element in elements]
|
3289
3343
|
|
3290
3344
|
@beartype
|
3291
3345
|
def print_evaluate_times() -> None:
|
@@ -6342,45 +6396,60 @@ def get_alt_path_for_orchestrator(stdout_path: str) -> Optional[str]:
|
|
6342
6396
|
return alt_path
|
6343
6397
|
|
6344
6398
|
@beartype
|
6345
|
-
def check_orchestrator(stdout_path: str, trial_index: int) -> Optional[
|
6346
|
-
|
6399
|
+
def check_orchestrator(stdout_path: str, trial_index: int) -> Optional[List[str]]:
|
6400
|
+
if not orchestrator or "errors" not in orchestrator:
|
6401
|
+
return []
|
6347
6402
|
|
6348
|
-
|
6349
|
-
|
6350
|
-
|
6351
|
-
except FileNotFoundError:
|
6352
|
-
alt_path = get_alt_path_for_orchestrator(stdout_path)
|
6403
|
+
stdout = _check_orchestrator_read_stdout_with_fallback(stdout_path, trial_index)
|
6404
|
+
if stdout is None:
|
6405
|
+
return None
|
6353
6406
|
|
6354
|
-
|
6355
|
-
stdout_path = alt_path
|
6356
|
-
try:
|
6357
|
-
stdout = Path(stdout_path).read_text("UTF-8")
|
6358
|
-
except FileNotFoundError:
|
6359
|
-
stdout = None
|
6360
|
-
else:
|
6361
|
-
stdout = None
|
6407
|
+
return _check_orchestrator_find_behaviors(stdout, orchestrator["errors"])
|
6362
6408
|
|
6363
|
-
|
6364
|
-
|
6365
|
-
|
6366
|
-
|
6367
|
-
|
6368
|
-
|
6369
|
-
|
6409
|
+
|
6410
|
+
@beartype
|
6411
|
+
def _check_orchestrator_read_stdout_with_fallback(stdout_path: str, trial_index: int) -> Optional[str]:
|
6412
|
+
try:
|
6413
|
+
return Path(stdout_path).read_text("UTF-8")
|
6414
|
+
except FileNotFoundError:
|
6415
|
+
alt_path = get_alt_path_for_orchestrator(stdout_path)
|
6416
|
+
|
6417
|
+
if alt_path and Path(alt_path).exists():
|
6418
|
+
try:
|
6419
|
+
return Path(alt_path).read_text("UTF-8")
|
6420
|
+
except FileNotFoundError:
|
6370
6421
|
return None
|
6371
6422
|
|
6372
|
-
|
6373
|
-
|
6374
|
-
|
6375
|
-
|
6423
|
+
_check_orchestrator_register_missing_file(stdout_path, trial_index)
|
6424
|
+
return None
|
6425
|
+
|
6426
|
+
|
6427
|
+
@beartype
|
6428
|
+
def _check_orchestrator_register_missing_file(stdout_path: str, trial_index: int) -> None:
|
6429
|
+
if stdout_path not in ORCHESTRATE_TODO:
|
6430
|
+
ORCHESTRATE_TODO[stdout_path] = trial_index
|
6431
|
+
print_red(f"File not found: {stdout_path}, will try again later")
|
6432
|
+
else:
|
6433
|
+
print_red(f"File not found: {stdout_path}, not trying again")
|
6434
|
+
|
6435
|
+
|
6436
|
+
@beartype
|
6437
|
+
def _check_orchestrator_find_behaviors(stdout: str, errors: List[Dict[str, Any]]) -> List[str]:
|
6438
|
+
behaviors: List[str] = []
|
6439
|
+
stdout_lower = stdout.lower()
|
6440
|
+
|
6441
|
+
for error in errors:
|
6442
|
+
name = error.get("name", "")
|
6443
|
+
match_strings = error.get("match_strings", [])
|
6444
|
+
behavior = error.get("behavior", "")
|
6376
6445
|
|
6377
|
-
|
6378
|
-
|
6379
|
-
|
6380
|
-
|
6381
|
-
|
6446
|
+
for match_string in match_strings:
|
6447
|
+
if match_string.lower() in stdout_lower:
|
6448
|
+
if behavior not in behaviors:
|
6449
|
+
print_debug(f"Appending behavior {behavior}, orchestrator-error-name: {name}")
|
6450
|
+
behaviors.append(behavior)
|
6382
6451
|
|
6383
|
-
return
|
6452
|
+
return behaviors
|
6384
6453
|
|
6385
6454
|
@beartype
|
6386
6455
|
def orchestrate_job(job: Job, trial_index: int) -> None:
|
@@ -3226,44 +3226,104 @@ def get_return_in_case_of_errors() -> dict:
|
|
3226
3226
|
return return_in_case_of_error
|
3227
3227
|
|
3228
3228
|
@beartype
|
3229
|
-
def write_job_infos_csv(parameters: dict, stdout: Optional[str], program_string_with_params: str,
|
3230
|
-
|
3229
|
+
def write_job_infos_csv(parameters: dict, stdout: Optional[str], program_string_with_params: str,
|
3230
|
+
exit_code: Optional[int], _signal: Optional[int],
|
3231
|
+
result: Optional[Union[Dict[str, Optional[float]], List[float], int, float]],
|
3232
|
+
start_time: Union[int, float], end_time: Union[int, float],
|
3233
|
+
run_time: Union[float, int]) -> None:
|
3234
|
+
_write_job_infos_csv_main(parameters, stdout, program_string_with_params, exit_code, _signal, result, start_time, end_time, run_time)
|
3235
|
+
|
3236
|
+
@beartype
|
3237
|
+
def _write_job_infos_csv_main(parameters: dict, stdout: Optional[str], program_string_with_params: str,
|
3238
|
+
exit_code: Optional[int], _signal: Optional[int],
|
3239
|
+
result: Optional[Union[Dict[str, Optional[float]], List[float], int, float]],
|
3240
|
+
start_time: Union[int, float], end_time: Union[int, float],
|
3241
|
+
run_time: Union[float, int]) -> None:
|
3242
|
+
str_parameters_values = _write_job_infos_csv_parameters_to_str(parameters)
|
3243
|
+
extra_vars_names, extra_vars_values = _write_job_infos_csv_extract_extra_vars(stdout)
|
3244
|
+
extra_vars_names, extra_vars_values = _write_job_infos_csv_add_slurm_job_id(extra_vars_names, extra_vars_values)
|
3231
3245
|
|
3232
|
-
|
3246
|
+
parameters_keys = list(parameters.keys())
|
3247
|
+
|
3248
|
+
headline = _write_job_infos_csv_build_headline(parameters_keys, extra_vars_names)
|
3249
|
+
result_values = _write_job_infos_csv_result_to_strlist(result)
|
3250
|
+
|
3251
|
+
values = _write_job_infos_csv_build_values(start_time, end_time, run_time, program_string_with_params,
|
3252
|
+
str_parameters_values, result_values, exit_code, _signal,
|
3253
|
+
extra_vars_values)
|
3254
|
+
|
3255
|
+
headline = _write_job_infos_csv_replace_none_with_str(headline)
|
3256
|
+
values = _write_job_infos_csv_replace_none_with_str(values)
|
3257
|
+
|
3258
|
+
run_folder = get_current_run_folder()
|
3259
|
+
if run_folder is not None and os.path.exists(run_folder):
|
3260
|
+
try:
|
3261
|
+
add_to_csv(f"{run_folder}/job_infos.csv", headline, values)
|
3262
|
+
except Exception as e:
|
3263
|
+
print_red(f"Error writing job_infos.csv: {e}")
|
3264
|
+
else:
|
3265
|
+
print_debug(f"evaluate: get_current_run_folder() {run_folder} could not be found")
|
3266
|
+
|
3267
|
+
@beartype
|
3268
|
+
def _write_job_infos_csv_parameters_to_str(parameters: dict) -> List[str]:
|
3269
|
+
return [str(v) for v in list(parameters.values())]
|
3270
|
+
|
3271
|
+
|
3272
|
+
@beartype
|
3273
|
+
def _write_job_infos_csv_extract_extra_vars(stdout: Optional[str]) -> Tuple[List[str], List[str]]:
|
3274
|
+
# extract_info ist hier eine vorhandene Funktion, die extra Variablen aus stdout extrahiert
|
3275
|
+
return extract_info(stdout)
|
3233
3276
|
|
3277
|
+
|
3278
|
+
@beartype
|
3279
|
+
def _write_job_infos_csv_add_slurm_job_id(extra_vars_names: List[str], extra_vars_values: List[str]) -> Tuple[List[str], List[str]]:
|
3234
3280
|
_SLURM_JOB_ID = os.getenv('SLURM_JOB_ID')
|
3235
3281
|
if _SLURM_JOB_ID:
|
3236
3282
|
extra_vars_names.append("OO_Info_SLURM_JOB_ID")
|
3237
3283
|
extra_vars_values.append(str(_SLURM_JOB_ID))
|
3284
|
+
return extra_vars_names, extra_vars_values
|
3238
3285
|
|
3239
|
-
parameters_keys = list(parameters.keys())
|
3240
3286
|
|
3241
|
-
|
3287
|
+
@beartype
|
3288
|
+
def _write_job_infos_csv_build_headline(parameters_keys: List[str], extra_vars_names: List[str]) -> List[str]:
|
3289
|
+
return [
|
3242
3290
|
"start_time",
|
3243
3291
|
"end_time",
|
3244
3292
|
"run_time",
|
3245
3293
|
"program_string",
|
3246
3294
|
*parameters_keys,
|
3247
|
-
*arg_result_names,
|
3295
|
+
*arg_result_names, # arg_result_names muss global definiert sein
|
3248
3296
|
"exit_code",
|
3249
3297
|
"signal",
|
3250
3298
|
"hostname",
|
3251
3299
|
*extra_vars_names
|
3252
3300
|
]
|
3253
3301
|
|
3254
|
-
|
3302
|
+
|
3303
|
+
@beartype
|
3304
|
+
def _write_job_infos_csv_result_to_strlist(result: Optional[Union[Dict[str, Optional[float]], List[float], int, float]]) -> List[str]:
|
3305
|
+
result_values: List[str] = []
|
3255
3306
|
|
3256
3307
|
if isinstance(result, list):
|
3257
3308
|
for rkey in result:
|
3258
3309
|
result_values.append(str(rkey))
|
3259
3310
|
elif isinstance(result, dict):
|
3260
|
-
result_keys
|
3311
|
+
result_keys = list(result.keys())
|
3261
3312
|
for rkey in result_keys:
|
3262
3313
|
rval = str(result[str(rkey)])
|
3263
|
-
|
3264
3314
|
result_values.append(rval)
|
3315
|
+
elif result is not None: # int or float
|
3316
|
+
result_values.append(str(result))
|
3317
|
+
|
3318
|
+
return result_values
|
3265
3319
|
|
3266
|
-
|
3320
|
+
|
3321
|
+
@beartype
|
3322
|
+
def _write_job_infos_csv_build_values(start_time: Union[int, float], end_time: Union[int, float], run_time: Union[float, int],
|
3323
|
+
program_string_with_params: str, str_parameters_values: List[str],
|
3324
|
+
result_values: List[str], exit_code: Optional[int], _signal: Optional[int],
|
3325
|
+
extra_vars_values: List[str]) -> List[str]:
|
3326
|
+
return [
|
3267
3327
|
str(start_time),
|
3268
3328
|
str(end_time),
|
3269
3329
|
str(run_time),
|
@@ -3276,16 +3336,10 @@ def write_job_infos_csv(parameters: dict, stdout: Optional[str], program_string_
|
|
3276
3336
|
*extra_vars_values
|
3277
3337
|
]
|
3278
3338
|
|
3279
|
-
headline = ['None' if element is None else element for element in headline]
|
3280
|
-
values = ['None' if element is None else element for element in values]
|
3281
3339
|
|
3282
|
-
|
3283
|
-
|
3284
|
-
|
3285
|
-
except Exception as e:
|
3286
|
-
print_red(f"Error writing job_infos.csv: {e}")
|
3287
|
-
else:
|
3288
|
-
print_debug(f"evaluate: get_current_run_folder() {get_current_run_folder()} could not be found")
|
3340
|
+
@beartype
|
3341
|
+
def _write_job_infos_csv_replace_none_with_str(elements: List[Optional[str]]) -> List[str]:
|
3342
|
+
return ['None' if element is None else element for element in elements]
|
3289
3343
|
|
3290
3344
|
@beartype
|
3291
3345
|
def print_evaluate_times() -> None:
|
@@ -6342,45 +6396,60 @@ def get_alt_path_for_orchestrator(stdout_path: str) -> Optional[str]:
|
|
6342
6396
|
return alt_path
|
6343
6397
|
|
6344
6398
|
@beartype
|
6345
|
-
def check_orchestrator(stdout_path: str, trial_index: int) -> Optional[
|
6346
|
-
|
6399
|
+
def check_orchestrator(stdout_path: str, trial_index: int) -> Optional[List[str]]:
|
6400
|
+
if not orchestrator or "errors" not in orchestrator:
|
6401
|
+
return []
|
6347
6402
|
|
6348
|
-
|
6349
|
-
|
6350
|
-
|
6351
|
-
except FileNotFoundError:
|
6352
|
-
alt_path = get_alt_path_for_orchestrator(stdout_path)
|
6403
|
+
stdout = _check_orchestrator_read_stdout_with_fallback(stdout_path, trial_index)
|
6404
|
+
if stdout is None:
|
6405
|
+
return None
|
6353
6406
|
|
6354
|
-
|
6355
|
-
stdout_path = alt_path
|
6356
|
-
try:
|
6357
|
-
stdout = Path(stdout_path).read_text("UTF-8")
|
6358
|
-
except FileNotFoundError:
|
6359
|
-
stdout = None
|
6360
|
-
else:
|
6361
|
-
stdout = None
|
6407
|
+
return _check_orchestrator_find_behaviors(stdout, orchestrator["errors"])
|
6362
6408
|
|
6363
|
-
|
6364
|
-
|
6365
|
-
|
6366
|
-
|
6367
|
-
|
6368
|
-
|
6369
|
-
|
6409
|
+
|
6410
|
+
@beartype
|
6411
|
+
def _check_orchestrator_read_stdout_with_fallback(stdout_path: str, trial_index: int) -> Optional[str]:
|
6412
|
+
try:
|
6413
|
+
return Path(stdout_path).read_text("UTF-8")
|
6414
|
+
except FileNotFoundError:
|
6415
|
+
alt_path = get_alt_path_for_orchestrator(stdout_path)
|
6416
|
+
|
6417
|
+
if alt_path and Path(alt_path).exists():
|
6418
|
+
try:
|
6419
|
+
return Path(alt_path).read_text("UTF-8")
|
6420
|
+
except FileNotFoundError:
|
6370
6421
|
return None
|
6371
6422
|
|
6372
|
-
|
6373
|
-
|
6374
|
-
|
6375
|
-
|
6423
|
+
_check_orchestrator_register_missing_file(stdout_path, trial_index)
|
6424
|
+
return None
|
6425
|
+
|
6426
|
+
|
6427
|
+
@beartype
|
6428
|
+
def _check_orchestrator_register_missing_file(stdout_path: str, trial_index: int) -> None:
|
6429
|
+
if stdout_path not in ORCHESTRATE_TODO:
|
6430
|
+
ORCHESTRATE_TODO[stdout_path] = trial_index
|
6431
|
+
print_red(f"File not found: {stdout_path}, will try again later")
|
6432
|
+
else:
|
6433
|
+
print_red(f"File not found: {stdout_path}, not trying again")
|
6434
|
+
|
6435
|
+
|
6436
|
+
@beartype
|
6437
|
+
def _check_orchestrator_find_behaviors(stdout: str, errors: List[Dict[str, Any]]) -> List[str]:
|
6438
|
+
behaviors: List[str] = []
|
6439
|
+
stdout_lower = stdout.lower()
|
6440
|
+
|
6441
|
+
for error in errors:
|
6442
|
+
name = error.get("name", "")
|
6443
|
+
match_strings = error.get("match_strings", [])
|
6444
|
+
behavior = error.get("behavior", "")
|
6376
6445
|
|
6377
|
-
|
6378
|
-
|
6379
|
-
|
6380
|
-
|
6381
|
-
|
6446
|
+
for match_string in match_strings:
|
6447
|
+
if match_string.lower() in stdout_lower:
|
6448
|
+
if behavior not in behaviors:
|
6449
|
+
print_debug(f"Appending behavior {behavior}, orchestrator-error-name: {name}")
|
6450
|
+
behaviors.append(behavior)
|
6382
6451
|
|
6383
|
-
return
|
6452
|
+
return behaviors
|
6384
6453
|
|
6385
6454
|
@beartype
|
6386
6455
|
def orchestrate_job(job: Job, trial_index: int) -> None:
|
@@ -3,7 +3,7 @@
|
|
3
3
|
.general.sh,sha256=uyGMN8xNToQ0v50KoiYxm6jRmgf0orroOaodM_Nuq30,2107
|
4
4
|
.gitignore,sha256=OMaFWOR6wxjAlI85rF3euQcjQFFAl1F34abZkltKnaU,3714
|
5
5
|
.helpers.py,sha256=srrRn0QBzG8JpNbHAYG2k1rQY6JYrUrNdTj-tDMJSyg,30526
|
6
|
-
.omniopt.py,sha256=
|
6
|
+
.omniopt.py,sha256=aS6MM9_64ECyMcoiHWLy27UsDQR4jhTCIdUQnSFd2O4,378935
|
7
7
|
.omniopt_plot_cpu_ram_usage.py,sha256=DbOAmdrbcZtsMnHJgHfeRngjtv6zX5J0axyua_dYezc,3932
|
8
8
|
.omniopt_plot_general.py,sha256=ZERZJkvVOoJhi7SszmTF1Iln-_08_0Aki48u3LHUW-k,6809
|
9
9
|
.omniopt_plot_gpu_usage.py,sha256=ojxVicwSoiyl7f3c-6lLuT2EpyPcSJKEcbp75LgDY2k,5107
|
@@ -26,44 +26,44 @@ omniopt_docker,sha256=LWVUeyvmA5AKqAHiH9jBUkR5uZ6AHMnSy0eET7mK6E4,3602
|
|
26
26
|
omniopt_evaluate,sha256=9oBh0_ikCuIz_aJQZrN0j39NDiIDYoSvEFmSVIoFjJE,23842
|
27
27
|
omniopt_plot,sha256=Z8ZR10p-ZRSgMeVPO-wVCJ8lk-LQtntjZ9Bk9RifCIs,13360
|
28
28
|
omniopt_share,sha256=7g5I7YdoWcA6_GDwWwq0xPf23qiVc_VDrm9ySLH7SH0,14051
|
29
|
-
pyproject.toml,sha256=
|
29
|
+
pyproject.toml,sha256=AsOBgYKniN3hX8MZN2agEyvZiJ0M0KHQmXEZZoJTHKM,397
|
30
30
|
requirements.txt,sha256=QsRYgd43IXr8rN9m0CxufI9mEneBrDeKh4s8E_W2xwI,287
|
31
31
|
setup.cfg,sha256=HEc8uu6NpfxG5_AVh5SvXOpEFMNKPPPxgMIAH144vT4,38
|
32
32
|
test_requirements.txt,sha256=dnCbKmKalrVzNZ_-iQWf1xCxcnDsdGuhbDAr9XlGm-U,477
|
33
|
-
omniopt2-
|
34
|
-
omniopt2-
|
35
|
-
omniopt2-
|
36
|
-
omniopt2-
|
37
|
-
omniopt2-
|
38
|
-
omniopt2-
|
39
|
-
omniopt2-
|
40
|
-
omniopt2-
|
41
|
-
omniopt2-
|
42
|
-
omniopt2-
|
43
|
-
omniopt2-
|
44
|
-
omniopt2-
|
45
|
-
omniopt2-
|
46
|
-
omniopt2-
|
47
|
-
omniopt2-
|
48
|
-
omniopt2-
|
49
|
-
omniopt2-
|
50
|
-
omniopt2-
|
51
|
-
omniopt2-
|
52
|
-
omniopt2-
|
53
|
-
omniopt2-
|
54
|
-
omniopt2-
|
55
|
-
omniopt2-
|
56
|
-
omniopt2-
|
57
|
-
omniopt2-
|
58
|
-
omniopt2-
|
59
|
-
omniopt2-
|
60
|
-
omniopt2-
|
61
|
-
omniopt2.egg-info/PKG-INFO,sha256=
|
33
|
+
omniopt2-7102.data/data/bin/.colorfunctions.sh,sha256=CDlgjwrsrHR_E6c-Qak5wZlotArXm-nf9sVvXePzGZA,1083
|
34
|
+
omniopt2-7102.data/data/bin/.general.sh,sha256=uyGMN8xNToQ0v50KoiYxm6jRmgf0orroOaodM_Nuq30,2107
|
35
|
+
omniopt2-7102.data/data/bin/.helpers.py,sha256=srrRn0QBzG8JpNbHAYG2k1rQY6JYrUrNdTj-tDMJSyg,30526
|
36
|
+
omniopt2-7102.data/data/bin/.omniopt.py,sha256=aS6MM9_64ECyMcoiHWLy27UsDQR4jhTCIdUQnSFd2O4,378935
|
37
|
+
omniopt2-7102.data/data/bin/.omniopt_plot_cpu_ram_usage.py,sha256=DbOAmdrbcZtsMnHJgHfeRngjtv6zX5J0axyua_dYezc,3932
|
38
|
+
omniopt2-7102.data/data/bin/.omniopt_plot_general.py,sha256=ZERZJkvVOoJhi7SszmTF1Iln-_08_0Aki48u3LHUW-k,6809
|
39
|
+
omniopt2-7102.data/data/bin/.omniopt_plot_gpu_usage.py,sha256=ojxVicwSoiyl7f3c-6lLuT2EpyPcSJKEcbp75LgDY2k,5107
|
40
|
+
omniopt2-7102.data/data/bin/.omniopt_plot_kde.py,sha256=uRLWr72TDKvj3AqJ0O0AvkKZ1ok1O1QpXnbfQQdo0nA,6873
|
41
|
+
omniopt2-7102.data/data/bin/.omniopt_plot_scatter.py,sha256=-amqmLR_YLCbHImLPh6gwVFv8iiVnXME544XHsRVCuw,8422
|
42
|
+
omniopt2-7102.data/data/bin/.omniopt_plot_scatter_generation_method.py,sha256=rgKY_w1E516c9UucVaEvaKd8tCnoUq9xg-RrYSDzYEQ,4289
|
43
|
+
omniopt2-7102.data/data/bin/.omniopt_plot_scatter_hex.py,sha256=w1L5gL6Bc_QudoSJi2lxEVvF17Apjjb3l2T-lXGnsUg,10279
|
44
|
+
omniopt2-7102.data/data/bin/.omniopt_plot_time_and_exit_code.py,sha256=hC4RFDiJN_UImezFR6M5uVF-QKDqMDpq6R5DIg7dDDc,6463
|
45
|
+
omniopt2-7102.data/data/bin/.omniopt_plot_trial_index_result.py,sha256=5DmqZAQO_PFmzdap-TIhSMAshRXpOHQacnHAtjwnzN4,4629
|
46
|
+
omniopt2-7102.data/data/bin/.omniopt_plot_worker.py,sha256=VuluQq4W6KRR5RU08dxmDSFk5mbfDRkRJQFwwcLgAGw,4524
|
47
|
+
omniopt2-7102.data/data/bin/.random_generator.py,sha256=ezBBUXpez_QaGdpCglMcJ0KZPdQP0XdX5gnLzO1xhwU,2987
|
48
|
+
omniopt2-7102.data/data/bin/.shellscript_functions,sha256=C2VT3Eafz9OtCzjWOMXSeZCUGVMRm8y3eGDL43Ay0qM,14656
|
49
|
+
omniopt2-7102.data/data/bin/.tpe.py,sha256=Yd9s-ixCbWxTd3x0O1M1sok9QfM2mBEfsDwXhx50-Nc,6464
|
50
|
+
omniopt2-7102.data/data/bin/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
51
|
+
omniopt2-7102.data/data/bin/apt-dependencies.txt,sha256=X5tBB8ZLW9XaFtRh8B7C2pIkSoxNNawqioDr0QZAtuM,149
|
52
|
+
omniopt2-7102.data/data/bin/omniopt,sha256=Xe8NP6NRoX4j2IPGRTY80eYfo5fYM-fJfj9_aVP-aR8,47963
|
53
|
+
omniopt2-7102.data/data/bin/omniopt_docker,sha256=LWVUeyvmA5AKqAHiH9jBUkR5uZ6AHMnSy0eET7mK6E4,3602
|
54
|
+
omniopt2-7102.data/data/bin/omniopt_evaluate,sha256=9oBh0_ikCuIz_aJQZrN0j39NDiIDYoSvEFmSVIoFjJE,23842
|
55
|
+
omniopt2-7102.data/data/bin/omniopt_plot,sha256=Z8ZR10p-ZRSgMeVPO-wVCJ8lk-LQtntjZ9Bk9RifCIs,13360
|
56
|
+
omniopt2-7102.data/data/bin/omniopt_share,sha256=7g5I7YdoWcA6_GDwWwq0xPf23qiVc_VDrm9ySLH7SH0,14051
|
57
|
+
omniopt2-7102.data/data/bin/requirements.txt,sha256=QsRYgd43IXr8rN9m0CxufI9mEneBrDeKh4s8E_W2xwI,287
|
58
|
+
omniopt2-7102.data/data/bin/setup.py,sha256=g3uEqJHXhggXwgLYoxOjsXg9Z6IV1ubh-Og59AZ264Q,4648
|
59
|
+
omniopt2-7102.data/data/bin/test_requirements.txt,sha256=dnCbKmKalrVzNZ_-iQWf1xCxcnDsdGuhbDAr9XlGm-U,477
|
60
|
+
omniopt2-7102.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
61
|
+
omniopt2.egg-info/PKG-INFO,sha256=uY2p6TOkF-ZHex3QUPcKMO2lcZdfExMjIXg51uhxYJA,5814
|
62
62
|
omniopt2.egg-info/SOURCES.txt,sha256=N-HtSaaqFRsd4XqAfeWVSp__3I-sw0d7cknJgyewRwQ,778
|
63
63
|
omniopt2.egg-info/dependency_links.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
64
64
|
omniopt2.egg-info/requires.txt,sha256=cZgCKMii2eXHaYbDhCwiLjxtFK6PW0aqFoJZ7xebsqM,764
|
65
65
|
omniopt2.egg-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
66
|
-
omniopt2-
|
67
|
-
omniopt2-
|
68
|
-
omniopt2-
|
69
|
-
omniopt2-
|
66
|
+
omniopt2-7102.dist-info/METADATA,sha256=uY2p6TOkF-ZHex3QUPcKMO2lcZdfExMjIXg51uhxYJA,5814
|
67
|
+
omniopt2-7102.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
68
|
+
omniopt2-7102.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
69
|
+
omniopt2-7102.dist-info/RECORD,,
|
omniopt2.egg-info/PKG-INFO
CHANGED
pyproject.toml
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{omniopt2-7100.data → omniopt2-7102.data}/data/bin/.omniopt_plot_scatter_generation_method.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|