omniopt2 8495__tar.gz → 8506__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-8495 → omniopt2-8506}/.gitignore +1 -0
  2. {omniopt2-8495 → omniopt2-8506}/.omniopt.py +21 -23
  3. {omniopt2-8495 → omniopt2-8506}/PKG-INFO +1 -1
  4. {omniopt2-8495 → omniopt2-8506}/omniopt +16 -4
  5. {omniopt2-8495 → omniopt2-8506}/omniopt2.egg-info/PKG-INFO +1 -1
  6. {omniopt2-8495 → omniopt2-8506}/pyproject.toml +1 -1
  7. {omniopt2-8495 → omniopt2-8506}/.colorfunctions.sh +0 -0
  8. {omniopt2-8495 → omniopt2-8506}/.dockerignore +0 -0
  9. {omniopt2-8495 → omniopt2-8506}/.general.sh +0 -0
  10. {omniopt2-8495 → omniopt2-8506}/.helpers.py +0 -0
  11. {omniopt2-8495 → omniopt2-8506}/.omniopt_plot_cpu_ram_usage.py +0 -0
  12. {omniopt2-8495 → omniopt2-8506}/.omniopt_plot_general.py +0 -0
  13. {omniopt2-8495 → omniopt2-8506}/.omniopt_plot_gpu_usage.py +0 -0
  14. {omniopt2-8495 → omniopt2-8506}/.omniopt_plot_kde.py +0 -0
  15. {omniopt2-8495 → omniopt2-8506}/.omniopt_plot_scatter.py +0 -0
  16. {omniopt2-8495 → omniopt2-8506}/.omniopt_plot_scatter_generation_method.py +0 -0
  17. {omniopt2-8495 → omniopt2-8506}/.omniopt_plot_scatter_hex.py +0 -0
  18. {omniopt2-8495 → omniopt2-8506}/.omniopt_plot_time_and_exit_code.py +0 -0
  19. {omniopt2-8495 → omniopt2-8506}/.omniopt_plot_trial_index_result.py +0 -0
  20. {omniopt2-8495 → omniopt2-8506}/.omniopt_plot_worker.py +0 -0
  21. {omniopt2-8495 → omniopt2-8506}/.random_generator.py +0 -0
  22. {omniopt2-8495 → omniopt2-8506}/.shellscript_functions +0 -0
  23. {omniopt2-8495 → omniopt2-8506}/.tests/pylint.rc +0 -0
  24. {omniopt2-8495 → omniopt2-8506}/.tpe.py +0 -0
  25. {omniopt2-8495 → omniopt2-8506}/LICENSE +0 -0
  26. {omniopt2-8495 → omniopt2-8506}/MANIFEST.in +0 -0
  27. {omniopt2-8495 → omniopt2-8506}/README.md +0 -0
  28. {omniopt2-8495 → omniopt2-8506}/apt-dependencies.txt +0 -0
  29. {omniopt2-8495 → omniopt2-8506}/omniopt2.egg-info/SOURCES.txt +0 -0
  30. {omniopt2-8495 → omniopt2-8506}/omniopt2.egg-info/dependency_links.txt +0 -0
  31. {omniopt2-8495 → omniopt2-8506}/omniopt2.egg-info/requires.txt +0 -0
  32. {omniopt2-8495 → omniopt2-8506}/omniopt2.egg-info/top_level.txt +0 -0
  33. {omniopt2-8495 → omniopt2-8506}/omniopt_docker +0 -0
  34. {omniopt2-8495 → omniopt2-8506}/omniopt_evaluate +0 -0
  35. {omniopt2-8495 → omniopt2-8506}/omniopt_plot +0 -0
  36. {omniopt2-8495 → omniopt2-8506}/omniopt_share +0 -0
  37. {omniopt2-8495 → omniopt2-8506}/requirements.txt +0 -0
  38. {omniopt2-8495 → omniopt2-8506}/setup.cfg +0 -0
  39. {omniopt2-8495 → omniopt2-8506}/setup.py +0 -0
  40. {omniopt2-8495 → omniopt2-8506}/test_requirements.txt +0 -0
@@ -216,3 +216,4 @@ start_baseline_jobs.sh
216
216
  data/
217
217
  places365_data/
218
218
  .tests/mnist/.torch_venv_*
219
+ *.bin
@@ -822,6 +822,7 @@ class ConfigLoader:
822
822
  run_program_once: str
823
823
  mem_gb: int
824
824
  flame_graph: bool
825
+ memray: bool
825
826
  continue_previous_job: Optional[str]
826
827
  calculate_pareto_front_of_job: Optional[List[str]]
827
828
  revert_to_random_when_seemingly_exhausted: bool
@@ -983,6 +984,7 @@ class ConfigLoader:
983
984
  debug.add_argument('--verbose_break_run_search_table', help='Verbose logging for break_run_search', action='store_true', default=False)
984
985
  debug.add_argument('--debug', help='Enable debugging', action='store_true', default=False)
985
986
  debug.add_argument('--flame_graph', help='Enable flame-graphing. Makes everything slower, but creates a flame graph', action='store_true', default=False)
987
+ debug.add_argument('--memray', help='Use memray to show memory usage', action='store_true', default=False)
986
988
  debug.add_argument('--no_sleep', help='Disables sleeping for fast job generation (not to be used on HPC)', action='store_true', default=False)
987
989
  debug.add_argument('--tests', help='Run simple internal tests', action='store_true', default=False)
988
990
  debug.add_argument('--show_worker_percentage_table_at_end', help='Show a table of percentage of usage of max worker over time', action='store_true', default=False)
@@ -7270,9 +7272,6 @@ def finish_previous_jobs(new_msgs: List[str] = []) -> None:
7270
7272
 
7271
7273
  jobs_copy = global_vars["jobs"][:]
7272
7274
 
7273
- if len(jobs_copy) > 0:
7274
- print_debug(f"jobs in finish_previous_jobs: {jobs_copy}")
7275
-
7276
7275
  finishing_jobs_start_time = time.time()
7277
7276
 
7278
7277
  with ThreadPoolExecutor() as finish_job_executor:
@@ -7863,32 +7862,32 @@ def get_batched_arms(nr_of_jobs_to_get: int) -> list:
7863
7862
  print_red("get_batched_arms: ax_client was None")
7864
7863
  return []
7865
7864
 
7866
- # Experiment-Status laden
7867
7865
  load_experiment_state()
7868
7866
 
7869
- while len(batched_arms) != nr_of_jobs_to_get:
7867
+ while len(batched_arms) < nr_of_jobs_to_get:
7870
7868
  if attempts > args.max_attempts_for_generation:
7871
7869
  print_debug(f"get_batched_arms: Stopped after {attempts} attempts: could not generate enough arms "
7872
7870
  f"(got {len(batched_arms)} out of {nr_of_jobs_to_get}).")
7873
7871
  break
7874
7872
 
7875
- remaining = nr_of_jobs_to_get - len(batched_arms)
7876
- print_debug(f"get_batched_arms: Attempt {attempts + 1}: requesting {remaining} more arm(s).")
7873
+ print_debug(f"get_batched_arms: Attempt {attempts + 1}: requesting 1 more arm")
7877
7874
 
7878
- print_debug("get pending observations")
7879
7875
  t0 = time.time()
7880
7876
  pending_observations = get_pending_observation_features(experiment=ax_client.experiment)
7881
7877
  dt = time.time() - t0
7882
- print_debug(f"got pending observations: {pending_observations} (took {dt:.2f} seconds)")
7883
-
7884
- print_debug("getting global_gs.gen()")
7885
- print_debug(f"ax_client.experiment: {ax_client.experiment}")
7886
- batched_generator_run = global_gs.gen(
7887
- experiment=ax_client.experiment,
7888
- n=remaining,
7889
- pending_observations=pending_observations
7890
- )
7891
- print_debug(f"got global_gs.gen(): {batched_generator_run}")
7878
+ print_debug(f"got pending observations (took {dt:.2f} seconds)")
7879
+
7880
+ try:
7881
+ print_debug("getting global_gs.gen() with n=1")
7882
+ batched_generator_run = global_gs.gen(
7883
+ experiment=ax_client.experiment,
7884
+ n=1,
7885
+ pending_observations=pending_observations,
7886
+ )
7887
+ print_debug(f"got global_gs.gen(): {batched_generator_run}")
7888
+ except Exception as e:
7889
+ print_debug(f"global_gs.gen failed: {e}")
7890
+ break
7892
7891
 
7893
7892
  depth = 0
7894
7893
  path = "batched_generator_run"
@@ -7900,15 +7899,13 @@ def get_batched_arms(nr_of_jobs_to_get: int) -> list:
7900
7899
 
7901
7900
  print_debug(f"Final flat object at depth {depth}, path {path}: {batched_generator_run} (type {type(batched_generator_run).__name__})")
7902
7901
 
7903
- print_debug("got new arms")
7904
- new_arms = batched_generator_run.arms
7905
- print_debug(f"new_arms: {new_arms}")
7902
+ new_arms = getattr(batched_generator_run, "arms", [])
7906
7903
  if not new_arms:
7907
7904
  print_debug("get_batched_arms: No new arms were generated in this attempt.")
7908
7905
  else:
7909
- print_debug(f"get_batched_arms: Generated {len(new_arms)} new arm(s), wanted {nr_of_jobs_to_get}.")
7906
+ print_debug(f"get_batched_arms: Generated {len(new_arms)} new arm(s), now at {len(batched_arms) + len(new_arms)} of {nr_of_jobs_to_get}.")
7907
+ batched_arms.extend(new_arms)
7910
7908
 
7911
- batched_arms.extend(new_arms)
7912
7909
  attempts += 1
7913
7910
 
7914
7911
  print_debug(f"get_batched_arms: Finished with {len(batched_arms)} arm(s) after {attempts} attempt(s).")
@@ -11182,6 +11179,7 @@ def main_outside() -> None:
11182
11179
 
11183
11180
  fool_linter(args.num_cpus_main_job)
11184
11181
  fool_linter(args.flame_graph)
11182
+ fool_linter(args.memray)
11185
11183
 
11186
11184
  with warnings.catch_warnings():
11187
11185
  warnings.simplefilter("ignore")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: omniopt2
3
- Version: 8495
3
+ Version: 8506
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
@@ -1016,6 +1016,10 @@ $complex_options_str
1016
1016
  args_string+=" --help "
1017
1017
  ;;
1018
1018
 
1019
+ --memray)
1020
+ export RUN_WITH_MEMRAY=1
1021
+ ;;
1022
+
1019
1023
  --flame_graph)
1020
1024
  export RUN_WITH_PYSPY=1
1021
1025
  ;;
@@ -1639,14 +1643,22 @@ EOF
1639
1643
  fi
1640
1644
 
1641
1645
  if [[ -z $RUN_WITH_COVERAGE ]]; then
1642
- if [[ -z $RUN_WITH_PYSPY ]]; then
1643
- stdbuf -e 0 -o 0 python3 "$SCRIPT_DIR/.omniopt.py" $args_string
1644
- EXIT_CODE=$?
1645
- else
1646
+ if [[ -n $RUN_WITH_PYSPY ]]; then
1646
1647
  echo "Starting OmniOpt with Py-Spy"
1647
1648
  pip install py-spy
1648
1649
  stdbuf -e 0 -o 0 py-spy record --rate 10 --subprocesses --native --output "$RUN_UUID.svg" python3 -- "$SCRIPT_DIR/.omniopt.py" $args_string
1649
1650
  EXIT_CODE=$?
1651
+ elif [[ -n $RUN_WITH_MEMRAY ]]; then
1652
+ echo "Starting OmniOpt with MemRay."
1653
+ echo "Check later on with 'memray flamegraph $RUN_UUID.bin'"
1654
+ export PYTORCH_NO_CUDA_MEMORY_CACHING=1
1655
+ export PYTHONFAULTHANDLER=1
1656
+ pip install memray
1657
+ stdbuf -e 0 -o 0 memray run -o "$RUN_UUID.bin" -- "$SCRIPT_DIR/.omniopt.py" $args_string
1658
+ EXIT_CODE=$?
1659
+ else
1660
+ stdbuf -e 0 -o 0 python3 "$SCRIPT_DIR/.omniopt.py" $args_string
1661
+ EXIT_CODE=$?
1650
1662
  fi
1651
1663
  else
1652
1664
  echo "Using coverage run -p because \$RUN_WITH_COVERAGE is set"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: omniopt2
3
- Version: 8495
3
+ Version: 8506
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 = "8495"
8
+ version = "8506"
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