omniopt2 8171__tar.gz → 8174__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-8171 → omniopt2-8174}/.omniopt.py +36 -29
  2. {omniopt2-8171 → omniopt2-8174}/PKG-INFO +1 -1
  3. {omniopt2-8171 → omniopt2-8174}/omniopt2.egg-info/PKG-INFO +1 -1
  4. {omniopt2-8171 → omniopt2-8174}/pyproject.toml +1 -1
  5. {omniopt2-8171 → omniopt2-8174}/.colorfunctions.sh +0 -0
  6. {omniopt2-8171 → omniopt2-8174}/.dockerignore +0 -0
  7. {omniopt2-8171 → omniopt2-8174}/.general.sh +0 -0
  8. {omniopt2-8171 → omniopt2-8174}/.gitignore +0 -0
  9. {omniopt2-8171 → omniopt2-8174}/.helpers.py +0 -0
  10. {omniopt2-8171 → omniopt2-8174}/.omniopt_plot_cpu_ram_usage.py +0 -0
  11. {omniopt2-8171 → omniopt2-8174}/.omniopt_plot_general.py +0 -0
  12. {omniopt2-8171 → omniopt2-8174}/.omniopt_plot_gpu_usage.py +0 -0
  13. {omniopt2-8171 → omniopt2-8174}/.omniopt_plot_kde.py +0 -0
  14. {omniopt2-8171 → omniopt2-8174}/.omniopt_plot_scatter.py +0 -0
  15. {omniopt2-8171 → omniopt2-8174}/.omniopt_plot_scatter_generation_method.py +0 -0
  16. {omniopt2-8171 → omniopt2-8174}/.omniopt_plot_scatter_hex.py +0 -0
  17. {omniopt2-8171 → omniopt2-8174}/.omniopt_plot_time_and_exit_code.py +0 -0
  18. {omniopt2-8171 → omniopt2-8174}/.omniopt_plot_trial_index_result.py +0 -0
  19. {omniopt2-8171 → omniopt2-8174}/.omniopt_plot_worker.py +0 -0
  20. {omniopt2-8171 → omniopt2-8174}/.random_generator.py +0 -0
  21. {omniopt2-8171 → omniopt2-8174}/.shellscript_functions +0 -0
  22. {omniopt2-8171 → omniopt2-8174}/.tests/pylint.rc +0 -0
  23. {omniopt2-8171 → omniopt2-8174}/.tpe.py +0 -0
  24. {omniopt2-8171 → omniopt2-8174}/LICENSE +0 -0
  25. {omniopt2-8171 → omniopt2-8174}/MANIFEST.in +0 -0
  26. {omniopt2-8171 → omniopt2-8174}/README.md +0 -0
  27. {omniopt2-8171 → omniopt2-8174}/apt-dependencies.txt +0 -0
  28. {omniopt2-8171 → omniopt2-8174}/omniopt +0 -0
  29. {omniopt2-8171 → omniopt2-8174}/omniopt2.egg-info/SOURCES.txt +0 -0
  30. {omniopt2-8171 → omniopt2-8174}/omniopt2.egg-info/dependency_links.txt +0 -0
  31. {omniopt2-8171 → omniopt2-8174}/omniopt2.egg-info/requires.txt +0 -0
  32. {omniopt2-8171 → omniopt2-8174}/omniopt2.egg-info/top_level.txt +0 -0
  33. {omniopt2-8171 → omniopt2-8174}/omniopt_docker +0 -0
  34. {omniopt2-8171 → omniopt2-8174}/omniopt_evaluate +0 -0
  35. {omniopt2-8171 → omniopt2-8174}/omniopt_plot +0 -0
  36. {omniopt2-8171 → omniopt2-8174}/omniopt_share +0 -0
  37. {omniopt2-8171 → omniopt2-8174}/requirements.txt +0 -0
  38. {omniopt2-8171 → omniopt2-8174}/setup.cfg +0 -0
  39. {omniopt2-8171 → omniopt2-8174}/setup.py +0 -0
  40. {omniopt2-8171 → omniopt2-8174}/test_requirements.txt +0 -0
@@ -2171,38 +2171,25 @@ def save_results_csv() -> Optional[str]:
2171
2171
  if args.dryrun:
2172
2172
  return None
2173
2173
 
2174
- pd_csv = get_current_run_folder(RESULTS_CSV_FILENAME)
2175
- pd_json = get_state_file_name('pd.json')
2174
+ pd_csv, pd_json = get_results_paths()
2176
2175
 
2177
2176
  save_experiment_state()
2178
2177
 
2179
- if ax_client is None:
2178
+ if not ax_client:
2180
2179
  return None
2181
2180
 
2182
2181
  save_checkpoint()
2183
2182
 
2184
2183
  try:
2185
- ax_client.experiment.fetch_data()
2186
- pd_frame = ax_client.get_trials_data_frame()
2187
- pd_frame = merge_with_job_infos(pd_frame)
2188
- pd_frame = reindex_trials(pd_frame)
2189
-
2190
- pd_frame.to_csv(pd_csv, index=False, float_format="%.30f")
2191
-
2192
- json_snapshot = ax_client.to_json_snapshot()
2193
- with open(pd_json, "w", encoding="utf-8") as json_file:
2194
- json.dump(json_snapshot, json_file, indent=4)
2195
-
2196
- save_experiment(
2197
- ax_client.experiment,
2198
- get_state_file_name("ax_client.experiment.json")
2199
- )
2184
+ pd_frame = fetch_and_prepare_trials()
2185
+ write_csv(pd_frame, pd_csv)
2186
+ write_json_snapshot(pd_json)
2187
+ save_experiment_to_file()
2200
2188
 
2201
- if args.model not in uncontinuable_models and args.save_to_database:
2189
+ if should_save_to_database():
2202
2190
  try_saving_to_db()
2203
- else:
2204
- if args.save_to_database:
2205
- print_debug(f"Model {args.model} is an uncontinuable model, so it will not be saved to a DB")
2191
+ elif args.save_to_database:
2192
+ print_debug(f"Model {args.model} is an uncontinuable model, so it will not be saved to a DB")
2206
2193
 
2207
2194
  except (SignalUSR, SignalCONT, SignalINT) as e:
2208
2195
  raise type(e)(str(e)) from e
@@ -2211,6 +2198,32 @@ def save_results_csv() -> Optional[str]:
2211
2198
 
2212
2199
  return pd_csv
2213
2200
 
2201
+ def get_results_paths() -> tuple[str, str]:
2202
+ return (get_current_run_folder(RESULTS_CSV_FILENAME), get_state_file_name('pd.json'))
2203
+
2204
+ def fetch_and_prepare_trials() -> pd.DataFrame:
2205
+ ax_client.experiment.fetch_data()
2206
+ df = ax_client.get_trials_data_frame()
2207
+ df = merge_with_job_infos(df)
2208
+ return reindex_trials(df)
2209
+
2210
+ def write_csv(df, path: str) -> None:
2211
+ df.to_csv(path, index=False, float_format="%.30f")
2212
+
2213
+ def write_json_snapshot(path: str) -> None:
2214
+ json_snapshot = ax_client.to_json_snapshot()
2215
+ with open(path, "w", encoding="utf-8") as f:
2216
+ json.dump(json_snapshot, f, indent=4)
2217
+
2218
+ def save_experiment_to_file() -> None:
2219
+ save_experiment(
2220
+ ax_client.experiment,
2221
+ get_state_file_name("ax_client.experiment.json")
2222
+ )
2223
+
2224
+ def should_save_to_database() -> bool:
2225
+ return args.model not in uncontinuable_models and args.save_to_database
2226
+
2214
2227
  def add_to_phase_counter(phase: str, nr: int = 0, run_folder: str = "") -> int:
2215
2228
  if run_folder == "":
2216
2229
  run_folder = get_current_run_folder()
@@ -8615,7 +8628,6 @@ def create_step(model_name: str, _num_trials: int = -1, index: Optional[int] = N
8615
8628
  index=index
8616
8629
  )
8617
8630
 
8618
-
8619
8631
  def set_global_generation_strategy() -> None:
8620
8632
  with spinner("Setting global generation strategy"):
8621
8633
  continue_not_supported_on_custom_generation_strategy()
@@ -8633,7 +8645,6 @@ def set_global_generation_strategy() -> None:
8633
8645
  print_red("global_gs is None after setup!")
8634
8646
  my_exit(111)
8635
8647
 
8636
-
8637
8648
  def setup_default_generation_strategy() -> None:
8638
8649
  global generation_strategy_human_readable
8639
8650
 
@@ -8673,7 +8684,6 @@ def setup_default_generation_strategy() -> None:
8673
8684
  print_red(f"Error creating GenerationStrategy: {e}\nnames: {generation_strategy_names}\nnodes: {generation_strategy_nodes}")
8674
8685
  my_exit(111)
8675
8686
 
8676
-
8677
8687
  def add_sobol_node_if_needed(nodes: list, names: list, chosen_model: str) -> None:
8678
8688
  if random_steps >= 1:
8679
8689
  next_node_name = None
@@ -8684,7 +8694,6 @@ def add_sobol_node_if_needed(nodes: list, names: list, chosen_model: str) -> Non
8684
8694
  names.append(step_name)
8685
8695
  print_debug(f"Added SOBOL node: {step_name}")
8686
8696
 
8687
-
8688
8697
  def add_main_node_if_needed(nodes: list, names: list, chosen_model: str, remaining: int) -> None:
8689
8698
  if chosen_model != "SOBOL" and remaining > 0:
8690
8699
  node = create_node(chosen_model, remaining, None)
@@ -8693,7 +8702,6 @@ def add_main_node_if_needed(nodes: list, names: list, chosen_model: str, remaini
8693
8702
  names.append(step_name)
8694
8703
  print_debug(f"Added main node: {step_name}")
8695
8704
 
8696
-
8697
8705
  def setup_custom_generation_strategy() -> None:
8698
8706
  generation_strategy_array, new_max_eval = parse_generation_strategy_string(args.generation_strategy)
8699
8707
  new_max_eval_plus_jobs = new_max_eval + get_nr_of_imported_jobs()
@@ -8730,7 +8738,6 @@ def setup_custom_generation_strategy() -> None:
8730
8738
  print_red(f"Failed to create custom GenerationStrategy: {e}")
8731
8739
  my_exit(111)
8732
8740
 
8733
-
8734
8741
  def wait_for_jobs_or_break(_max_eval: Optional[int]) -> bool:
8735
8742
  while len(global_vars["jobs"]) > num_parallel_jobs:
8736
8743
  finish_previous_jobs([f"finishing previous jobs ({len(global_vars['jobs'])})"])
@@ -10305,7 +10312,7 @@ def run_program_once(params=None) -> None:
10305
10312
  my_exit(57)
10306
10313
 
10307
10314
  def show_omniopt_call() -> None:
10308
- def remove_ui_url(arg_str):
10315
+ def remove_ui_url(arg_str) -> str:
10309
10316
  return re.sub(r'(?:--ui_url(?:=\S+)?(?:\s+\S+)?)', '', arg_str).strip()
10310
10317
 
10311
10318
  original_argv = " ".join(sys.argv[1:])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: omniopt2
3
- Version: 8171
3
+ Version: 8174
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: 8171
3
+ Version: 8174
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 = "8171"
8
+ version = "8174"
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