mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-11 12:30:25 +08:00
Fix overflow
This commit is contained in:
@@ -404,7 +404,7 @@ class PreferentialGPSampler(optuna.samplers.BaseSampler):
|
||||
is_all_discrete = all(
|
||||
len(possible_params) > 0 for possible_params in all_possible_params.values()
|
||||
)
|
||||
search_space_size = np.prod(
|
||||
search_space_size = math.prod( # Don't use np.prod to avoid overflow
|
||||
[len(possible_params) for possible_params in all_possible_params.values()]
|
||||
)
|
||||
# TODO(contramundum53): Fix this arbitrarily chosen limit.
|
||||
|
||||
Reference in New Issue
Block a user