omniopt2 8311__tar.gz → 8326__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.

Potentially problematic release.


This version of omniopt2 might be problematic. Click here for more details.

Files changed (40) hide show
  1. {omniopt2-8311 → omniopt2-8326}/.omniopt.py +75 -6
  2. {omniopt2-8311 → omniopt2-8326}/PKG-INFO +1 -1
  3. {omniopt2-8311 → omniopt2-8326}/omniopt2.egg-info/PKG-INFO +1 -1
  4. {omniopt2-8311 → omniopt2-8326}/pyproject.toml +1 -1
  5. {omniopt2-8311 → omniopt2-8326}/.colorfunctions.sh +0 -0
  6. {omniopt2-8311 → omniopt2-8326}/.dockerignore +0 -0
  7. {omniopt2-8311 → omniopt2-8326}/.general.sh +0 -0
  8. {omniopt2-8311 → omniopt2-8326}/.gitignore +0 -0
  9. {omniopt2-8311 → omniopt2-8326}/.helpers.py +0 -0
  10. {omniopt2-8311 → omniopt2-8326}/.omniopt_plot_cpu_ram_usage.py +0 -0
  11. {omniopt2-8311 → omniopt2-8326}/.omniopt_plot_general.py +0 -0
  12. {omniopt2-8311 → omniopt2-8326}/.omniopt_plot_gpu_usage.py +0 -0
  13. {omniopt2-8311 → omniopt2-8326}/.omniopt_plot_kde.py +0 -0
  14. {omniopt2-8311 → omniopt2-8326}/.omniopt_plot_scatter.py +0 -0
  15. {omniopt2-8311 → omniopt2-8326}/.omniopt_plot_scatter_generation_method.py +0 -0
  16. {omniopt2-8311 → omniopt2-8326}/.omniopt_plot_scatter_hex.py +0 -0
  17. {omniopt2-8311 → omniopt2-8326}/.omniopt_plot_time_and_exit_code.py +0 -0
  18. {omniopt2-8311 → omniopt2-8326}/.omniopt_plot_trial_index_result.py +0 -0
  19. {omniopt2-8311 → omniopt2-8326}/.omniopt_plot_worker.py +0 -0
  20. {omniopt2-8311 → omniopt2-8326}/.random_generator.py +0 -0
  21. {omniopt2-8311 → omniopt2-8326}/.shellscript_functions +0 -0
  22. {omniopt2-8311 → omniopt2-8326}/.tests/pylint.rc +0 -0
  23. {omniopt2-8311 → omniopt2-8326}/.tpe.py +0 -0
  24. {omniopt2-8311 → omniopt2-8326}/LICENSE +0 -0
  25. {omniopt2-8311 → omniopt2-8326}/MANIFEST.in +0 -0
  26. {omniopt2-8311 → omniopt2-8326}/README.md +0 -0
  27. {omniopt2-8311 → omniopt2-8326}/apt-dependencies.txt +0 -0
  28. {omniopt2-8311 → omniopt2-8326}/omniopt +0 -0
  29. {omniopt2-8311 → omniopt2-8326}/omniopt2.egg-info/SOURCES.txt +0 -0
  30. {omniopt2-8311 → omniopt2-8326}/omniopt2.egg-info/dependency_links.txt +0 -0
  31. {omniopt2-8311 → omniopt2-8326}/omniopt2.egg-info/requires.txt +0 -0
  32. {omniopt2-8311 → omniopt2-8326}/omniopt2.egg-info/top_level.txt +0 -0
  33. {omniopt2-8311 → omniopt2-8326}/omniopt_docker +0 -0
  34. {omniopt2-8311 → omniopt2-8326}/omniopt_evaluate +0 -0
  35. {omniopt2-8311 → omniopt2-8326}/omniopt_plot +0 -0
  36. {omniopt2-8311 → omniopt2-8326}/omniopt_share +0 -0
  37. {omniopt2-8311 → omniopt2-8326}/requirements.txt +0 -0
  38. {omniopt2-8311 → omniopt2-8326}/setup.cfg +0 -0
  39. {omniopt2-8311 → omniopt2-8326}/setup.py +0 -0
  40. {omniopt2-8311 → omniopt2-8326}/test_requirements.txt +0 -0
@@ -26,6 +26,8 @@ import traceback
26
26
  import inspect
27
27
  import tracemalloc
28
28
  import resource
29
+ from urllib.parse import urlencode
30
+
29
31
  import psutil
30
32
 
31
33
  FORCE_EXIT: bool = False
@@ -6526,7 +6528,7 @@ def insert_jobs_from_csv(this_csv_file_path: str) -> None:
6526
6528
  def normalize_path(file_path: str) -> str:
6527
6529
  return file_path.replace("//", "/")
6528
6530
 
6529
- def insert_jobs_from_lists(csv_path, arm_params_list, results_list, __status):
6531
+ def insert_jobs_from_lists(csv_path: str, arm_params_list: Any, results_list: Any, __status: Any) -> None:
6530
6532
  cnt = 0
6531
6533
  err_msgs = []
6532
6534
 
@@ -10414,7 +10416,7 @@ def main() -> None:
10414
10416
  print_run_info()
10415
10417
 
10416
10418
  initialize_nvidia_logs()
10417
- write_ui_url_if_present()
10419
+ write_ui_url()
10418
10420
 
10419
10421
  LOGFILE_DEBUG_GET_NEXT_TRIALS = get_current_run_folder('get_next_trials.csv')
10420
10422
  cli_params_experiment_parameters = parse_parameters()
@@ -10542,10 +10544,77 @@ def initialize_nvidia_logs() -> None:
10542
10544
  global NVIDIA_SMI_LOGS_BASE
10543
10545
  NVIDIA_SMI_LOGS_BASE = get_current_run_folder('gpu_usage_')
10544
10546
 
10545
- def write_ui_url_if_present() -> None:
10546
- if args.ui_url:
10547
- with open(get_current_run_folder("ui_url.txt"), mode="a", encoding="utf-8") as myfile:
10548
- myfile.write(decode_if_base64(args.ui_url))
10547
+ def build_gui_url(config: argparse.Namespace) -> str:
10548
+ base_url = get_base_url()
10549
+ params = collect_params(config)
10550
+ return f"{base_url}?{urlencode(params, doseq=True)}"
10551
+
10552
+ def collect_params(config: argparse.Namespace) -> dict:
10553
+ params = {}
10554
+ for attr, value in vars(config).items():
10555
+ if attr == "run_program":
10556
+ params[attr] = global_vars["joined_run_program"]
10557
+ elif attr == "parameter" and value is not None:
10558
+ params.update(process_parameters(config.parameter))
10559
+ elif isinstance(value, bool):
10560
+ params[attr] = int(value)
10561
+ elif isinstance(value, list):
10562
+ params[attr] = value
10563
+ elif value is not None:
10564
+ params[attr] = value
10565
+ return params
10566
+
10567
+ def process_parameters(parameters: list) -> dict:
10568
+ params = {}
10569
+ for i, param in enumerate(parameters):
10570
+ if isinstance(param, dict):
10571
+ name = param.get("name", f"param_{i}")
10572
+ ptype = param.get("type", "unknown")
10573
+ else:
10574
+ name = param[0] if len(param) > 0 else f"param_{i}"
10575
+ ptype = param[1] if len(param) > 1 else "unknown"
10576
+
10577
+ params[f"parameter_{i}_name"] = name
10578
+ params[f"parameter_{i}_type"] = ptype
10579
+
10580
+ if ptype == "range":
10581
+ params.update(process_range_parameter(i, param))
10582
+ elif ptype == "choice":
10583
+ params.update(process_choice_parameter(i, param))
10584
+ elif ptype == "fixed":
10585
+ params.update(process_fixed_parameter(i, param))
10586
+
10587
+ params["num_parameters"] = len(parameters)
10588
+ return params
10589
+
10590
+ def process_range_parameter(i: int, param: list) -> dict:
10591
+ return {
10592
+ f"parameter_{i}_min": param[2] if len(param) > 3 else 0,
10593
+ f"parameter_{i}_max": param[3] if len(param) > 3 else 1,
10594
+ f"parameter_{i}_number_type": param[4] if len(param) > 4 else "float",
10595
+ f"parameter_{i}_log_scale": "false",
10596
+ }
10597
+
10598
+ def process_choice_parameter(i: int, param: list) -> dict:
10599
+ choices = ""
10600
+ if len(param) > 2 and param[2]:
10601
+ choices = ",".join([c.strip() for c in str(param[2]).split(",")])
10602
+ return {f"parameter_{i}_values": choices}
10603
+
10604
+ def process_fixed_parameter(i: int, param: list) -> dict:
10605
+ return {f"parameter_{i}_value": param[2] if len(param) > 2 else ""}
10606
+
10607
+ def get_base_url() -> str:
10608
+ file_path = Path.home() / ".oo_base_url"
10609
+ if file_path.exists():
10610
+ return file_path.read_text().strip()
10611
+
10612
+ return "https://imageseg.scads.de/omniax/"
10613
+
10614
+ def write_ui_url() -> None:
10615
+ url = build_gui_url(args)
10616
+ with open(get_current_run_folder("ui_url.txt"), mode="a", encoding="utf-8") as myfile:
10617
+ myfile.write(decode_if_base64(url))
10549
10618
 
10550
10619
  def handle_random_steps() -> None:
10551
10620
  if args.parameter and args.continue_previous_job and random_steps <= 0:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: omniopt2
3
- Version: 8311
3
+ Version: 8326
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: 8311
3
+ Version: 8326
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 = "8311"
8
+ version = "8326"
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
File without changes