omniopt2 7098__py3-none-any.whl → 7100__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 +139 -72
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/.omniopt.py +139 -72
- {omniopt2-7098.dist-info → omniopt2-7100.dist-info}/METADATA +1 -1
- {omniopt2-7098.dist-info → omniopt2-7100.dist-info}/RECORD +35 -35
- omniopt2.egg-info/PKG-INFO +1 -1
- pyproject.toml +1 -1
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/.colorfunctions.sh +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/.general.sh +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/.helpers.py +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/.omniopt_plot_cpu_ram_usage.py +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/.omniopt_plot_general.py +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/.omniopt_plot_gpu_usage.py +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/.omniopt_plot_kde.py +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/.omniopt_plot_scatter.py +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/.omniopt_plot_scatter_generation_method.py +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/.omniopt_plot_scatter_hex.py +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/.omniopt_plot_time_and_exit_code.py +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/.omniopt_plot_trial_index_result.py +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/.omniopt_plot_worker.py +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/.random_generator.py +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/.shellscript_functions +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/.tpe.py +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/LICENSE +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/apt-dependencies.txt +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/omniopt +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/omniopt_docker +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/omniopt_evaluate +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/omniopt_plot +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/omniopt_share +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/requirements.txt +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/setup.py +0 -0
- {omniopt2-7098.data → omniopt2-7100.data}/data/bin/test_requirements.txt +0 -0
- {omniopt2-7098.dist-info → omniopt2-7100.dist-info}/WHEEL +0 -0
- {omniopt2-7098.dist-info → omniopt2-7100.dist-info}/licenses/LICENSE +0 -0
- {omniopt2-7098.dist-info → omniopt2-7100.dist-info}/top_level.txt +0 -0
.omniopt.py
CHANGED
@@ -2621,62 +2621,84 @@ def parse_choice_param(classic_params: list, params: list, j: int, this_args: Un
|
|
2621
2621
|
return j, params, classic_params, search_space_reduction_warning
|
2622
2622
|
|
2623
2623
|
@beartype
|
2624
|
-
def
|
2625
|
-
|
2626
|
-
|
2627
|
-
|
2624
|
+
def _parse_experiment_parameters_validate_name(name: str, invalid_names: List[str], param_names: List[str]) -> None:
|
2625
|
+
if name in invalid_names:
|
2626
|
+
_fatal_error(f"\n⚠ Name for argument is invalid: {name}. Invalid names are: {', '.join(invalid_names)}", 181)
|
2627
|
+
if name in param_names:
|
2628
|
+
_fatal_error(f"\n⚠ Parameter name '{name}' is not unique. Names for parameters must be unique!", 181)
|
2628
2629
|
|
2629
|
-
|
2630
|
+
@beartype
|
2631
|
+
def _parse_experiment_parameters_get_param_type(this_args: List[Any], j: int) -> str:
|
2632
|
+
try:
|
2633
|
+
return this_args[j + 1]
|
2634
|
+
except Exception:
|
2635
|
+
_fatal_error("Not enough arguments for --parameter", 181)
|
2630
2636
|
|
2631
|
-
|
2637
|
+
return ""
|
2632
2638
|
|
2633
|
-
|
2634
|
-
|
2639
|
+
@beartype
|
2640
|
+
def _parse_experiment_parameters_parse_this_args(
|
2641
|
+
this_args: List[Any],
|
2642
|
+
invalid_names: List[str],
|
2643
|
+
param_names: List[str],
|
2644
|
+
classic_params: List[Dict[str, Any]],
|
2645
|
+
params: List[Dict[str, Any]],
|
2646
|
+
search_space_reduction_warning: bool
|
2647
|
+
) -> Tuple[int, List[Dict[str, Any]], List[Dict[str, Any]], bool]:
|
2648
|
+
j = 0
|
2649
|
+
param_parsers = {
|
2650
|
+
"range": parse_range_param,
|
2651
|
+
"fixed": parse_fixed_param,
|
2652
|
+
"choice": parse_choice_param
|
2653
|
+
}
|
2654
|
+
valid_types = list(param_parsers.keys())
|
2635
2655
|
|
2636
|
-
while
|
2637
|
-
|
2638
|
-
|
2656
|
+
while j < len(this_args) - 1:
|
2657
|
+
name = this_args[j]
|
2658
|
+
_parse_experiment_parameters_validate_name(name, invalid_names, param_names)
|
2639
2659
|
|
2640
|
-
|
2641
|
-
|
2660
|
+
param_names.append(name)
|
2661
|
+
global_param_names.append(name)
|
2642
2662
|
|
2643
|
-
|
2644
|
-
name = this_args[j]
|
2663
|
+
param_type = _parse_experiment_parameters_get_param_type(this_args, j)
|
2645
2664
|
|
2646
|
-
|
2647
|
-
|
2665
|
+
if param_type not in param_parsers:
|
2666
|
+
_fatal_error(f"⚠ Parameter type '{param_type}' not yet implemented.", 181)
|
2648
2667
|
|
2649
|
-
|
2650
|
-
|
2668
|
+
if param_type not in valid_types:
|
2669
|
+
valid_types_string = ', '.join(valid_types)
|
2670
|
+
_fatal_error(f"\n⚠ Invalid type {param_type}, valid types are: {valid_types_string}", 181)
|
2651
2671
|
|
2652
|
-
|
2653
|
-
|
2672
|
+
j, params, classic_params, search_space_reduction_warning = param_parsers[param_type](
|
2673
|
+
classic_params, params, j, this_args, name, search_space_reduction_warning)
|
2654
2674
|
|
2655
|
-
|
2656
|
-
|
2657
|
-
|
2658
|
-
|
2659
|
-
|
2660
|
-
|
2661
|
-
|
2662
|
-
|
2663
|
-
|
2664
|
-
}
|
2675
|
+
return j, params, classic_params, search_space_reduction_warning
|
2676
|
+
|
2677
|
+
@beartype
|
2678
|
+
def parse_experiment_parameters() -> Tuple[List[Dict[str, Any]], List[Dict[str, Any]]]:
|
2679
|
+
params: List[Dict[str, Any]] = []
|
2680
|
+
classic_params: List[Dict[str, Any]] = []
|
2681
|
+
param_names: List[str] = []
|
2682
|
+
|
2683
|
+
search_space_reduction_warning = False
|
2665
2684
|
|
2666
|
-
|
2667
|
-
_fatal_error(f"⚠ Parameter type '{param_type}' not yet implemented.", 181)
|
2685
|
+
invalid_names = ["start_time", "end_time", "run_time", "program_string", *arg_result_names, "exit_code", "signal"]
|
2668
2686
|
|
2669
|
-
|
2670
|
-
|
2671
|
-
|
2687
|
+
i = 0
|
2688
|
+
while args.parameter and i < len(args.parameter):
|
2689
|
+
this_args = args.parameter[i]
|
2690
|
+
if this_args is not None and isinstance(this_args, dict) and "param" in this_args:
|
2691
|
+
this_args = this_args["param"]
|
2672
2692
|
|
2673
|
-
|
2693
|
+
_, params, classic_params, search_space_reduction_warning = _parse_experiment_parameters_parse_this_args(
|
2694
|
+
this_args, invalid_names, param_names, classic_params, params, search_space_reduction_warning)
|
2674
2695
|
|
2675
2696
|
i += 1
|
2676
2697
|
|
2677
2698
|
if search_space_reduction_warning:
|
2678
2699
|
print_red("⚠ Search space reduction is not currently supported on continued runs or runs that have previous data.")
|
2679
2700
|
|
2701
|
+
# Remove duplicates by 'name' key preserving order
|
2680
2702
|
params = list({p['name']: p for p in params}.values())
|
2681
2703
|
classic_params = list({p['name']: p for p in classic_params}.values())
|
2682
2704
|
|
@@ -5540,54 +5562,99 @@ def parse_csv(csv_path: str) -> Tuple[List, List]:
|
|
5540
5562
|
|
5541
5563
|
return arm_params_list, results_list
|
5542
5564
|
|
5565
|
+
|
5543
5566
|
@beartype
|
5544
|
-
def get_generation_node_for_index(
|
5567
|
+
def get_generation_node_for_index(
|
5568
|
+
this_csv_file_path: str,
|
5569
|
+
arm_params_list: List[Dict[str, Any]],
|
5570
|
+
results_list: List[Dict[str, Any]],
|
5571
|
+
index: int
|
5572
|
+
) -> str:
|
5545
5573
|
try:
|
5546
|
-
if
|
5574
|
+
if not _get_generation_node_for_index_index_valid(index, arm_params_list, results_list):
|
5547
5575
|
return "MANUAL"
|
5548
5576
|
|
5549
5577
|
target_arm_params = arm_params_list[index]
|
5550
5578
|
target_result = results_list[index]
|
5551
5579
|
|
5552
|
-
target_combined =
|
5553
|
-
target_combined.update(target_arm_params)
|
5554
|
-
target_combined.update(target_result)
|
5555
|
-
|
5556
|
-
with open(this_csv_file_path, mode='r', newline='', encoding='utf-8') as csvfile:
|
5557
|
-
reader = csv.DictReader(csvfile)
|
5558
|
-
if reader.fieldnames is None or "generation_node" not in reader.fieldnames:
|
5559
|
-
return "MANUAL"
|
5560
|
-
|
5561
|
-
for row in reader:
|
5562
|
-
all_match = True
|
5563
|
-
for key, val in target_combined.items():
|
5564
|
-
row_val = row.get(key)
|
5565
|
-
if row_val is None:
|
5566
|
-
all_match = False
|
5567
|
-
break
|
5568
|
-
|
5569
|
-
if isinstance(val, (int, float)):
|
5570
|
-
try:
|
5571
|
-
row_val_num = float(row_val)
|
5572
|
-
val_num = float(val)
|
5573
|
-
if abs(row_val_num - val_num) > 1e-8:
|
5574
|
-
all_match = False
|
5575
|
-
break
|
5576
|
-
except ValueError:
|
5577
|
-
all_match = False
|
5578
|
-
break
|
5579
|
-
else:
|
5580
|
-
if str(val) != row_val:
|
5581
|
-
all_match = False
|
5582
|
-
break
|
5580
|
+
target_combined = _get_generation_node_for_index_combine_dicts(target_arm_params, target_result)
|
5583
5581
|
|
5584
|
-
|
5585
|
-
|
5582
|
+
generation_node = _get_generation_node_for_index_find_generation_node(this_csv_file_path, target_combined)
|
5583
|
+
return generation_node
|
5586
5584
|
except Exception as e:
|
5587
5585
|
print(f"Error while get_generation_node_for_index: {e}")
|
5586
|
+
return "MANUAL"
|
5587
|
+
|
5588
|
+
|
5589
|
+
@beartype
|
5590
|
+
def _get_generation_node_for_index_index_valid(
|
5591
|
+
index: int,
|
5592
|
+
arm_params_list: List[Dict[str, Any]],
|
5593
|
+
results_list: List[Dict[str, Any]]
|
5594
|
+
) -> bool:
|
5595
|
+
return 0 <= index < len(arm_params_list) and index < len(results_list)
|
5596
|
+
|
5597
|
+
|
5598
|
+
@beartype
|
5599
|
+
def _get_generation_node_for_index_combine_dicts(
|
5600
|
+
dict1: Dict[str, Any],
|
5601
|
+
dict2: Dict[str, Any]
|
5602
|
+
) -> Dict[str, Any]:
|
5603
|
+
combined = {}
|
5604
|
+
combined.update(dict1)
|
5605
|
+
combined.update(dict2)
|
5606
|
+
return combined
|
5607
|
+
|
5608
|
+
|
5609
|
+
@beartype
|
5610
|
+
def _get_generation_node_for_index_find_generation_node(
|
5611
|
+
csv_file_path: str,
|
5612
|
+
target_combined: Dict[str, Any]
|
5613
|
+
) -> str:
|
5614
|
+
with open(csv_file_path, mode='r', newline='', encoding='utf-8') as csvfile:
|
5615
|
+
reader = csv.DictReader(csvfile)
|
5616
|
+
if reader.fieldnames is None or "generation_node" not in reader.fieldnames:
|
5617
|
+
return "MANUAL"
|
5618
|
+
|
5619
|
+
for row in reader:
|
5620
|
+
if _get_generation_node_for_index_row_matches(row, target_combined):
|
5621
|
+
return row["generation_node"]
|
5588
5622
|
|
5589
5623
|
return "MANUAL"
|
5590
5624
|
|
5625
|
+
|
5626
|
+
@beartype
|
5627
|
+
def _get_generation_node_for_index_row_matches(
|
5628
|
+
row: Dict[str, str],
|
5629
|
+
target_combined: Dict[str, Any]
|
5630
|
+
) -> bool:
|
5631
|
+
for key, val in target_combined.items():
|
5632
|
+
row_val = row.get(key)
|
5633
|
+
if row_val is None:
|
5634
|
+
return False
|
5635
|
+
|
5636
|
+
if isinstance(val, (int, float)):
|
5637
|
+
if not _get_generation_node_for_index_floats_match(val, row_val):
|
5638
|
+
return False
|
5639
|
+
else:
|
5640
|
+
if str(val) != row_val:
|
5641
|
+
return False
|
5642
|
+
|
5643
|
+
return True
|
5644
|
+
|
5645
|
+
|
5646
|
+
@beartype
|
5647
|
+
def _get_generation_node_for_index_floats_match(
|
5648
|
+
val: float,
|
5649
|
+
row_val_str: str,
|
5650
|
+
tolerance: float = 1e-8
|
5651
|
+
) -> bool:
|
5652
|
+
try:
|
5653
|
+
row_val_num = float(row_val_str)
|
5654
|
+
except ValueError:
|
5655
|
+
return False
|
5656
|
+
return abs(row_val_num - val) <= tolerance
|
5657
|
+
|
5591
5658
|
@beartype
|
5592
5659
|
def insert_jobs_from_csv(this_csv_file_path: str, experiment_parameters: Optional[Union[List[Any], dict]]) -> None:
|
5593
5660
|
if not os.path.exists(this_csv_file_path):
|
@@ -2621,62 +2621,84 @@ def parse_choice_param(classic_params: list, params: list, j: int, this_args: Un
|
|
2621
2621
|
return j, params, classic_params, search_space_reduction_warning
|
2622
2622
|
|
2623
2623
|
@beartype
|
2624
|
-
def
|
2625
|
-
|
2626
|
-
|
2627
|
-
|
2624
|
+
def _parse_experiment_parameters_validate_name(name: str, invalid_names: List[str], param_names: List[str]) -> None:
|
2625
|
+
if name in invalid_names:
|
2626
|
+
_fatal_error(f"\n⚠ Name for argument is invalid: {name}. Invalid names are: {', '.join(invalid_names)}", 181)
|
2627
|
+
if name in param_names:
|
2628
|
+
_fatal_error(f"\n⚠ Parameter name '{name}' is not unique. Names for parameters must be unique!", 181)
|
2628
2629
|
|
2629
|
-
|
2630
|
+
@beartype
|
2631
|
+
def _parse_experiment_parameters_get_param_type(this_args: List[Any], j: int) -> str:
|
2632
|
+
try:
|
2633
|
+
return this_args[j + 1]
|
2634
|
+
except Exception:
|
2635
|
+
_fatal_error("Not enough arguments for --parameter", 181)
|
2630
2636
|
|
2631
|
-
|
2637
|
+
return ""
|
2632
2638
|
|
2633
|
-
|
2634
|
-
|
2639
|
+
@beartype
|
2640
|
+
def _parse_experiment_parameters_parse_this_args(
|
2641
|
+
this_args: List[Any],
|
2642
|
+
invalid_names: List[str],
|
2643
|
+
param_names: List[str],
|
2644
|
+
classic_params: List[Dict[str, Any]],
|
2645
|
+
params: List[Dict[str, Any]],
|
2646
|
+
search_space_reduction_warning: bool
|
2647
|
+
) -> Tuple[int, List[Dict[str, Any]], List[Dict[str, Any]], bool]:
|
2648
|
+
j = 0
|
2649
|
+
param_parsers = {
|
2650
|
+
"range": parse_range_param,
|
2651
|
+
"fixed": parse_fixed_param,
|
2652
|
+
"choice": parse_choice_param
|
2653
|
+
}
|
2654
|
+
valid_types = list(param_parsers.keys())
|
2635
2655
|
|
2636
|
-
while
|
2637
|
-
|
2638
|
-
|
2656
|
+
while j < len(this_args) - 1:
|
2657
|
+
name = this_args[j]
|
2658
|
+
_parse_experiment_parameters_validate_name(name, invalid_names, param_names)
|
2639
2659
|
|
2640
|
-
|
2641
|
-
|
2660
|
+
param_names.append(name)
|
2661
|
+
global_param_names.append(name)
|
2642
2662
|
|
2643
|
-
|
2644
|
-
name = this_args[j]
|
2663
|
+
param_type = _parse_experiment_parameters_get_param_type(this_args, j)
|
2645
2664
|
|
2646
|
-
|
2647
|
-
|
2665
|
+
if param_type not in param_parsers:
|
2666
|
+
_fatal_error(f"⚠ Parameter type '{param_type}' not yet implemented.", 181)
|
2648
2667
|
|
2649
|
-
|
2650
|
-
|
2668
|
+
if param_type not in valid_types:
|
2669
|
+
valid_types_string = ', '.join(valid_types)
|
2670
|
+
_fatal_error(f"\n⚠ Invalid type {param_type}, valid types are: {valid_types_string}", 181)
|
2651
2671
|
|
2652
|
-
|
2653
|
-
|
2672
|
+
j, params, classic_params, search_space_reduction_warning = param_parsers[param_type](
|
2673
|
+
classic_params, params, j, this_args, name, search_space_reduction_warning)
|
2654
2674
|
|
2655
|
-
|
2656
|
-
|
2657
|
-
|
2658
|
-
|
2659
|
-
|
2660
|
-
|
2661
|
-
|
2662
|
-
|
2663
|
-
|
2664
|
-
}
|
2675
|
+
return j, params, classic_params, search_space_reduction_warning
|
2676
|
+
|
2677
|
+
@beartype
|
2678
|
+
def parse_experiment_parameters() -> Tuple[List[Dict[str, Any]], List[Dict[str, Any]]]:
|
2679
|
+
params: List[Dict[str, Any]] = []
|
2680
|
+
classic_params: List[Dict[str, Any]] = []
|
2681
|
+
param_names: List[str] = []
|
2682
|
+
|
2683
|
+
search_space_reduction_warning = False
|
2665
2684
|
|
2666
|
-
|
2667
|
-
_fatal_error(f"⚠ Parameter type '{param_type}' not yet implemented.", 181)
|
2685
|
+
invalid_names = ["start_time", "end_time", "run_time", "program_string", *arg_result_names, "exit_code", "signal"]
|
2668
2686
|
|
2669
|
-
|
2670
|
-
|
2671
|
-
|
2687
|
+
i = 0
|
2688
|
+
while args.parameter and i < len(args.parameter):
|
2689
|
+
this_args = args.parameter[i]
|
2690
|
+
if this_args is not None and isinstance(this_args, dict) and "param" in this_args:
|
2691
|
+
this_args = this_args["param"]
|
2672
2692
|
|
2673
|
-
|
2693
|
+
_, params, classic_params, search_space_reduction_warning = _parse_experiment_parameters_parse_this_args(
|
2694
|
+
this_args, invalid_names, param_names, classic_params, params, search_space_reduction_warning)
|
2674
2695
|
|
2675
2696
|
i += 1
|
2676
2697
|
|
2677
2698
|
if search_space_reduction_warning:
|
2678
2699
|
print_red("⚠ Search space reduction is not currently supported on continued runs or runs that have previous data.")
|
2679
2700
|
|
2701
|
+
# Remove duplicates by 'name' key preserving order
|
2680
2702
|
params = list({p['name']: p for p in params}.values())
|
2681
2703
|
classic_params = list({p['name']: p for p in classic_params}.values())
|
2682
2704
|
|
@@ -5540,54 +5562,99 @@ def parse_csv(csv_path: str) -> Tuple[List, List]:
|
|
5540
5562
|
|
5541
5563
|
return arm_params_list, results_list
|
5542
5564
|
|
5565
|
+
|
5543
5566
|
@beartype
|
5544
|
-
def get_generation_node_for_index(
|
5567
|
+
def get_generation_node_for_index(
|
5568
|
+
this_csv_file_path: str,
|
5569
|
+
arm_params_list: List[Dict[str, Any]],
|
5570
|
+
results_list: List[Dict[str, Any]],
|
5571
|
+
index: int
|
5572
|
+
) -> str:
|
5545
5573
|
try:
|
5546
|
-
if
|
5574
|
+
if not _get_generation_node_for_index_index_valid(index, arm_params_list, results_list):
|
5547
5575
|
return "MANUAL"
|
5548
5576
|
|
5549
5577
|
target_arm_params = arm_params_list[index]
|
5550
5578
|
target_result = results_list[index]
|
5551
5579
|
|
5552
|
-
target_combined =
|
5553
|
-
target_combined.update(target_arm_params)
|
5554
|
-
target_combined.update(target_result)
|
5555
|
-
|
5556
|
-
with open(this_csv_file_path, mode='r', newline='', encoding='utf-8') as csvfile:
|
5557
|
-
reader = csv.DictReader(csvfile)
|
5558
|
-
if reader.fieldnames is None or "generation_node" not in reader.fieldnames:
|
5559
|
-
return "MANUAL"
|
5560
|
-
|
5561
|
-
for row in reader:
|
5562
|
-
all_match = True
|
5563
|
-
for key, val in target_combined.items():
|
5564
|
-
row_val = row.get(key)
|
5565
|
-
if row_val is None:
|
5566
|
-
all_match = False
|
5567
|
-
break
|
5568
|
-
|
5569
|
-
if isinstance(val, (int, float)):
|
5570
|
-
try:
|
5571
|
-
row_val_num = float(row_val)
|
5572
|
-
val_num = float(val)
|
5573
|
-
if abs(row_val_num - val_num) > 1e-8:
|
5574
|
-
all_match = False
|
5575
|
-
break
|
5576
|
-
except ValueError:
|
5577
|
-
all_match = False
|
5578
|
-
break
|
5579
|
-
else:
|
5580
|
-
if str(val) != row_val:
|
5581
|
-
all_match = False
|
5582
|
-
break
|
5580
|
+
target_combined = _get_generation_node_for_index_combine_dicts(target_arm_params, target_result)
|
5583
5581
|
|
5584
|
-
|
5585
|
-
|
5582
|
+
generation_node = _get_generation_node_for_index_find_generation_node(this_csv_file_path, target_combined)
|
5583
|
+
return generation_node
|
5586
5584
|
except Exception as e:
|
5587
5585
|
print(f"Error while get_generation_node_for_index: {e}")
|
5586
|
+
return "MANUAL"
|
5587
|
+
|
5588
|
+
|
5589
|
+
@beartype
|
5590
|
+
def _get_generation_node_for_index_index_valid(
|
5591
|
+
index: int,
|
5592
|
+
arm_params_list: List[Dict[str, Any]],
|
5593
|
+
results_list: List[Dict[str, Any]]
|
5594
|
+
) -> bool:
|
5595
|
+
return 0 <= index < len(arm_params_list) and index < len(results_list)
|
5596
|
+
|
5597
|
+
|
5598
|
+
@beartype
|
5599
|
+
def _get_generation_node_for_index_combine_dicts(
|
5600
|
+
dict1: Dict[str, Any],
|
5601
|
+
dict2: Dict[str, Any]
|
5602
|
+
) -> Dict[str, Any]:
|
5603
|
+
combined = {}
|
5604
|
+
combined.update(dict1)
|
5605
|
+
combined.update(dict2)
|
5606
|
+
return combined
|
5607
|
+
|
5608
|
+
|
5609
|
+
@beartype
|
5610
|
+
def _get_generation_node_for_index_find_generation_node(
|
5611
|
+
csv_file_path: str,
|
5612
|
+
target_combined: Dict[str, Any]
|
5613
|
+
) -> str:
|
5614
|
+
with open(csv_file_path, mode='r', newline='', encoding='utf-8') as csvfile:
|
5615
|
+
reader = csv.DictReader(csvfile)
|
5616
|
+
if reader.fieldnames is None or "generation_node" not in reader.fieldnames:
|
5617
|
+
return "MANUAL"
|
5618
|
+
|
5619
|
+
for row in reader:
|
5620
|
+
if _get_generation_node_for_index_row_matches(row, target_combined):
|
5621
|
+
return row["generation_node"]
|
5588
5622
|
|
5589
5623
|
return "MANUAL"
|
5590
5624
|
|
5625
|
+
|
5626
|
+
@beartype
|
5627
|
+
def _get_generation_node_for_index_row_matches(
|
5628
|
+
row: Dict[str, str],
|
5629
|
+
target_combined: Dict[str, Any]
|
5630
|
+
) -> bool:
|
5631
|
+
for key, val in target_combined.items():
|
5632
|
+
row_val = row.get(key)
|
5633
|
+
if row_val is None:
|
5634
|
+
return False
|
5635
|
+
|
5636
|
+
if isinstance(val, (int, float)):
|
5637
|
+
if not _get_generation_node_for_index_floats_match(val, row_val):
|
5638
|
+
return False
|
5639
|
+
else:
|
5640
|
+
if str(val) != row_val:
|
5641
|
+
return False
|
5642
|
+
|
5643
|
+
return True
|
5644
|
+
|
5645
|
+
|
5646
|
+
@beartype
|
5647
|
+
def _get_generation_node_for_index_floats_match(
|
5648
|
+
val: float,
|
5649
|
+
row_val_str: str,
|
5650
|
+
tolerance: float = 1e-8
|
5651
|
+
) -> bool:
|
5652
|
+
try:
|
5653
|
+
row_val_num = float(row_val_str)
|
5654
|
+
except ValueError:
|
5655
|
+
return False
|
5656
|
+
return abs(row_val_num - val) <= tolerance
|
5657
|
+
|
5591
5658
|
@beartype
|
5592
5659
|
def insert_jobs_from_csv(this_csv_file_path: str, experiment_parameters: Optional[Union[List[Any], dict]]) -> None:
|
5593
5660
|
if not os.path.exists(this_csv_file_path):
|
@@ -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=V9Z5LGIlTMKu0JpIq-TcORk6h5JQKxeuX9JBQ8K1H4k,375764
|
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=2oXx6uWGTu0liLjKyQY4V_NUNdEyyGEgSypvIf8XV-w,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-7100.data/data/bin/.colorfunctions.sh,sha256=CDlgjwrsrHR_E6c-Qak5wZlotArXm-nf9sVvXePzGZA,1083
|
34
|
+
omniopt2-7100.data/data/bin/.general.sh,sha256=uyGMN8xNToQ0v50KoiYxm6jRmgf0orroOaodM_Nuq30,2107
|
35
|
+
omniopt2-7100.data/data/bin/.helpers.py,sha256=srrRn0QBzG8JpNbHAYG2k1rQY6JYrUrNdTj-tDMJSyg,30526
|
36
|
+
omniopt2-7100.data/data/bin/.omniopt.py,sha256=V9Z5LGIlTMKu0JpIq-TcORk6h5JQKxeuX9JBQ8K1H4k,375764
|
37
|
+
omniopt2-7100.data/data/bin/.omniopt_plot_cpu_ram_usage.py,sha256=DbOAmdrbcZtsMnHJgHfeRngjtv6zX5J0axyua_dYezc,3932
|
38
|
+
omniopt2-7100.data/data/bin/.omniopt_plot_general.py,sha256=ZERZJkvVOoJhi7SszmTF1Iln-_08_0Aki48u3LHUW-k,6809
|
39
|
+
omniopt2-7100.data/data/bin/.omniopt_plot_gpu_usage.py,sha256=ojxVicwSoiyl7f3c-6lLuT2EpyPcSJKEcbp75LgDY2k,5107
|
40
|
+
omniopt2-7100.data/data/bin/.omniopt_plot_kde.py,sha256=uRLWr72TDKvj3AqJ0O0AvkKZ1ok1O1QpXnbfQQdo0nA,6873
|
41
|
+
omniopt2-7100.data/data/bin/.omniopt_plot_scatter.py,sha256=-amqmLR_YLCbHImLPh6gwVFv8iiVnXME544XHsRVCuw,8422
|
42
|
+
omniopt2-7100.data/data/bin/.omniopt_plot_scatter_generation_method.py,sha256=rgKY_w1E516c9UucVaEvaKd8tCnoUq9xg-RrYSDzYEQ,4289
|
43
|
+
omniopt2-7100.data/data/bin/.omniopt_plot_scatter_hex.py,sha256=w1L5gL6Bc_QudoSJi2lxEVvF17Apjjb3l2T-lXGnsUg,10279
|
44
|
+
omniopt2-7100.data/data/bin/.omniopt_plot_time_and_exit_code.py,sha256=hC4RFDiJN_UImezFR6M5uVF-QKDqMDpq6R5DIg7dDDc,6463
|
45
|
+
omniopt2-7100.data/data/bin/.omniopt_plot_trial_index_result.py,sha256=5DmqZAQO_PFmzdap-TIhSMAshRXpOHQacnHAtjwnzN4,4629
|
46
|
+
omniopt2-7100.data/data/bin/.omniopt_plot_worker.py,sha256=VuluQq4W6KRR5RU08dxmDSFk5mbfDRkRJQFwwcLgAGw,4524
|
47
|
+
omniopt2-7100.data/data/bin/.random_generator.py,sha256=ezBBUXpez_QaGdpCglMcJ0KZPdQP0XdX5gnLzO1xhwU,2987
|
48
|
+
omniopt2-7100.data/data/bin/.shellscript_functions,sha256=C2VT3Eafz9OtCzjWOMXSeZCUGVMRm8y3eGDL43Ay0qM,14656
|
49
|
+
omniopt2-7100.data/data/bin/.tpe.py,sha256=Yd9s-ixCbWxTd3x0O1M1sok9QfM2mBEfsDwXhx50-Nc,6464
|
50
|
+
omniopt2-7100.data/data/bin/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
51
|
+
omniopt2-7100.data/data/bin/apt-dependencies.txt,sha256=X5tBB8ZLW9XaFtRh8B7C2pIkSoxNNawqioDr0QZAtuM,149
|
52
|
+
omniopt2-7100.data/data/bin/omniopt,sha256=Xe8NP6NRoX4j2IPGRTY80eYfo5fYM-fJfj9_aVP-aR8,47963
|
53
|
+
omniopt2-7100.data/data/bin/omniopt_docker,sha256=LWVUeyvmA5AKqAHiH9jBUkR5uZ6AHMnSy0eET7mK6E4,3602
|
54
|
+
omniopt2-7100.data/data/bin/omniopt_evaluate,sha256=9oBh0_ikCuIz_aJQZrN0j39NDiIDYoSvEFmSVIoFjJE,23842
|
55
|
+
omniopt2-7100.data/data/bin/omniopt_plot,sha256=Z8ZR10p-ZRSgMeVPO-wVCJ8lk-LQtntjZ9Bk9RifCIs,13360
|
56
|
+
omniopt2-7100.data/data/bin/omniopt_share,sha256=7g5I7YdoWcA6_GDwWwq0xPf23qiVc_VDrm9ySLH7SH0,14051
|
57
|
+
omniopt2-7100.data/data/bin/requirements.txt,sha256=QsRYgd43IXr8rN9m0CxufI9mEneBrDeKh4s8E_W2xwI,287
|
58
|
+
omniopt2-7100.data/data/bin/setup.py,sha256=g3uEqJHXhggXwgLYoxOjsXg9Z6IV1ubh-Og59AZ264Q,4648
|
59
|
+
omniopt2-7100.data/data/bin/test_requirements.txt,sha256=dnCbKmKalrVzNZ_-iQWf1xCxcnDsdGuhbDAr9XlGm-U,477
|
60
|
+
omniopt2-7100.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
61
|
+
omniopt2.egg-info/PKG-INFO,sha256=q-aLLfispK5zLyI_wGFXZuOwjNLHmTivv44a-jbW3vw,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-7100.dist-info/METADATA,sha256=q-aLLfispK5zLyI_wGFXZuOwjNLHmTivv44a-jbW3vw,5814
|
67
|
+
omniopt2-7100.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
68
|
+
omniopt2-7100.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
69
|
+
omniopt2-7100.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-7098.data → omniopt2-7100.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
|