From 4f515814da4b21f4dfe289f1ddc009c502739ab1 Mon Sep 17 00:00:00 2001 From: Khurram Ghani Date: Thu, 14 Dec 2023 14:28:40 +0000 Subject: [PATCH] Fix merge issues --- tests/unit/acquisition/test_rule.py | 1 - tests/unit/test_ask_tell_optimization.py | 1 - trieste/acquisition/rule.py | 14 -------------- trieste/acquisition/utils.py | 3 --- trieste/ask_tell_optimization.py | 1 - trieste/bayesian_optimizer.py | 2 -- trieste/experimental/plotting/plotting.py | 2 -- 7 files changed, 24 deletions(-) diff --git a/tests/unit/acquisition/test_rule.py b/tests/unit/acquisition/test_rule.py index 302b3720f7..1287c70393 100644 --- a/tests/unit/acquisition/test_rule.py +++ b/tests/unit/acquisition/test_rule.py @@ -23,7 +23,6 @@ import pytest import tensorflow as tf import tensorflow_probability as tfp -import tensorflow_probability as tfp from tests.util.misc import empty_dataset, mk_dataset, quadratic, random_seed from tests.util.models.gpflow.models import ( diff --git a/tests/unit/test_ask_tell_optimization.py b/tests/unit/test_ask_tell_optimization.py index 183cc3efb8..8d1056661d 100644 --- a/tests/unit/test_ask_tell_optimization.py +++ b/tests/unit/test_ask_tell_optimization.py @@ -15,7 +15,6 @@ from typing import Mapping, Optional -import numpy.testing as npt import numpy.testing as npt import pytest import tensorflow as tf diff --git a/trieste/acquisition/rule.py b/trieste/acquisition/rule.py index 9891a0b6f8..1ed6353303 100644 --- a/trieste/acquisition/rule.py +++ b/trieste/acquisition/rule.py @@ -20,7 +20,6 @@ import copy from abc import ABC, abstractmethod from collections import Counter -from collections import Counter from collections.abc import Mapping from dataclasses import dataclass from typing import ( @@ -36,19 +35,6 @@ cast, overload, ) -from typing import ( - Any, - Callable, - Generic, - Optional, - Sequence, - Set, - Tuple, - TypeVar, - Union, - cast, - overload, -) import numpy as np from check_shapes import check_shapes, inherit_check_shapes diff --git a/trieste/acquisition/utils.py b/trieste/acquisition/utils.py index c404618437..d74cba95ed 100644 --- a/trieste/acquisition/utils.py +++ b/trieste/acquisition/utils.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. import copy -import copy import functools from typing import Dict, Mapping, Tuple, Union @@ -22,8 +21,6 @@ from ..data import Dataset from ..models import ProbabilisticModelType from ..observer import OBJECTIVE -from ..models import ProbabilisticModelType -from ..observer import OBJECTIVE from ..space import SearchSpaceType from ..types import Tag, TensorType from ..utils.misc import LocalizedTag diff --git a/trieste/ask_tell_optimization.py b/trieste/ask_tell_optimization.py index c90c1a5d6f..78f336e91b 100644 --- a/trieste/ask_tell_optimization.py +++ b/trieste/ask_tell_optimization.py @@ -53,7 +53,6 @@ from .types import State, Tag, TensorType from .utils import Ok, Timer from .utils.misc import LocalizedTag, get_value_for_tag, ignoring_local_tags -from .utils.misc import LocalizedTag, get_value_for_tag, ignoring_local_tags StateType = TypeVar("StateType") """ Unbound type variable. """ diff --git a/trieste/bayesian_optimizer.py b/trieste/bayesian_optimizer.py index a2361acab2..a45eeef588 100644 --- a/trieste/bayesian_optimizer.py +++ b/trieste/bayesian_optimizer.py @@ -63,13 +63,11 @@ from .data import Dataset from .models import SupportsCovarianceWithTopFidelity, TrainableProbabilisticModel from .objectives.utils import mk_batch_observer -from .objectives.utils import mk_batch_observer from .observer import OBJECTIVE, Observer from .space import SearchSpace from .types import State, Tag, TensorType from .utils import Err, Ok, Result, Timer from .utils.misc import LocalizedTag, get_value_for_tag, ignoring_local_tags -from .utils.misc import LocalizedTag, get_value_for_tag, ignoring_local_tags StateType = TypeVar("StateType") """ Unbound type variable. """ diff --git a/trieste/experimental/plotting/plotting.py b/trieste/experimental/plotting/plotting.py index 7ec0b40e59..43bdb17479 100644 --- a/trieste/experimental/plotting/plotting.py +++ b/trieste/experimental/plotting/plotting.py @@ -34,12 +34,10 @@ from trieste.acquisition.multi_objective.dominance import non_dominated from trieste.bayesian_optimizer import FrozenRecord, Record, StateType from trieste.observer import OBJECTIVE -from trieste.observer import OBJECTIVE from trieste.space import TaggedMultiSearchSpace from trieste.types import TensorType from trieste.utils import to_numpy from trieste.utils.misc import LocalizedTag -from trieste.utils.misc import LocalizedTag def create_grid(