omniopt2 7354__tar.gz → 7357__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-7357}/.omniopt.py +12 -22
  2. {omniopt2-7354 → omniopt2-7357}/PKG-INFO +1 -1
  3. {omniopt2-7354 → omniopt2-7357}/omniopt2.egg-info/PKG-INFO +1 -1
  4. {omniopt2-7354 → omniopt2-7357}/pyproject.toml +1 -1
  5. {omniopt2-7354 → omniopt2-7357}/.colorfunctions.sh +0 -0
  6. {omniopt2-7354 → omniopt2-7357}/.dockerignore +0 -0
  7. {omniopt2-7354 → omniopt2-7357}/.general.sh +0 -0
  8. {omniopt2-7354 → omniopt2-7357}/.gitignore +0 -0
  9. {omniopt2-7354 → omniopt2-7357}/.helpers.py +0 -0
  10. {omniopt2-7354 → omniopt2-7357}/.omniopt_plot_cpu_ram_usage.py +0 -0
  11. {omniopt2-7354 → omniopt2-7357}/.omniopt_plot_general.py +0 -0
  12. {omniopt2-7354 → omniopt2-7357}/.omniopt_plot_gpu_usage.py +0 -0
  13. {omniopt2-7354 → omniopt2-7357}/.omniopt_plot_kde.py +0 -0
  14. {omniopt2-7354 → omniopt2-7357}/.omniopt_plot_scatter.py +0 -0
  15. {omniopt2-7354 → omniopt2-7357}/.omniopt_plot_scatter_generation_method.py +0 -0
  16. {omniopt2-7354 → omniopt2-7357}/.omniopt_plot_scatter_hex.py +0 -0
  17. {omniopt2-7354 → omniopt2-7357}/.omniopt_plot_time_and_exit_code.py +0 -0
  18. {omniopt2-7354 → omniopt2-7357}/.omniopt_plot_trial_index_result.py +0 -0
  19. {omniopt2-7354 → omniopt2-7357}/.omniopt_plot_worker.py +0 -0
  20. {omniopt2-7354 → omniopt2-7357}/.random_generator.py +0 -0
  21. {omniopt2-7354 → omniopt2-7357}/.shellscript_functions +0 -0
  22. {omniopt2-7354 → omniopt2-7357}/.tpe.py +0 -0
  23. {omniopt2-7354 → omniopt2-7357}/LICENSE +0 -0
  24. {omniopt2-7354 → omniopt2-7357}/MANIFEST.in +0 -0
  25. {omniopt2-7354 → omniopt2-7357}/README.md +0 -0
  26. {omniopt2-7354 → omniopt2-7357}/apt-dependencies.txt +0 -0
  27. {omniopt2-7354 → omniopt2-7357}/omniopt +0 -0
  28. {omniopt2-7354 → omniopt2-7357}/omniopt2.egg-info/SOURCES.txt +0 -0
  29. {omniopt2-7354 → omniopt2-7357}/omniopt2.egg-info/dependency_links.txt +0 -0
  30. {omniopt2-7354 → omniopt2-7357}/omniopt2.egg-info/requires.txt +0 -0
  31. {omniopt2-7354 → omniopt2-7357}/omniopt2.egg-info/top_level.txt +0 -0
  32. {omniopt2-7354 → omniopt2-7357}/omniopt_docker +0 -0
  33. {omniopt2-7354 → omniopt2-7357}/omniopt_evaluate +0 -0
  34. {omniopt2-7354 → omniopt2-7357}/omniopt_plot +0 -0
  35. {omniopt2-7354 → omniopt2-7357}/omniopt_share +0 -0
  36. {omniopt2-7354 → omniopt2-7357}/requirements.txt +0 -0
  37. {omniopt2-7354 → omniopt2-7357}/setup.cfg +0 -0
  38. {omniopt2-7354 → omniopt2-7357}/setup.py +0 -0
  39. {omniopt2-7354 → omniopt2-7357}/test_requirements.txt +0 -0
@@ -3957,32 +3957,21 @@ 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
3960
+ def is_valid_result(result: Union[int, float, Optional[Union[Dict[str, Optional[float]], List[float]]]]) -> bool:
3961
+ 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())))
3962
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
- )
3970
-
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}]")
3976
-
3977
- return None
3978
-
3979
- stdout_txt = _read(stdout_path)
3980
- stderr_txt = _read(stderr_path)
3963
+ @beartype
3964
+ 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:
3965
+ stdout_txt = get_file_as_string(stdout_path)
3966
+ stderr_txt = get_file_as_string(stderr_path)
3981
3967
 
3982
3968
  # -------- header -------- #
3983
- outcome = "SUCCESS" if (exit_code is not None and exit_code == 0) else "FAILURE"
3969
+ is_valid = is_valid_result(result)
3970
+
3971
+ outcome = "SUCCESS" if is_valid else "FAILURE"
3984
3972
  header_style = "bold white on green" if exit_code == 0 else "bold white on red"
3985
3973
  console.rule(Text(f" {outcome} (exit {exit_code}) ", style=header_style))
3974
+ console.rule(Text(f" RESULT: {result} ", style=header_style))
3986
3975
 
3987
3976
  def is_nonempty(s: Optional[str]) -> bool:
3988
3977
  return bool(s and s.strip())
@@ -7040,8 +7029,9 @@ def pretty_print_job_output(job: Job) -> None:
7040
7029
  stdout_path = get_stderr_or_stdout_from_job(job, "stdout")
7041
7030
  stderr_path = get_stderr_or_stdout_from_job(job, "stderr")
7042
7031
  exit_code = get_exit_code_from_stderr_or_stdout_path(stderr_path, stdout_path)
7032
+ result = get_results_with_occ(get_file_as_string(stdout_path))
7043
7033
 
7044
- pretty_process_output(stdout_path, stderr_path, exit_code)
7034
+ pretty_process_output(stdout_path, stderr_path, exit_code, result)
7045
7035
 
7046
7036
  @beartype
7047
7037
  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: 7357
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: 7357
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 = "7357"
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