omniopt2 7298__tar.gz → 7309__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-7298 → omniopt2-7309}/.omniopt.py +20 -8
  2. {omniopt2-7298 → omniopt2-7309}/PKG-INFO +2 -1
  3. {omniopt2-7298 → omniopt2-7309}/omniopt2.egg-info/PKG-INFO +2 -1
  4. {omniopt2-7298 → omniopt2-7309}/omniopt2.egg-info/requires.txt +1 -0
  5. {omniopt2-7298 → omniopt2-7309}/pyproject.toml +1 -1
  6. {omniopt2-7298 → omniopt2-7309}/requirements.txt +1 -0
  7. {omniopt2-7298 → omniopt2-7309}/.colorfunctions.sh +0 -0
  8. {omniopt2-7298 → omniopt2-7309}/.dockerignore +0 -0
  9. {omniopt2-7298 → omniopt2-7309}/.general.sh +0 -0
  10. {omniopt2-7298 → omniopt2-7309}/.gitignore +0 -0
  11. {omniopt2-7298 → omniopt2-7309}/.helpers.py +0 -0
  12. {omniopt2-7298 → omniopt2-7309}/.omniopt_plot_cpu_ram_usage.py +0 -0
  13. {omniopt2-7298 → omniopt2-7309}/.omniopt_plot_general.py +0 -0
  14. {omniopt2-7298 → omniopt2-7309}/.omniopt_plot_gpu_usage.py +0 -0
  15. {omniopt2-7298 → omniopt2-7309}/.omniopt_plot_kde.py +0 -0
  16. {omniopt2-7298 → omniopt2-7309}/.omniopt_plot_scatter.py +0 -0
  17. {omniopt2-7298 → omniopt2-7309}/.omniopt_plot_scatter_generation_method.py +0 -0
  18. {omniopt2-7298 → omniopt2-7309}/.omniopt_plot_scatter_hex.py +0 -0
  19. {omniopt2-7298 → omniopt2-7309}/.omniopt_plot_time_and_exit_code.py +0 -0
  20. {omniopt2-7298 → omniopt2-7309}/.omniopt_plot_trial_index_result.py +0 -0
  21. {omniopt2-7298 → omniopt2-7309}/.omniopt_plot_worker.py +0 -0
  22. {omniopt2-7298 → omniopt2-7309}/.random_generator.py +0 -0
  23. {omniopt2-7298 → omniopt2-7309}/.shellscript_functions +0 -0
  24. {omniopt2-7298 → omniopt2-7309}/.tpe.py +0 -0
  25. {omniopt2-7298 → omniopt2-7309}/LICENSE +0 -0
  26. {omniopt2-7298 → omniopt2-7309}/MANIFEST.in +0 -0
  27. {omniopt2-7298 → omniopt2-7309}/README.md +0 -0
  28. {omniopt2-7298 → omniopt2-7309}/apt-dependencies.txt +0 -0
  29. {omniopt2-7298 → omniopt2-7309}/omniopt +0 -0
  30. {omniopt2-7298 → omniopt2-7309}/omniopt2.egg-info/SOURCES.txt +0 -0
  31. {omniopt2-7298 → omniopt2-7309}/omniopt2.egg-info/dependency_links.txt +0 -0
  32. {omniopt2-7298 → omniopt2-7309}/omniopt2.egg-info/top_level.txt +0 -0
  33. {omniopt2-7298 → omniopt2-7309}/omniopt_docker +0 -0
  34. {omniopt2-7298 → omniopt2-7309}/omniopt_evaluate +0 -0
  35. {omniopt2-7298 → omniopt2-7309}/omniopt_plot +0 -0
  36. {omniopt2-7298 → omniopt2-7309}/omniopt_share +0 -0
  37. {omniopt2-7298 → omniopt2-7309}/setup.cfg +0 -0
  38. {omniopt2-7298 → omniopt2-7309}/setup.py +0 -0
  39. {omniopt2-7298 → omniopt2-7309}/test_requirements.txt +0 -0
@@ -603,6 +603,7 @@ class ConfigLoader:
603
603
  config_json: Optional[str]
604
604
  config_yaml: Optional[str]
605
605
  workdir: str
606
+ db_url: Optional[str]
606
607
  dont_jit_compile: bool
607
608
  no_normalize_y: bool
608
609
  transforms: List[str]
@@ -693,6 +694,7 @@ class ConfigLoader:
693
694
  optional.add_argument('--max_abandoned_retrial', help='Maximum number retrials to get when a job is abandoned post-generation', default=20, type=int)
694
695
  optional.add_argument('--share_password', help='Use this as a password for share. Default is none.', default=None, type=str)
695
696
  optional.add_argument('--dryrun', help='Try to do a dry run, i.e. a run for very short running jobs to test the installation of OmniOpt2 and check if environment stuff and paths and so on works properly', action='store_true', default=False)
697
+ optional.add_argument('--db_url', type=str, default=None, help='Database URL (e.g., mysql+pymysql://user:pass@host/db), disables sqlite3 storage')
696
698
 
697
699
  speed.add_argument('--dont_warm_start_refitting', help='Do not keep Model weights, thus, refit for every generator (may be more accurate, but slower)', action='store_true', default=False)
698
700
  speed.add_argument('--refit_on_cv', help='Refit on Cross-Validation (helps in accuracy, but makes generating new points slower)', action='store_true', default=False)
@@ -1819,13 +1821,27 @@ def compute_md5_hash(filepath: str) -> Optional[str]:
1819
1821
 
1820
1822
  @beartype
1821
1823
  def init_storage(db_url: str):
1824
+ init_engine_and_session_factory(url=db_url, force_init=True)
1825
+ engine = get_engine()
1826
+ create_all_tables(engine)
1827
+
1828
+ @beartype
1829
+ def try_saving_to_db() -> None:
1822
1830
  global initialized_storage
1823
1831
 
1832
+ db_url = f"sqlite:////{get_current_run_folder()}/database.db"
1833
+
1834
+ if args.db_url:
1835
+ db_url = args.db_url
1836
+
1824
1837
  if not initialized_storage:
1838
+ init_storage(db_url)
1839
+
1825
1840
  initialized_storage = True
1826
- init_engine_and_session_factory(url=db_url)
1827
- engine = get_engine()
1828
- create_all_tables(engine)
1841
+
1842
+ save_experiment_to_db(ax_client.experiment)
1843
+ save_generation_strategy(global_gs)
1844
+
1829
1845
 
1830
1846
  @beartype
1831
1847
  def save_results_csv() -> Optional[str]:
@@ -1851,16 +1867,12 @@ def save_results_csv() -> Optional[str]:
1851
1867
  with open(pd_json, mode='w', encoding="utf-8") as json_file:
1852
1868
  json.dump(json_snapshot, json_file, indent=4)
1853
1869
 
1854
- url = f"sqlite:////{get_current_run_folder()}/database.db"
1855
- init_storage(url)
1856
-
1857
1870
  save_experiment(
1858
1871
  ax_client.experiment,
1859
1872
  f"{get_current_run_folder()}/state_files/ax_client.experiment.json"
1860
1873
  )
1861
1874
 
1862
- save_experiment_to_db(ax_client.experiment)
1863
- save_generation_strategy(global_gs)
1875
+ try_saving_to_db()
1864
1876
  except SignalUSR as e:
1865
1877
  raise SignalUSR(str(e)) from e
1866
1878
  except SignalCONT as e:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: omniopt2
3
- Version: 7298
3
+ Version: 7309
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
@@ -8,6 +8,7 @@ Author-email: norman.koch@tu-dresden.de
8
8
  Platform: Linux
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE
11
+ Requires-Dist: pymysql
11
12
  Requires-Dist: sqlalchemy
12
13
  Requires-Dist: setuptools
13
14
  Requires-Dist: wheel
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: omniopt2
3
- Version: 7298
3
+ Version: 7309
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
@@ -8,6 +8,7 @@ Author-email: norman.koch@tu-dresden.de
8
8
  Platform: Linux
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE
11
+ Requires-Dist: pymysql
11
12
  Requires-Dist: sqlalchemy
12
13
  Requires-Dist: setuptools
13
14
  Requires-Dist: wheel
@@ -1,3 +1,4 @@
1
+ pymysql
1
2
  sqlalchemy
2
3
  setuptools
3
4
  wheel
@@ -5,7 +5,7 @@ authors = [
5
5
  {email = "norman.koch@tu-dresden.de"},
6
6
  {name = "Norman Koch"}
7
7
  ]
8
- version = "7298"
8
+ version = "7309"
9
9
 
10
10
  readme = "README.md"
11
11
  dynamic = ["dependencies"]
@@ -1,3 +1,4 @@
1
+ pymysql
1
2
  sqlalchemy
2
3
  setuptools
3
4
  wheel
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