omniopt2 7354__tar.gz → 7356__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-7354 → omniopt2-7356}/.omniopt.py +17 -18
  2. {omniopt2-7354 → omniopt2-7356}/PKG-INFO +1 -1
  3. {omniopt2-7354 → omniopt2-7356}/omniopt2.egg-info/PKG-INFO +1 -1
  4. {omniopt2-7354 → omniopt2-7356}/pyproject.toml +1 -1
  5. {omniopt2-7354 → omniopt2-7356}/.colorfunctions.sh +0 -0
  6. {omniopt2-7354 → omniopt2-7356}/.dockerignore +0 -0
  7. {omniopt2-7354 → omniopt2-7356}/.general.sh +0 -0
  8. {omniopt2-7354 → omniopt2-7356}/.gitignore +0 -0
  9. {omniopt2-7354 → omniopt2-7356}/.helpers.py +0 -0
  10. {omniopt2-7354 → omniopt2-7356}/.omniopt_plot_cpu_ram_usage.py +0 -0
  11. {omniopt2-7354 → omniopt2-7356}/.omniopt_plot_general.py +0 -0
  12. {omniopt2-7354 → omniopt2-7356}/.omniopt_plot_gpu_usage.py +0 -0
  13. {omniopt2-7354 → omniopt2-7356}/.omniopt_plot_kde.py +0 -0
  14. {omniopt2-7354 → omniopt2-7356}/.omniopt_plot_scatter.py +0 -0
  15. {omniopt2-7354 → omniopt2-7356}/.omniopt_plot_scatter_generation_method.py +0 -0
  16. {omniopt2-7354 → omniopt2-7356}/.omniopt_plot_scatter_hex.py +0 -0
  17. {omniopt2-7354 → omniopt2-7356}/.omniopt_plot_time_and_exit_code.py +0 -0
  18. {omniopt2-7354 → omniopt2-7356}/.omniopt_plot_trial_index_result.py +0 -0
  19. {omniopt2-7354 → omniopt2-7356}/.omniopt_plot_worker.py +0 -0
  20. {omniopt2-7354 → omniopt2-7356}/.random_generator.py +0 -0
  21. {omniopt2-7354 → omniopt2-7356}/.shellscript_functions +0 -0
  22. {omniopt2-7354 → omniopt2-7356}/.tpe.py +0 -0
  23. {omniopt2-7354 → omniopt2-7356}/LICENSE +0 -0
  24. {omniopt2-7354 → omniopt2-7356}/MANIFEST.in +0 -0
  25. {omniopt2-7354 → omniopt2-7356}/README.md +0 -0
  26. {omniopt2-7354 → omniopt2-7356}/apt-dependencies.txt +0 -0
  27. {omniopt2-7354 → omniopt2-7356}/omniopt +0 -0
  28. {omniopt2-7354 → omniopt2-7356}/omniopt2.egg-info/SOURCES.txt +0 -0
  29. {omniopt2-7354 → omniopt2-7356}/omniopt2.egg-info/dependency_links.txt +0 -0
  30. {omniopt2-7354 → omniopt2-7356}/omniopt2.egg-info/requires.txt +0 -0
  31. {omniopt2-7354 → omniopt2-7356}/omniopt2.egg-info/top_level.txt +0 -0
  32. {omniopt2-7354 → omniopt2-7356}/omniopt_docker +0 -0
  33. {omniopt2-7354 → omniopt2-7356}/omniopt_evaluate +0 -0
  34. {omniopt2-7354 → omniopt2-7356}/omniopt_plot +0 -0
  35. {omniopt2-7354 → omniopt2-7356}/omniopt_share +0 -0
  36. {omniopt2-7354 → omniopt2-7356}/requirements.txt +0 -0
  37. {omniopt2-7354 → omniopt2-7356}/setup.cfg +0 -0
  38. {omniopt2-7354 → omniopt2-7356}/setup.py +0 -0
  39. {omniopt2-7354 → omniopt2-7356}/test_requirements.txt +0 -0
@@ -3957,32 +3957,30 @@ def _evaluate_handle_result(
3957
3957
  return final_result
3958
3958
 
3959
3959
  @beartype
3960
- def pretty_process_output(stdout_path: str, stderr_path: str, exit_code: Optional[int]) -> None:
3961
- global console
3962
-
3963
- console = Console(
3964
- force_interactive=True,
3965
- soft_wrap=True,
3966
- color_system="256",
3967
- force_terminal=not ci_env,
3968
- width=max(200, terminal_width)
3969
- )
3960
+ def _read(p: str) -> Optional[str]:
3961
+ try:
3962
+ return Path(p).read_text(encoding="utf-8", errors="replace")
3963
+ except FileNotFoundError:
3964
+ print_debug(f"[file not found: {p}]")
3970
3965
 
3971
- def _read(p: str) -> Optional[str]:
3972
- try:
3973
- return Path(p).read_text(encoding="utf-8", errors="replace")
3974
- except FileNotFoundError:
3975
- print_debug(f"[file not found: {p}]")
3966
+ return None
3976
3967
 
3977
- return None
3968
+ @beartype
3969
+ def is_valid_result(result: Union[int, float, Optional[Union[Dict[str, Optional[float]], List[float]]]]) -> bool:
3970
+ return result is not None and (isinstance(result, (int, float)) or (isinstance(result, list) and all(isinstance(x, (int, float)) and x is not None for x in result)) or (isinstance(result, dict) and all(isinstance(v, (int, float)) and v is not None for v in result.values())))
3978
3971
 
3972
+ @beartype
3973
+ def pretty_process_output(stdout_path: str, stderr_path: str, exit_code: Optional[int], result: Union[int, float, Optional[Union[Dict[str, Optional[float]], List[float]]]]) -> None:
3979
3974
  stdout_txt = _read(stdout_path)
3980
3975
  stderr_txt = _read(stderr_path)
3981
3976
 
3982
3977
  # -------- header -------- #
3983
- outcome = "SUCCESS" if (exit_code is not None and exit_code == 0) else "FAILURE"
3978
+ is_valid = is_valid_result(result)
3979
+
3980
+ outcome = "SUCCESS" if is_valid else "FAILURE"
3984
3981
  header_style = "bold white on green" if exit_code == 0 else "bold white on red"
3985
3982
  console.rule(Text(f" {outcome} (exit {exit_code}) ", style=header_style))
3983
+ console.rule(Text(f" RESULT: {result} ", style=header_style))
3986
3984
 
3987
3985
  def is_nonempty(s: Optional[str]) -> bool:
3988
3986
  return bool(s and s.strip())
@@ -7040,8 +7038,9 @@ def pretty_print_job_output(job: Job) -> None:
7040
7038
  stdout_path = get_stderr_or_stdout_from_job(job, "stdout")
7041
7039
  stderr_path = get_stderr_or_stdout_from_job(job, "stderr")
7042
7040
  exit_code = get_exit_code_from_stderr_or_stdout_path(stderr_path, stdout_path)
7041
+ result = get_results_with_occ(get_file_as_string(stdout_path))
7043
7042
 
7044
- pretty_process_output(stdout_path, stderr_path, exit_code)
7043
+ pretty_process_output(stdout_path, stderr_path, exit_code, result)
7045
7044
 
7046
7045
  @beartype
7047
7046
  def get_stderr_or_stdout_from_job(job: Job, path_type: str) -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: omniopt2
3
- Version: 7354
3
+ Version: 7356
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: 7354
3
+ Version: 7356
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 = "7354"
8
+ version = "7356"
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