omniopt2 6929__tar.gz → 6953__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 (38) hide show
  1. {omniopt2-6929 → omniopt2-6953}/.omniopt.py +26 -38
  2. {omniopt2-6929 → omniopt2-6953}/PKG-INFO +1 -1
  3. {omniopt2-6929 → omniopt2-6953}/omniopt2.egg-info/PKG-INFO +1 -1
  4. {omniopt2-6929 → omniopt2-6953}/pyproject.toml +1 -1
  5. {omniopt2-6929 → omniopt2-6953}/.colorfunctions.sh +0 -0
  6. {omniopt2-6929 → omniopt2-6953}/.dockerignore +0 -0
  7. {omniopt2-6929 → omniopt2-6953}/.general.sh +0 -0
  8. {omniopt2-6929 → omniopt2-6953}/.gitignore +0 -0
  9. {omniopt2-6929 → omniopt2-6953}/.helpers.py +0 -0
  10. {omniopt2-6929 → omniopt2-6953}/.omniopt_plot_cpu_ram_usage.py +0 -0
  11. {omniopt2-6929 → omniopt2-6953}/.omniopt_plot_general.py +0 -0
  12. {omniopt2-6929 → omniopt2-6953}/.omniopt_plot_gpu_usage.py +0 -0
  13. {omniopt2-6929 → omniopt2-6953}/.omniopt_plot_kde.py +0 -0
  14. {omniopt2-6929 → omniopt2-6953}/.omniopt_plot_scatter.py +0 -0
  15. {omniopt2-6929 → omniopt2-6953}/.omniopt_plot_scatter_generation_method.py +0 -0
  16. {omniopt2-6929 → omniopt2-6953}/.omniopt_plot_scatter_hex.py +0 -0
  17. {omniopt2-6929 → omniopt2-6953}/.omniopt_plot_time_and_exit_code.py +0 -0
  18. {omniopt2-6929 → omniopt2-6953}/.omniopt_plot_trial_index_result.py +0 -0
  19. {omniopt2-6929 → omniopt2-6953}/.omniopt_plot_worker.py +0 -0
  20. {omniopt2-6929 → omniopt2-6953}/.random_generator.py +0 -0
  21. {omniopt2-6929 → omniopt2-6953}/.shellscript_functions +0 -0
  22. {omniopt2-6929 → omniopt2-6953}/LICENSE +0 -0
  23. {omniopt2-6929 → omniopt2-6953}/MANIFEST.in +0 -0
  24. {omniopt2-6929 → omniopt2-6953}/README.md +0 -0
  25. {omniopt2-6929 → omniopt2-6953}/apt-dependencies.txt +0 -0
  26. {omniopt2-6929 → omniopt2-6953}/omniopt +0 -0
  27. {omniopt2-6929 → omniopt2-6953}/omniopt2.egg-info/SOURCES.txt +0 -0
  28. {omniopt2-6929 → omniopt2-6953}/omniopt2.egg-info/dependency_links.txt +0 -0
  29. {omniopt2-6929 → omniopt2-6953}/omniopt2.egg-info/requires.txt +0 -0
  30. {omniopt2-6929 → omniopt2-6953}/omniopt2.egg-info/top_level.txt +0 -0
  31. {omniopt2-6929 → omniopt2-6953}/omniopt_docker +0 -0
  32. {omniopt2-6929 → omniopt2-6953}/omniopt_evaluate +0 -0
  33. {omniopt2-6929 → omniopt2-6953}/omniopt_plot +0 -0
  34. {omniopt2-6929 → omniopt2-6953}/omniopt_share +0 -0
  35. {omniopt2-6929 → omniopt2-6953}/requirements.txt +0 -0
  36. {omniopt2-6929 → omniopt2-6953}/setup.cfg +0 -0
  37. {omniopt2-6929 → omniopt2-6953}/setup.py +0 -0
  38. {omniopt2-6929 → omniopt2-6953}/test_requirements.txt +0 -0
@@ -8279,12 +8279,6 @@ def plot_pareto_frontier_sixel(data: Any, x_metric: str, y_metric: str) -> None:
8279
8279
 
8280
8280
  plt.close(fig)
8281
8281
 
8282
- @beartype
8283
- def convert_to_serializable(obj: np.ndarray) -> Union[str, list]:
8284
- if isinstance(obj, np.ndarray):
8285
- return obj.tolist()
8286
- raise TypeError(f"Object of type {type(obj).__name__} is not JSON serializable")
8287
-
8288
8282
  @beartype
8289
8283
  def pareto_front_general(
8290
8284
  x: np.ndarray,
@@ -8645,29 +8639,9 @@ def get_result_minimize_flag(path_to_calculate: str, resname: str) -> bool:
8645
8639
  return minmax[index] == "min"
8646
8640
 
8647
8641
  @beartype
8648
- def rename_pareto_file_with_old_cleanup():
8649
- folder = get_current_run_folder()
8650
- original_file = os.path.join(folder, "pareto_front_table.txt")
8651
- old_file = original_file + "_OLD"
8652
-
8653
- try:
8654
- # Delete the old backup file if it exists
8655
- if os.path.exists(old_file):
8656
- os.remove(old_file)
8657
-
8658
- # Rename the original file to the backup name if it exists
8659
- if os.path.exists(original_file):
8660
- os.rename(original_file, old_file)
8661
- except Exception as e:
8662
- print_debug(f"Error while processing file: {e}")
8663
-
8664
- @beartype
8665
- def show_pareto_frontier_data(path_to_calculate: str, res_names: list, disable_sixel_and_table: bool = False) -> None:
8666
- if len(res_names) <= 1:
8667
- print_debug(f"--result_names (has {len(res_names)} entries) must be at least 2.")
8668
- return
8669
-
8642
+ def get_pareto_front_data(path_to_calculate: str, res_names: list) -> dict:
8670
8643
  pareto_front_data: dict = {}
8644
+
8671
8645
  all_combinations = list(combinations(range(len(arg_result_names)), 2))
8672
8646
 
8673
8647
  skip = False
@@ -8691,10 +8665,22 @@ def show_pareto_frontier_data(path_to_calculate: str, res_names: list, disable_s
8691
8665
  print_red("Calculating pareto-fronts was cancelled by pressing CTRL-c")
8692
8666
  skip = True
8693
8667
 
8694
- if pareto_front_data.keys():
8695
- rename_pareto_file_with_old_cleanup()
8668
+ return pareto_front_data
8669
+
8670
+ @beartype
8671
+ def show_pareto_frontier_data(path_to_calculate: str, res_names: list, disable_sixel_and_table: bool = False) -> None:
8672
+ if len(res_names) <= 1:
8673
+ print_debug(f"--result_names (has {len(res_names)} entries) must be at least 2.")
8674
+ return
8675
+
8676
+ pareto_front_data: dict = get_pareto_front_data(path_to_calculate, res_names)
8677
+
8678
+ pareto_points = {}
8696
8679
 
8697
8680
  for metric_x in pareto_front_data.keys():
8681
+ if metric_x not in pareto_points:
8682
+ pareto_points[metric_x] = {}
8683
+
8698
8684
  for metric_y in pareto_front_data[metric_x].keys():
8699
8685
  calculated_frontier = pareto_front_data[metric_x][metric_y]
8700
8686
 
@@ -8706,12 +8692,8 @@ def show_pareto_frontier_data(path_to_calculate: str, res_names: list, disable_s
8706
8692
  else:
8707
8693
  print(f"Not showing pareto-front-sixel for {path_to_calculate}")
8708
8694
 
8709
- pareto_front_data[metric_x][metric_y] = {
8710
- "param_dicts": calculated_frontier[metric_x][metric_y]["param_dicts"],
8711
- "means": calculated_frontier[metric_x][metric_y]["means"],
8712
- "absolute_metrics": arg_result_names,
8713
- "idxs": calculated_frontier[metric_x][metric_y]["idxs"]
8714
- }
8695
+ if len(calculated_frontier[metric_x][metric_y]["idxs"]):
8696
+ pareto_points[metric_x][metric_y] = sorted(calculated_frontier[metric_x][metric_y]["idxs"])
8715
8697
 
8716
8698
  rich_table = pareto_front_as_rich_table(
8717
8699
  calculated_frontier[metric_x][metric_y]["idxs"],
@@ -8731,8 +8713,8 @@ def show_pareto_frontier_data(path_to_calculate: str, res_names: list, disable_s
8731
8713
  console.print(rich_table)
8732
8714
  text_file.write(capture.get())
8733
8715
 
8734
- with open(f"{get_current_run_folder()}/pareto_front_data.json", mode="w", encoding="utf-8") as pareto_front_json_handle:
8735
- json.dump(pareto_front_data, pareto_front_json_handle, default=convert_to_serializable)
8716
+ with open(f"{get_current_run_folder()}/pareto_idxs.json", mode="w", encoding="utf-8") as pareto_idxs_json_handle:
8717
+ json.dump(pareto_points, pareto_idxs_json_handle)
8736
8718
 
8737
8719
  live_share_after_pareto()
8738
8720
 
@@ -9053,6 +9035,8 @@ def post_job_calculate_pareto_front() -> None:
9053
9035
 
9054
9036
  @beartype
9055
9037
  def job_calculate_pareto_front(path_to_calculate: str, disable_sixel_and_table: bool = False) -> bool:
9038
+ pf_start_time = time.time()
9039
+
9056
9040
  # Returns true if it fails
9057
9041
  if not path_to_calculate:
9058
9042
  return True
@@ -9121,6 +9105,10 @@ def job_calculate_pareto_front(path_to_calculate: str, disable_sixel_and_table:
9121
9105
 
9122
9106
  show_pareto_or_error_msg(path_to_calculate, res_names, disable_sixel_and_table)
9123
9107
 
9108
+ pf_end_time = time.time()
9109
+
9110
+ print_debug(f"Calculating the pareto-front took {pf_end_time - pf_start_time} seconds")
9111
+
9124
9112
  return False
9125
9113
 
9126
9114
  @beartype
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: omniopt2
3
- Version: 6929
3
+ Version: 6953
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: 6929
3
+ Version: 6953
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 = "6929"
8
+ version = "6953"
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