move cube2 files into candidates submodule

This commit is contained in:
Connor Olding 2023-05-07 05:41:59 -07:00
parent bda6b7f492
commit ccbab1573c
9 changed files with 18 additions and 18 deletions

View file

@ -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):

View file

@ -1,4 +1,4 @@
from .utils import wrap_untrustworthy, final, ExhaustedTrialsError
from ..utils import wrap_untrustworthy, final, ExhaustedTrialsError
import numpy as np

View file

@ -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

View file

@ -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)

View file

@ -1,4 +1,4 @@
from .utils import phi
from ..utils import phi
import numpy as np

View file

@ -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

View file

@ -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,