diff --git a/thursday/dlibcube2.py b/thursday/candidates/dlibcube2.py similarity index 92% rename from thursday/dlibcube2.py rename to thursday/candidates/dlibcube2.py index c233600..e0e6e36 100644 --- a/thursday/dlibcube2.py +++ b/thursday/candidates/dlibcube2.py @@ -1,6 +1,6 @@ from dlib import find_min_global from .randomcube2 import another_random_cube -from .utils import wrap_untrustworthy, final +from ..utils import wrap_untrustworthy, final def dlib_cube(objective, n_trials, n_dim, with_count): diff --git a/thursday/evolopycube2.py b/thursday/candidates/evolopycube2.py similarity index 96% rename from thursday/evolopycube2.py rename to thursday/candidates/evolopycube2.py index 8e8abe3..96c6d9e 100644 --- a/thursday/evolopycube2.py +++ b/thursday/candidates/evolopycube2.py @@ -1,4 +1,4 @@ -from .utils import wrap_untrustworthy, final, ExhaustedTrialsError +from ..utils import wrap_untrustworthy, final, ExhaustedTrialsError import numpy as np diff --git a/thursday/fcmaescube2.py b/thursday/candidates/fcmaescube2.py similarity index 99% rename from thursday/fcmaescube2.py rename to thursday/candidates/fcmaescube2.py index f576ac6..d9bca5f 100644 --- a/thursday/fcmaescube2.py +++ b/thursday/candidates/fcmaescube2.py @@ -1,6 +1,6 @@ from scipy.optimize import Bounds from unittest.mock import patch -from .utils import wrap_untrustworthy, final +from ..utils import wrap_untrustworthy, final import numpy as np diff --git a/thursday/nevergradcube2.py b/thursday/candidates/nevergradcube2.py similarity index 100% rename from thursday/nevergradcube2.py rename to thursday/candidates/nevergradcube2.py diff --git a/thursday/nloptcube2.py b/thursday/candidates/nloptcube2.py similarity index 100% rename from thursday/nloptcube2.py rename to thursday/candidates/nloptcube2.py diff --git a/thursday/notwacube2.py b/thursday/candidates/notwacube2.py similarity index 94% rename from thursday/notwacube2.py rename to thursday/candidates/notwacube2.py index c47dd09..fc7bf69 100644 --- a/thursday/notwacube2.py +++ b/thursday/candidates/notwacube2.py @@ -1,10 +1,10 @@ -from .utils import wrap_untrustworthy, check, final +from .. import tinytweaks as tt +from ..utils import wrap_untrustworthy, check, final import numpy as np -from . import tinytweaks as tt def make_birect(deepness=23, *, longest=False, pruning=False): - from .birect import birect + from ..birect import birect def f(objective, n_trials, n_dim, with_count): feval_count = 0 @@ -37,7 +37,7 @@ def make_soo(deepness=None, *, K=3): if deepness is None: deepness = int(31 * np.log(2) / np.log(K) - 1e-8) assert K >= 2 - from .soo import soo + from ..soo import soo def f(objective, n_trials, n_dim, with_count): feval_count = 0 @@ -61,7 +61,7 @@ def make_soo(deepness=None, *, K=3): def make_mercury( flags, bounding="clip", *, isigma=tt.IV, popsize=2, irate=1, seed=None ): - from .hg import minimize as hg + from ..hg import minimize as hg def f(objective, n_trials, n_dim, with_count): _objective = wrap_untrustworthy(objective, n_trials, bounding=bounding) diff --git a/thursday/randomcube2.py b/thursday/candidates/randomcube2.py similarity index 97% rename from thursday/randomcube2.py rename to thursday/candidates/randomcube2.py index d9de008..8344810 100644 --- a/thursday/randomcube2.py +++ b/thursday/candidates/randomcube2.py @@ -1,4 +1,4 @@ -from .utils import phi +from ..utils import phi import numpy as np diff --git a/thursday/scipycube2.py b/thursday/candidates/scipycube2.py similarity index 99% rename from thursday/scipycube2.py rename to thursday/candidates/scipycube2.py index 617e99c..3e46dac 100644 --- a/thursday/scipycube2.py +++ b/thursday/candidates/scipycube2.py @@ -1,4 +1,4 @@ -from .utils import wrap_untrustworthy, check, final, ExhaustedTrialsError +from ..utils import wrap_untrustworthy, check, final, ExhaustedTrialsError import numpy as np import scipy.optimize as scopt diff --git a/thursday/notwacube.py b/thursday/notwacube.py index b5bafa7..a38b1db 100644 --- a/thursday/notwacube.py +++ b/thursday/notwacube.py @@ -1,8 +1,8 @@ -from .dlibcube2 import dlib_cube -from .evolopycube2 import make_evolopy -from .nevergradcube2 import NEVERGRAD2_OPTIMIZERS -from .nloptcube2 import nlopt_neldermead_cube -from .fcmaescube2 import ( +from .candidates.dlibcube2 import dlib_cube +from .candidates.evolopycube2 import make_evolopy +from .candidates.nevergradcube2 import NEVERGRAD2_OPTIMIZERS +from .candidates.nloptcube2 import nlopt_neldermead_cube +from .candidates.fcmaescube2 import ( make_biteopt, make_csma, make_fcmaes, @@ -12,9 +12,9 @@ from .fcmaescube2 import ( make_gclde, make_lclde, ) -from .notwacube2 import make_birect, make_mercury, make_soo -from .randomcube2 import another_random_cube, quasirandom_cube -from .scipycube2 import ( +from .candidates.notwacube2 import make_birect, make_mercury, make_soo +from .candidates.randomcube2 import another_random_cube, quasirandom_cube +from .candidates.scipycube2 import ( make_shgo, scipy_basinhopping_cube, scipy_bfgs_2j_cube,