Skip to content

Commit ca53af3

Browse files
committed
Fix import error
1 parent bef025e commit ca53af3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

package/samplers/user_prior_cmaes/sampler.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import math
44
from typing import Any
5+
from typing import Union
56

67
import cmaes
78
import numpy as np
@@ -12,11 +13,13 @@
1213
from optuna.distributions import IntDistribution
1314
from optuna.samplers import BaseSampler
1415
from optuna.samplers import CmaEsSampler
15-
from optuna.samplers._cmaes import CmaClass
1616
from optuna.study import StudyDirection
1717
from optuna.trial import FrozenTrial
1818

1919

20+
CmaClass = Union[cmaes.CMA, cmaes.SepCMA, cmaes.CMAwM]
21+
22+
2023
class UserPriorCmaEsSampler(CmaEsSampler):
2124
"""A sampler using `cmaes <https://github.com/CyberAgentAILab/cmaes>`__ as the backend with user prior.
2225

0 commit comments

Comments
 (0)