move utilities into a utilities submodule

This commit is contained in:
Connor Olding 2023-05-07 06:28:46 -07:00
parent 49b1f27c8a
commit 9de5493e96
11 changed files with 18 additions and 17 deletions

View file

@ -1,6 +1,6 @@
from dlib import find_min_global
from .random import another_random_cube
from ..utils import wrap_untrustworthy, final
from ..utilities 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 ..utilities 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 ..utilities import wrap_untrustworthy, final
import numpy as np

View file

@ -1,5 +1,5 @@
from .. import tinytweaks as tt
from ..utils import wrap_untrustworthy, check, final
from ..utilities import wrap_untrustworthy, check, final
import numpy as np

View file

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

View file

@ -1,4 +1,4 @@
from ..utils import wrap_untrustworthy, check, final, ExhaustedTrialsError
from ..utilities import wrap_untrustworthy, check, final, ExhaustedTrialsError
import numpy as np
import scipy.optimize as scopt

View file

@ -1,9 +1,8 @@
from .go_benchmark_lists import *
from .go_benchmarks import problems_2d, problems_3d, problems_4d
from .notwacube import book_of_optimizers
from .prog80 import prog
from .utils import OWrap, COWrap, m1, m33, m36
from .utils import perform_another_experimental_scoring_method
from .utilities import OWrap, COWrap, m1, m33, m36, prog
from .utilities import perform_another_experimental_scoring_method
import numpy as np
all_problems = {

View file

@ -0,0 +1,10 @@
from .utils import *
try:
import numpy
except ModuleNotFoundError:
pass
else:
from .utils_np import *
from .prog80 import prog

View file

@ -265,11 +265,3 @@ def merge_summaries(all_summaries):
new_summaries[new_key] = value
break
return new_summaries
try:
import numpy
except ModuleNotFoundError:
pass
else:
from .utils_np import *