omniopt2 7098__tar.gz → 7099__tar.gz

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.
Files changed (39) hide show
  1. {omniopt2-7098 → omniopt2-7099}/.omniopt.py +59 -37
  2. {omniopt2-7098 → omniopt2-7099}/PKG-INFO +1 -1
  3. {omniopt2-7098 → omniopt2-7099}/omniopt2.egg-info/PKG-INFO +1 -1
  4. {omniopt2-7098 → omniopt2-7099}/pyproject.toml +1 -1
  5. {omniopt2-7098 → omniopt2-7099}/.colorfunctions.sh +0 -0
  6. {omniopt2-7098 → omniopt2-7099}/.dockerignore +0 -0
  7. {omniopt2-7098 → omniopt2-7099}/.general.sh +0 -0
  8. {omniopt2-7098 → omniopt2-7099}/.gitignore +0 -0
  9. {omniopt2-7098 → omniopt2-7099}/.helpers.py +0 -0
  10. {omniopt2-7098 → omniopt2-7099}/.omniopt_plot_cpu_ram_usage.py +0 -0
  11. {omniopt2-7098 → omniopt2-7099}/.omniopt_plot_general.py +0 -0
  12. {omniopt2-7098 → omniopt2-7099}/.omniopt_plot_gpu_usage.py +0 -0
  13. {omniopt2-7098 → omniopt2-7099}/.omniopt_plot_kde.py +0 -0
  14. {omniopt2-7098 → omniopt2-7099}/.omniopt_plot_scatter.py +0 -0
  15. {omniopt2-7098 → omniopt2-7099}/.omniopt_plot_scatter_generation_method.py +0 -0
  16. {omniopt2-7098 → omniopt2-7099}/.omniopt_plot_scatter_hex.py +0 -0
  17. {omniopt2-7098 → omniopt2-7099}/.omniopt_plot_time_and_exit_code.py +0 -0
  18. {omniopt2-7098 → omniopt2-7099}/.omniopt_plot_trial_index_result.py +0 -0
  19. {omniopt2-7098 → omniopt2-7099}/.omniopt_plot_worker.py +0 -0
  20. {omniopt2-7098 → omniopt2-7099}/.random_generator.py +0 -0
  21. {omniopt2-7098 → omniopt2-7099}/.shellscript_functions +0 -0
  22. {omniopt2-7098 → omniopt2-7099}/.tpe.py +0 -0
  23. {omniopt2-7098 → omniopt2-7099}/LICENSE +0 -0
  24. {omniopt2-7098 → omniopt2-7099}/MANIFEST.in +0 -0
  25. {omniopt2-7098 → omniopt2-7099}/README.md +0 -0
  26. {omniopt2-7098 → omniopt2-7099}/apt-dependencies.txt +0 -0
  27. {omniopt2-7098 → omniopt2-7099}/omniopt +0 -0
  28. {omniopt2-7098 → omniopt2-7099}/omniopt2.egg-info/SOURCES.txt +0 -0
  29. {omniopt2-7098 → omniopt2-7099}/omniopt2.egg-info/dependency_links.txt +0 -0
  30. {omniopt2-7098 → omniopt2-7099}/omniopt2.egg-info/requires.txt +0 -0
  31. {omniopt2-7098 → omniopt2-7099}/omniopt2.egg-info/top_level.txt +0 -0
  32. {omniopt2-7098 → omniopt2-7099}/omniopt_docker +0 -0
  33. {omniopt2-7098 → omniopt2-7099}/omniopt_evaluate +0 -0
  34. {omniopt2-7098 → omniopt2-7099}/omniopt_plot +0 -0
  35. {omniopt2-7098 → omniopt2-7099}/omniopt_share +0 -0
  36. {omniopt2-7098 → omniopt2-7099}/requirements.txt +0 -0
  37. {omniopt2-7098 → omniopt2-7099}/setup.cfg +0 -0
  38. {omniopt2-7098 → omniopt2-7099}/setup.py +0 -0
  39. {omniopt2-7098 → omniopt2-7099}/test_requirements.txt +0 -0
@@ -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 parse_experiment_parameters() -> Tuple[list, list]:
2625
- params: list = []
2626
- classic_params: list = []
2627
- param_names: List[str] = []
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
- i = 0
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
- search_space_reduction_warning = False
2637
+ return ""
2632
2638
 
2633
- valid_types = ["range", "fixed", "choice"]
2634
- invalid_names = ["start_time", "end_time", "run_time", "program_string", *arg_result_names, "exit_code", "signal"]
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 args.parameter and i < len(args.parameter):
2637
- this_args = args.parameter[i]
2638
- j = 0
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
- if this_args is not None and isinstance(this_args, dict) and "param" in this_args:
2641
- this_args = this_args["param"]
2660
+ param_names.append(name)
2661
+ global_param_names.append(name)
2642
2662
 
2643
- while j < len(this_args) - 1:
2644
- name = this_args[j]
2663
+ param_type = _parse_experiment_parameters_get_param_type(this_args, j)
2645
2664
 
2646
- if name in invalid_names:
2647
- _fatal_error(f"\nName for argument no. {j} is invalid: {name}. Invalid names are: {', '.join(invalid_names)}", 181)
2665
+ if param_type not in param_parsers:
2666
+ _fatal_error(f"⚠ Parameter type '{param_type}' not yet implemented.", 181)
2648
2667
 
2649
- if name in param_names:
2650
- _fatal_error(f"\n⚠ Parameter name '{name}' is not unique. Names for parameters must be unique!", 181)
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
- param_names.append(name)
2653
- global_param_names.append(name)
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
- try:
2656
- param_type = this_args[j + 1]
2657
- except Exception:
2658
- _fatal_error("Not enough arguments for --parameter", 181)
2659
-
2660
- param_parsers = {
2661
- "range": parse_range_param,
2662
- "fixed": parse_fixed_param,
2663
- "choice": parse_choice_param
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
- if param_type not in param_parsers:
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
- if param_type not in valid_types:
2670
- valid_types_string = ', '.join(valid_types)
2671
- _fatal_error(f"\n⚠ Invalid type {param_type}, valid types are: {valid_types_string}", 181)
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
- j, params, classic_params, search_space_reduction_warning = param_parsers[param_type](classic_params, params, j, this_args, name, search_space_reduction_warning)
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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: omniopt2
3
- Version: 7098
3
+ Version: 7099
4
4
  Summary: Automatic highly parallelized hyperparameter optimizer based on Ax/Botorch
5
5
  Home-page: https://scads.ai/transfer-2/verfuegbare-software-dienste-en/omniopt/
6
6
  Author: Norman Koch
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: omniopt2
3
- Version: 7098
3
+ Version: 7099
4
4
  Summary: Automatic highly parallelized hyperparameter optimizer based on Ax/Botorch
5
5
  Home-page: https://scads.ai/transfer-2/verfuegbare-software-dienste-en/omniopt/
6
6
  Author: Norman Koch
@@ -5,7 +5,7 @@ authors = [
5
5
  {email = "norman.koch@tu-dresden.de"},
6
6
  {name = "Norman Koch"}
7
7
  ]
8
- version = "7098"
8
+ version = "7099"
9
9
 
10
10
  readme = "README.md"
11
11
  dynamic = ["dependencies"]
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
File without changes
File without changes