omniopt2 7345__tar.gz → 7347__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-7345 → omniopt2-7347}/.tpe.py +14 -7
  2. {omniopt2-7345 → omniopt2-7347}/PKG-INFO +1 -1
  3. {omniopt2-7345 → omniopt2-7347}/omniopt2.egg-info/PKG-INFO +1 -1
  4. {omniopt2-7345 → omniopt2-7347}/pyproject.toml +1 -1
  5. {omniopt2-7345 → omniopt2-7347}/.colorfunctions.sh +0 -0
  6. {omniopt2-7345 → omniopt2-7347}/.dockerignore +0 -0
  7. {omniopt2-7345 → omniopt2-7347}/.general.sh +0 -0
  8. {omniopt2-7345 → omniopt2-7347}/.gitignore +0 -0
  9. {omniopt2-7345 → omniopt2-7347}/.helpers.py +0 -0
  10. {omniopt2-7345 → omniopt2-7347}/.omniopt.py +0 -0
  11. {omniopt2-7345 → omniopt2-7347}/.omniopt_plot_cpu_ram_usage.py +0 -0
  12. {omniopt2-7345 → omniopt2-7347}/.omniopt_plot_general.py +0 -0
  13. {omniopt2-7345 → omniopt2-7347}/.omniopt_plot_gpu_usage.py +0 -0
  14. {omniopt2-7345 → omniopt2-7347}/.omniopt_plot_kde.py +0 -0
  15. {omniopt2-7345 → omniopt2-7347}/.omniopt_plot_scatter.py +0 -0
  16. {omniopt2-7345 → omniopt2-7347}/.omniopt_plot_scatter_generation_method.py +0 -0
  17. {omniopt2-7345 → omniopt2-7347}/.omniopt_plot_scatter_hex.py +0 -0
  18. {omniopt2-7345 → omniopt2-7347}/.omniopt_plot_time_and_exit_code.py +0 -0
  19. {omniopt2-7345 → omniopt2-7347}/.omniopt_plot_trial_index_result.py +0 -0
  20. {omniopt2-7345 → omniopt2-7347}/.omniopt_plot_worker.py +0 -0
  21. {omniopt2-7345 → omniopt2-7347}/.random_generator.py +0 -0
  22. {omniopt2-7345 → omniopt2-7347}/.shellscript_functions +0 -0
  23. {omniopt2-7345 → omniopt2-7347}/LICENSE +0 -0
  24. {omniopt2-7345 → omniopt2-7347}/MANIFEST.in +0 -0
  25. {omniopt2-7345 → omniopt2-7347}/README.md +0 -0
  26. {omniopt2-7345 → omniopt2-7347}/apt-dependencies.txt +0 -0
  27. {omniopt2-7345 → omniopt2-7347}/omniopt +0 -0
  28. {omniopt2-7345 → omniopt2-7347}/omniopt2.egg-info/SOURCES.txt +0 -0
  29. {omniopt2-7345 → omniopt2-7347}/omniopt2.egg-info/dependency_links.txt +0 -0
  30. {omniopt2-7345 → omniopt2-7347}/omniopt2.egg-info/requires.txt +0 -0
  31. {omniopt2-7345 → omniopt2-7347}/omniopt2.egg-info/top_level.txt +0 -0
  32. {omniopt2-7345 → omniopt2-7347}/omniopt_docker +0 -0
  33. {omniopt2-7345 → omniopt2-7347}/omniopt_evaluate +0 -0
  34. {omniopt2-7345 → omniopt2-7347}/omniopt_plot +0 -0
  35. {omniopt2-7345 → omniopt2-7347}/omniopt_share +0 -0
  36. {omniopt2-7345 → omniopt2-7347}/requirements.txt +0 -0
  37. {omniopt2-7345 → omniopt2-7347}/setup.cfg +0 -0
  38. {omniopt2-7345 → omniopt2-7347}/setup.py +0 -0
  39. {omniopt2-7345 → omniopt2-7347}/test_requirements.txt +0 -0
@@ -6,6 +6,12 @@ from typing import Optional
6
6
  try:
7
7
  import optuna
8
8
  from optuna.trial import create_trial
9
+
10
+ from optuna.distributions import (
11
+ BaseDistribution,
12
+ IntUniformDistribution,
13
+ FloatDistribution, # Optuna ≥3.6
14
+ )
9
15
  except ModuleNotFoundError:
10
16
  print("Optuna not found. Cannot continue.")
11
17
  sys.exit(1)
@@ -121,8 +127,8 @@ def add_existing_trial_to_study(study: optuna.study.study.Study, trial_entry: li
121
127
 
122
128
  final_value = result_dict[result_key]
123
129
 
124
- trial_params = {}
125
- trial_distributions = {}
130
+ trial_params: dict[str, object] = {}
131
+ trial_distributions: dict[str, BaseDistribution] = {} # 👈 explicit & correct
126
132
 
127
133
  for name, p in parameters.items():
128
134
  value = param_dict[name]
@@ -131,26 +137,27 @@ def add_existing_trial_to_study(study: optuna.study.study.Study, trial_entry: li
131
137
  trial_params[name] = value
132
138
  continue
133
139
 
140
+ dist: BaseDistribution
134
141
  if p["parameter_type"] == "RANGE":
135
142
  if p["type"] == "INT":
136
- dist = optuna.distributions.IntUniformDistribution(p["range"][0], p["range"][1])
143
+ dist = IntUniformDistribution(p["range"][0], p["range"][1])
137
144
  elif p["type"] == "FLOAT":
138
- dist = optuna.distributions.UniformDistribution(p["range"][0], p["range"][1])
145
+ # pick the right class for your Optuna version
146
+ dist = FloatDistribution(p["range"][0], p["range"][1])
139
147
  else:
140
148
  continue
141
-
142
149
  elif p["parameter_type"] == "CHOICE":
143
150
  dist = optuna.distributions.CategoricalDistribution(p["values"])
144
151
  else:
145
152
  continue
146
153
 
147
154
  trial_params[name] = value
148
- trial_distributions[name] = dist
155
+ trial_distributions[name] = dist # keys are str, values are BaseDistribution
149
156
 
150
157
  study.add_trial(
151
158
  create_trial(
152
159
  params=trial_params,
153
- distributions=trial_distributions,
160
+ distributions=trial_distributions, # ✅ mypy is happy now
154
161
  value=final_value
155
162
  )
156
163
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: omniopt2
3
- Version: 7345
3
+ Version: 7347
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: 7345
3
+ Version: 7347
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 = "7345"
8
+ version = "7347"
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