Skip to content

Commit

Permalink
Rename const
Browse files Browse the repository at this point in the history
  • Loading branch information
khurram-ghani committed Sep 19, 2024
1 parent abbd3cd commit 4e9c84b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gpflux/layers/basis_functions/fourier_features/random/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
gpflow.kernels.SharedIndependent,
)

RFF_SUPPORTED_COMBINED: Tuple[Type[gpflow.kernels.Combination], ...] = (gpflow.kernels.Sum,)
RFF_SUPPORTED_COMBINATION: Tuple[Type[gpflow.kernels.Combination], ...] = (gpflow.kernels.Sum,)


def _sample_students_t(nu: float, shape: ShapeType, dtype: DType) -> TensorType:
Expand Down Expand Up @@ -82,12 +82,12 @@ def _sample_students_t(nu: float, shape: ShapeType, dtype: DType) -> TensorType:
class RandomFourierFeaturesBase(FourierFeaturesBase):
def __init__(self, kernel: gpflow.kernels.Kernel, n_components: int, **kwargs: Mapping):
assert isinstance(
kernel, (RFF_SUPPORTED_KERNELS, RFF_SUPPORTED_MULTIOUTPUTS, RFF_SUPPORTED_COMBINED)
kernel, (RFF_SUPPORTED_KERNELS, RFF_SUPPORTED_MULTIOUTPUTS, RFF_SUPPORTED_COMBINATION)
), "Unsupported Kernel: only the following kernel types are supported: {}".format(
[
k.__name__
for k in (
RFF_SUPPORTED_MULTIOUTPUTS + RFF_SUPPORTED_KERNELS + RFF_SUPPORTED_COMBINED
RFF_SUPPORTED_MULTIOUTPUTS + RFF_SUPPORTED_KERNELS + RFF_SUPPORTED_COMBINATION
)
]
)
Expand All @@ -98,7 +98,7 @@ def __init__(self, kernel: gpflow.kernels.Kernel, n_components: int, **kwargs: M
f"kernel types are supported: "
f"{[k.__name__ for k in RFF_SUPPORTED_KERNELS]}"
)
elif isinstance(kernel, RFF_SUPPORTED_COMBINED):
elif isinstance(kernel, RFF_SUPPORTED_COMBINATION):
assert all(isinstance(k, RFF_SUPPORTED_KERNELS) for k in kernel.kernels), (
f"Unsupported Kernel within the combination kernel; only the following"
f"kernel types are supported: "
Expand Down

0 comments on commit 4e9c84b

Please sign in to comment.