diff --git a/CADETMatch.pyproj b/CADETMatch.pyproj index 9516585..3bcf5ff 100644 --- a/CADETMatch.pyproj +++ b/CADETMatch.pyproj @@ -60,7 +60,6 @@ - diff --git a/CADETMatch/cache.py b/CADETMatch/cache.py index e7e068b..fe55ebf 100644 --- a/CADETMatch/cache.py +++ b/CADETMatch/cache.py @@ -8,7 +8,6 @@ import jstyleson import numpy from cadet import Cadet -from deap import tools from sklearn import preprocessing import CADETMatch.plugins as plugins diff --git a/CADETMatch/evo.py b/CADETMatch/evo.py index 47c720c..5fd3f90 100644 --- a/CADETMatch/evo.py +++ b/CADETMatch/evo.py @@ -3,7 +3,6 @@ import numpy from cadet import Cadet -from deap import creator, tools import CADETMatch.cache as cache import CADETMatch.progress as progress @@ -151,4 +150,4 @@ def runExperimentBase( def run(cache): "run the parameter estimation" searchMethod = cache.settings.get("searchMethod", "UNSGA3") - return cache.search[searchMethod].run(cache, tools, creator) + return cache.search[searchMethod].run(cache) diff --git a/CADETMatch/fitness.py b/CADETMatch/fitness.py index 143fd15..425786b 100644 --- a/CADETMatch/fitness.py +++ b/CADETMatch/fitness.py @@ -1,5 +1,4 @@ import numpy -from deap import base class Fitness2(base.Fitness): diff --git a/CADETMatch/match.py b/CADETMatch/match.py index fc08e65..c72babf 100644 --- a/CADETMatch/match.py +++ b/CADETMatch/match.py @@ -12,7 +12,6 @@ import numpy import functools from cadet import H5, Cadet -from deap import base, creator, tools import CADETMatch.evo as evo import CADETMatch.gradFD as gradFD @@ -26,7 +25,6 @@ def main(map_function): path = sys.argv[1] setup(cache, path, map_function) gradFD.setupTemplates(cache) - # grad.setupTemplates(cache) hof = evo.run(cache) multiprocessing.get_logger().info("altScoress %s", cache.altScores) @@ -133,7 +131,6 @@ def print_version(): ("corner", "2.2.1"), ("emcee", "3.0.2"), ("SALib", "1.3.11"), - ("deap", "1.3.1"), ("psutil", "5.8.0"), ("numpy", "1.21.1"), ("openpyxl", "3.0.7"), @@ -145,7 +142,8 @@ def print_version(): ("seaborn", "0.11.1"), ("scikit-learn", "0.24.2"), ("jstyleson", "0.2.0"), - ('filelock', "3.0.12") + ('filelock', "3.0.12"), + ('pymoo', '0.4.2.2') ] for module, version_tested in modules: diff --git a/CADETMatch/pareto.py b/CADETMatch/pareto.py index 9da8356..1ea7351 100644 --- a/CADETMatch/pareto.py +++ b/CADETMatch/pareto.py @@ -6,7 +6,7 @@ import numpy class ParetoFront: - "Modification of the pareto front in DEAP that takes cache as an argument to update to use for similar comparison" + "Pareto front designed to be compatible with DEAP" def __init__(self, dimensions, similar=None, similar_fit=None, slice_object=slice(None)): if similar is None: @@ -135,7 +135,7 @@ def getBestScores(self): return numpy.min(data, 0) class DummyFront(ParetoFront): - "Modification of the pareto front in DEAP that takes cache as an argument to update to use for similar comparison" + "Pareto front designed to be compatible with DEAP" def __init__(self, dimensions=None, similar=None): "This is here for API compatibility, don't do anything" diff --git a/CADETMatch/search/altScore.py b/CADETMatch/search/altScore.py index 82ad712..0792501 100644 --- a/CADETMatch/search/altScore.py +++ b/CADETMatch/search/altScore.py @@ -17,7 +17,7 @@ name = "AltScore" -def run(cache, tools, creator): +def run(cache): "run the parameter estimation" path = Path(cache.settings["resultsDirBase"], cache.settings["csv"]) with path.open("a", newline="") as csvfile: diff --git a/CADETMatch/search/gradient.py b/CADETMatch/search/gradient.py index 9510cad..28034af 100644 --- a/CADETMatch/search/gradient.py +++ b/CADETMatch/search/gradient.py @@ -14,7 +14,7 @@ name = "Gradient" -def run(cache, tools, creator): +def run(cache): "run the parameter estimation" random.seed() diff --git a/CADETMatch/search/graphSpace.py b/CADETMatch/search/graphSpace.py index 4fd03e6..3720a38 100644 --- a/CADETMatch/search/graphSpace.py +++ b/CADETMatch/search/graphSpace.py @@ -17,7 +17,7 @@ "This is not actually an optimization method. It is used to sample a space and generate graphs to see what the space looks like." -def run(cache, tools, creator): +def run(cache): "run the parameter estimation" random.seed() diff --git a/CADETMatch/search/mcmc.py b/CADETMatch/search/mcmc.py index 11c91a1..7455922 100644 --- a/CADETMatch/search/mcmc.py +++ b/CADETMatch/search/mcmc.py @@ -896,7 +896,7 @@ def write_interval( write_interval.last_time = time.time() -def run(cache, tools, creator): +def run(cache): "run the parameter estimation" random.seed() checkpointFile = Path( diff --git a/CADETMatch/search/multistart.py b/CADETMatch/search/multistart.py index d76876a..601e957 100644 --- a/CADETMatch/search/multistart.py +++ b/CADETMatch/search/multistart.py @@ -15,7 +15,7 @@ name = "Multistart" -def run(cache, tools, creator): +def run(cache): "run the parameter estimation" random.seed() diff --git a/CADETMatch/search/nsga3.py b/CADETMatch/search/nsga3.py index 85628f0..e98e234 100644 --- a/CADETMatch/search/nsga3.py +++ b/CADETMatch/search/nsga3.py @@ -4,6 +4,6 @@ name = "NSGA3" -def run(cache, tools, creator): +def run(cache): "run the parameter estimation" return CADETMatch.pymoo_config.run(cache, 'nsga3') diff --git a/CADETMatch/search/scoretest.py b/CADETMatch/search/scoretest.py index 24e71d8..c05220f 100644 --- a/CADETMatch/search/scoretest.py +++ b/CADETMatch/search/scoretest.py @@ -14,7 +14,7 @@ name = "ScoreTest" -def run(cache, tools, creator): +def run(cache): "run the parameter estimation" path = Path(cache.settings["resultsDirBase"], cache.settings["csv"]) with path.open("a", newline="") as csvfile: diff --git a/CADETMatch/search/unsga3.py b/CADETMatch/search/unsga3.py index f2252d4..898ccc0 100644 --- a/CADETMatch/search/unsga3.py +++ b/CADETMatch/search/unsga3.py @@ -4,7 +4,7 @@ name = "UNSGA3" -def run(cache, tools, creator): +def run(cache): "run the parameter estimation" return CADETMatch.pymoo_config.run(cache, 'unsga3') diff --git a/CADETMatch/util.py b/CADETMatch/util.py index 37f5da6..c951cbb 100644 --- a/CADETMatch/util.py +++ b/CADETMatch/util.py @@ -19,7 +19,6 @@ import scipy.signal from addict import Dict from cadet import H5, Cadet -from deap import tools import CADETMatch.calc_coeff as calc_coeff import CADETMatch.sub as sub diff --git a/setup.py b/setup.py index 283b5c2..1ae03af 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ 'emcee>=3.0.2', 'SAlib', 'corner>=2.1.0', - 'deap>=1.3.1', + 'pymoo>=0.4.2.2', 'psutil>=5.7.0', 'openpyxl>=3.0.3', 'numpy>=1.18.5',