Repository: deephyper/deephyper (language: python)

Issue:
fixed minor typos



Discussion / hints:
Hi @BethanyL ! Thank you for the commits, I am waiting before merging the pull request because this repo is currently a mirror repo of a gitlab repo... So I am thinking about how to configure these things...

Fix patch:
diff --git a/README.md b/README.md
index 8123a641..b74acb78 100644
--- a/README.md
+++ b/README.md
@@ -71,7 +71,7 @@ def run(config: dict):
 if __name__ == "__main__":
     from deephyper.problem import HpProblem
     from deephyper.search.hps import AMBS
-    from deephyper.evaluator.evaluate import Evaluator
+    from deephyper.evaluator import Evaluator
 
     # define the variable you want to optimize
     problem = HpProblem()
diff --git a/deephyper/core/cli/hps.py b/deephyper/core/cli/hps.py
index 8ff9bed6..8bc225c8 100644
--- a/deephyper/core/cli/hps.py
+++ b/deephyper/core/cli/hps.py
@@ -53,7 +53,7 @@
 
 from deephyper.search.util import load_attr
 from deephyper.core.parser import add_arguments_from_signature
-from deephyper.evaluator.evaluate import EVALUATORS, Evaluator
+from deephyper.evaluator import EVALUATORS, Evaluator
 
 HPS_SEARCHES = {
     "ambs": "deephyper.search.hps.AMBS",
diff --git a/deephyper/core/cli/nas.py b/deephyper/core/cli/nas.py
index 52589096..f84ddad6 100644
--- a/deephyper/core/cli/nas.py
+++ b/deephyper/core/cli/nas.py
@@ -49,7 +49,7 @@
 import logging
 
 from deephyper.core.parser import add_arguments_from_signature
-from deephyper.evaluator.evaluate import EVALUATORS, Evaluator
+from deephyper.evaluator import EVALUATORS, Evaluator
 from deephyper.search.util import load_attr
 
 NAS_SEARCHES = {
diff --git a/deephyper/evaluator/__init__.py b/deephyper/evaluator/__init__.py
index e5bcfa1f..ca4b5174 100644
--- a/deephyper/evaluator/__init__.py
+++ b/deephyper/evaluator/__init__.py
@@ -1,3 +1,12 @@
 """
 This evaluator module asynchronously manages a series of Job objects to help execute given HPS or NAS tasks on various environments with differing system settings and properties.
-"""
\ No newline at end of file
+"""
+
+from deephyper.evaluator._evaluator import Evaluator, EVALUATORS
+from deephyper.evaluator._job import Job
+
+__all__ = [
+    "Evaluator",
+    "Job",
+    "EVALUATORS",
+]
diff --git a/deephyper/evaluator/encoder.py b/deephyper/evaluator/_encoder.py
similarity index 100%
rename from deephyper/evaluator/encoder.py
rename to deephyper/evaluator/_encoder.py
diff --git a/deephyper/evaluator/evaluate.py b/deephyper/evaluator/_evaluator.py
similarity index 99%
rename from deephyper/evaluator/evaluate.py
rename to deephyper/evaluator/_evaluator.py
index fd7acf7d..07360da6 100644
--- a/deephyper/evaluator/evaluate.py
+++ b/deephyper/evaluator/_evaluator.py
@@ -11,7 +11,7 @@
 
 import numpy as np
 from deephyper.core.exceptions import DeephyperRuntimeError
-from deephyper.evaluator.job import Job
+from deephyper.evaluator._job import Job
 
 EVALUATORS = {
     "thread": "_thread_pool.ThreadPoolEvaluator",
diff --git a/deephyper/evaluator/job.py b/deephyper/evaluator/_job.py
similarity index 100%
rename from deephyper/evaluator/job.py
rename to deephyper/evaluator/_job.py
diff --git a/deephyper/evaluator/_process_pool.py b/deephyper/evaluator/_process_pool.py
index 038140cf..61e5bdbd 100644
--- a/deephyper/evaluator/_process_pool.py
+++ b/deephyper/evaluator/_process_pool.py
@@ -1,7 +1,7 @@
 import logging
 import asyncio
 
-from deephyper.evaluator.evaluate import Evaluator
+from deephyper.evaluator._evaluator import Evaluator
 
 from concurrent.futures import ProcessPoolExecutor
 
diff --git a/deephyper/evaluator/_ray.py b/deephyper/evaluator/_ray.py
index a6f75605..4cdf9b72 100644
--- a/deephyper/evaluator/_ray.py
+++ b/deephyper/evaluator/_ray.py
@@ -1,7 +1,7 @@
 import logging
 import ray
 import time
-from deephyper.evaluator.evaluate import Evaluator
+from deephyper.evaluator._evaluator import Evaluator
 
 ray_initializer = None
 
diff --git a/deephyper/evaluator/_subprocess.py b/deephyper/evaluator/_subprocess.py
index f8df61e2..7388e018 100644
--- a/deephyper/evaluator/_subprocess.py
+++ b/deephyper/evaluator/_subprocess.py
@@ -6,8 +6,8 @@
 import json
 import os
 
-from deephyper.evaluator.evaluate import Evaluator
-from deephyper.evaluator.encoder import Encoder
+from deephyper.evaluator._evaluator import Evaluator
+from deephyper.evaluator._encoder import Encoder
 
 logger = logging.getLogger(__name__)
 
diff --git a/deephyper/evaluator/_thread_pool.py b/deephyper/evaluator/_thread_pool.py
index 6840eacd..5f85fc6d 100644
--- a/deephyper/evaluator/_thread_pool.py
+++ b/deephyper/evaluator/_thread_pool.py
@@ -1,7 +1,7 @@
 import logging
 import asyncio
 
-from deephyper.evaluator.evaluate import Evaluator
+from deephyper.evaluator._evaluator import Evaluator
 
 from concurrent.futures import ThreadPoolExecutor
 
@@ -21,7 +21,7 @@ async def execute(self, job):
         async with self.sem:
 
             executor = ThreadPoolExecutor(max_workers=1)
-            
+
             sol = await self.loop.run_in_executor(executor, job.run_function, job.config)
 
             job.result = sol
diff --git a/deephyper/nas/run/util.py b/deephyper/nas/run/util.py
index 65abea9c..4509f4c2 100644
--- a/deephyper/nas/run/util.py
+++ b/deephyper/nas/run/util.py
@@ -11,7 +11,7 @@
 import numpy as np
 import tensorflow as tf
 from deephyper.core.exceptions.problem import WrongProblemObjective
-from deephyper.evaluator.encoder import Encoder
+from deephyper.evaluator._encoder import Encoder
 from deephyper.search import util
 from deephyper.nas.lr_scheduler import exponential_decay
 
diff --git a/docs/api/deephyper.core.cli.rst b/docs/api/deephyper.core.cli.rst
index b4c9210d..7ce90ef3 100644
--- a/docs/api/deephyper.core.cli.rst
+++ b/docs/api/deephyper.core.cli.rst
@@ -1,4 +1,4 @@
-deephyper.core.cli 
+deephyper.core.cli
 ===================
 
 .. toctree::
diff --git a/docs/api/deephyper.evaluator.rst b/docs/api/deephyper.evaluator.rst
index fa631677..3bdd6077 100644
--- a/docs/api/deephyper.evaluator.rst
+++ b/docs/api/deephyper.evaluator.rst
@@ -1,4 +1,4 @@
-deephyper.evaluator 
+deephyper.evaluator
 ====================
 
 .. toctree::
diff --git a/docs/index.rst b/docs/index.rst
index ce805f39..b617e7b0 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -32,7 +32,7 @@ The black-box function named ``run`` is defined by taking an input dictionnary n
     if __name__ == "__main__":
         from deephyper.problem import HpProblem
         from deephyper.search.hps import AMBS
-        from deephyper.evaluator.evaluate import Evaluator
+        from deephyper.evaluator import Evaluator
 
         # define the variable you want to optimize
         problem = HpProblem()


Test patch:
diff --git a/tests/deephyper/evaluator/evaluator_test.py b/tests/deephyper/evaluator/evaluator_test.py
index 2d05c2e0..f2b31eb0 100644
--- a/tests/deephyper/evaluator/evaluator_test.py
+++ b/tests/deephyper/evaluator/evaluator_test.py
@@ -9,10 +9,10 @@ def run(config):
 @pytest.mark.incremental
 class TestEvaluator:
     def test_import(self):
-        from deephyper.evaluator.evaluate import Evaluator
+        from deephyper.evaluator import Evaluator
 
     def test_wrong_evaluator(self):
-        from deephyper.evaluator.evaluate import Evaluator
+        from deephyper.evaluator import Evaluator
 
         with pytest.raises(DeephyperRuntimeError):
             evaluator = Evaluator.create(
@@ -24,7 +24,7 @@ def test_wrong_evaluator(self):
             )
 
     def test_thread_process_subprocess(self):
-        from deephyper.evaluator.evaluate import Evaluator
+        from deephyper.evaluator import Evaluator
 
         for method in ["thread", "process", "subprocess"]:
             evaluator = Evaluator.create(
@@ -47,7 +47,7 @@ def test_thread_process_subprocess(self):
             assert 1 <= len(jobs) and len(jobs) <= len(configs)
 
     def test_ray(self):
-        from deephyper.evaluator.evaluate import Evaluator
+        from deephyper.evaluator import Evaluator
 
         def run(config):
             return config["x"]
diff --git a/tests/deephyper/search/hps/test_ambs.py b/tests/deephyper/search/hps/test_ambs.py
index 5c81b368..f3330c56 100644
--- a/tests/deephyper/search/hps/test_ambs.py
+++ b/tests/deephyper/search/hps/test_ambs.py
@@ -12,7 +12,7 @@ def run(hp):
 
     from deephyper.problem import HpProblem
     from deephyper.search.hps import AMBS
-    from deephyper.evaluator.evaluate import Evaluator
+    from deephyper.evaluator import Evaluator
     from deephyper.evaluator.callback import ProfilingCallback
 
     import matplotlib.pyplot as plt
diff --git a/tests/deephyper/search/nas/nas_test.py b/tests/deephyper/search/nas/nas_test.py
index d3e17c79..788c9319 100644
--- a/tests/deephyper/search/nas/nas_test.py
+++ b/tests/deephyper/search/nas/nas_test.py
@@ -7,7 +7,7 @@
 from deephyper.search.nas import RegularizedEvolutionMixed
 from deephyper.search.nas import AMBSMixed
 from deephyper.search.nas import AgEBO
-from deephyper.evaluator.evaluate import Evaluator
+from deephyper.evaluator import Evaluator
 from deephyper.benchmark.nas.linearReg import Problem as linear_reg_problem
 from deephyper.benchmark.nas.linearRegHybrid import Problem as linear_reg_hybrid_problem
 from deephyper.nas.run.quick import run as quick_run
diff --git a/tests/deephyper/search/nas/test_agebo.py b/tests/deephyper/search/nas/test_agebo.py
index d3fafc5b..dace3672 100644
--- a/tests/deephyper/search/nas/test_agebo.py
+++ b/tests/deephyper/search/nas/test_agebo.py
@@ -7,7 +7,7 @@
     logging.basicConfig(level=logging.DEBUG)
 
     from deephyper.search.nas import AgEBO
-    from deephyper.evaluator.evaluate import Evaluator
+    from deephyper.evaluator import Evaluator
 
     from deephyper.benchmark.nas.linearRegHybrid import Problem
     from deephyper.nas.run.quick import run
diff --git a/tests/deephyper/search/nas/test_ambsmixed.py b/tests/deephyper/search/nas/test_ambsmixed.py
index 6ade0d5e..7d14c458 100644
--- a/tests/deephyper/search/nas/test_ambsmixed.py
+++ b/tests/deephyper/search/nas/test_ambsmixed.py
@@ -7,7 +7,7 @@
     logging.basicConfig(level=logging.DEBUG)
 
     from deephyper.search.nas import AMBSMixed
-    from deephyper.evaluator.evaluate import Evaluator
+    from deephyper.evaluator import Evaluator
 
     from deephyper.benchmark.nas.linearRegHybrid import Problem
     from deephyper.nas.run.quick import run
diff --git a/tests/deephyper/search/nas/test_random.py b/tests/deephyper/search/nas/test_random.py
index 83f9c0b7..b42ca423 100644
--- a/tests/deephyper/search/nas/test_random.py
+++ b/tests/deephyper/search/nas/test_random.py
@@ -8,7 +8,7 @@
     logging.basicConfig(level=logging.INFO)
 
     from deephyper.search.nas import Random
-    from deephyper.evaluator.evaluate import Evaluator
+    from deephyper.evaluator import Evaluator
 
     from deephyper.benchmark.nas.linearReg import Problem
     from deephyper.nas.run.quick import run
diff --git a/tests/deephyper/search/nas/test_random_with_hp.py b/tests/deephyper/search/nas/test_random_with_hp.py
index cf7ef205..53226721 100644
--- a/tests/deephyper/search/nas/test_random_with_hp.py
+++ b/tests/deephyper/search/nas/test_random_with_hp.py
@@ -8,7 +8,7 @@
     logging.basicConfig(level=logging.INFO)
 
     from deephyper.search.nas import Random
-    from deephyper.evaluator.evaluate import Evaluator
+    from deephyper.evaluator import Evaluator
 
     from deephyper.benchmark.nas.linearRegHybrid import Problem
     from deephyper.nas.run.quick import run
diff --git a/tests/deephyper/search/nas/test_regevo.py b/tests/deephyper/search/nas/test_regevo.py
index bdf3ee6d..04a3e4b1 100644
--- a/tests/deephyper/search/nas/test_regevo.py
+++ b/tests/deephyper/search/nas/test_regevo.py
@@ -8,7 +8,7 @@
     logging.basicConfig(level=logging.DEBUG)
 
     from deephyper.search.nas import RegularizedEvolution
-    from deephyper.evaluator.evaluate import Evaluator
+    from deephyper.evaluator import Evaluator
 
     from deephyper.benchmark.nas.linearReg import Problem
     from deephyper.nas.run.quick import run
diff --git a/tests/deephyper/search/nas/test_regevomixed.py b/tests/deephyper/search/nas/test_regevomixed.py
index fe96cfe1..44a0c812 100644
--- a/tests/deephyper/search/nas/test_regevomixed.py
+++ b/tests/deephyper/search/nas/test_regevomixed.py
@@ -7,7 +7,7 @@
     logging.basicConfig(level=logging.DEBUG)
 
     from deephyper.search.nas import RegularizedEvolutionMixed
-    from deephyper.evaluator.evaluate import Evaluator
+    from deephyper.evaluator import Evaluator
 
     from deephyper.benchmark.nas.linearRegHybrid import Problem
     from deephyper.nas.run.quick import run
diff --git a/tests/test_quickstart.py b/tests/test_quickstart.py
index 4a890fc6..ca347fa0 100644
--- a/tests/test_quickstart.py
+++ b/tests/test_quickstart.py
@@ -7,7 +7,7 @@ def run(config: dict):
 if __name__ == "__main__":
     from deephyper.problem import HpProblem
     from deephyper.search.hps import AMBS
-    from deephyper.evaluator.evaluate import Evaluator
+    from deephyper.evaluator import Evaluator
 
     # define the variable you want to optimize
     problem = HpProblem()