omniopt2 7345__tar.gz → 7348__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-7348}/.omniopt.py +2 -4
  2. {omniopt2-7345 → omniopt2-7348}/.tpe.py +14 -7
  3. {omniopt2-7345 → omniopt2-7348}/PKG-INFO +1 -1
  4. {omniopt2-7345 → omniopt2-7348}/omniopt2.egg-info/PKG-INFO +1 -1
  5. {omniopt2-7345 → omniopt2-7348}/pyproject.toml +1 -1
  6. {omniopt2-7345 → omniopt2-7348}/.colorfunctions.sh +0 -0
  7. {omniopt2-7345 → omniopt2-7348}/.dockerignore +0 -0
  8. {omniopt2-7345 → omniopt2-7348}/.general.sh +0 -0
  9. {omniopt2-7345 → omniopt2-7348}/.gitignore +0 -0
  10. {omniopt2-7345 → omniopt2-7348}/.helpers.py +0 -0
  11. {omniopt2-7345 → omniopt2-7348}/.omniopt_plot_cpu_ram_usage.py +0 -0
  12. {omniopt2-7345 → omniopt2-7348}/.omniopt_plot_general.py +0 -0
  13. {omniopt2-7345 → omniopt2-7348}/.omniopt_plot_gpu_usage.py +0 -0
  14. {omniopt2-7345 → omniopt2-7348}/.omniopt_plot_kde.py +0 -0
  15. {omniopt2-7345 → omniopt2-7348}/.omniopt_plot_scatter.py +0 -0
  16. {omniopt2-7345 → omniopt2-7348}/.omniopt_plot_scatter_generation_method.py +0 -0
  17. {omniopt2-7345 → omniopt2-7348}/.omniopt_plot_scatter_hex.py +0 -0
  18. {omniopt2-7345 → omniopt2-7348}/.omniopt_plot_time_and_exit_code.py +0 -0
  19. {omniopt2-7345 → omniopt2-7348}/.omniopt_plot_trial_index_result.py +0 -0
  20. {omniopt2-7345 → omniopt2-7348}/.omniopt_plot_worker.py +0 -0
  21. {omniopt2-7345 → omniopt2-7348}/.random_generator.py +0 -0
  22. {omniopt2-7345 → omniopt2-7348}/.shellscript_functions +0 -0
  23. {omniopt2-7345 → omniopt2-7348}/LICENSE +0 -0
  24. {omniopt2-7345 → omniopt2-7348}/MANIFEST.in +0 -0
  25. {omniopt2-7345 → omniopt2-7348}/README.md +0 -0
  26. {omniopt2-7345 → omniopt2-7348}/apt-dependencies.txt +0 -0
  27. {omniopt2-7345 → omniopt2-7348}/omniopt +0 -0
  28. {omniopt2-7345 → omniopt2-7348}/omniopt2.egg-info/SOURCES.txt +0 -0
  29. {omniopt2-7345 → omniopt2-7348}/omniopt2.egg-info/dependency_links.txt +0 -0
  30. {omniopt2-7345 → omniopt2-7348}/omniopt2.egg-info/requires.txt +0 -0
  31. {omniopt2-7345 → omniopt2-7348}/omniopt2.egg-info/top_level.txt +0 -0
  32. {omniopt2-7345 → omniopt2-7348}/omniopt_docker +0 -0
  33. {omniopt2-7345 → omniopt2-7348}/omniopt_evaluate +0 -0
  34. {omniopt2-7345 → omniopt2-7348}/omniopt_plot +0 -0
  35. {omniopt2-7345 → omniopt2-7348}/omniopt_share +0 -0
  36. {omniopt2-7345 → omniopt2-7348}/requirements.txt +0 -0
  37. {omniopt2-7345 → omniopt2-7348}/setup.cfg +0 -0
  38. {omniopt2-7345 → omniopt2-7348}/setup.py +0 -0
  39. {omniopt2-7345 → omniopt2-7348}/test_requirements.txt +0 -0
@@ -3692,10 +3692,8 @@ def _write_job_infos_csv_result_to_strlist(result: Optional[Union[Dict[str, Opti
3692
3692
  for rkey in result:
3693
3693
  result_values.append(str(rkey))
3694
3694
  elif isinstance(result, dict):
3695
- result_keys = list(result.keys())
3696
- for rkey in result_keys:
3697
- rval = str(result[str(rkey)])
3698
- result_values.append(rval)
3695
+ for _rkey, rval in result.items(): # type: str, Optional[float]
3696
+ result_values.append(str(rval))
3699
3697
  elif result is not None: # int or float
3700
3698
  result_values.append(str(result))
3701
3699
 
@@ -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: 7348
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: 7348
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 = "7348"
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