From f2990ec335b86127061b57f0acd9a9a92033e987 Mon Sep 17 00:00:00 2001 From: Behrang Shafei <50267830+bertiqwerty@users.noreply.github.com> Date: Wed, 6 Nov 2024 15:33:14 +0100 Subject: [PATCH 1/2] ruff format --- bofire/data_models/surrogates/shape.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bofire/data_models/surrogates/shape.py b/bofire/data_models/surrogates/shape.py index 5ce9d64f..dfd70e73 100644 --- a/bofire/data_models/surrogates/shape.py +++ b/bofire/data_models/surrogates/shape.py @@ -31,9 +31,9 @@ class PiecewiseLinearGPSurrogateHyperconfig(Hyperconfig): - type: Literal[ + type: Literal["PiecewiseLinearGPSurrogateHyperconfig"] = ( "PiecewiseLinearGPSurrogateHyperconfig" - ] = "PiecewiseLinearGPSurrogateHyperconfig" + ) inputs: Inputs = Inputs( features=[ CategoricalInput( @@ -44,9 +44,9 @@ class PiecewiseLinearGPSurrogateHyperconfig(Hyperconfig): ] ) target_metric: RegressionMetricsEnum = RegressionMetricsEnum.MAE - hyperstrategy: Literal[ - "FactorialStrategy", "SoboStrategy", "RandomStrategy" - ] = "FactorialStrategy" + hyperstrategy: Literal["FactorialStrategy", "SoboStrategy", "RandomStrategy"] = ( + "FactorialStrategy" + ) @staticmethod def _update_hyperparameters( From 12f14f83bbfad228c471de30bd0c3a1f2cb5b382 Mon Sep 17 00:00:00 2001 From: Behrang Shafei <50267830+bertiqwerty@users.noreply.github.com> Date: Wed, 6 Nov 2024 15:40:04 +0100 Subject: [PATCH 2/2] add missing import --- bofire/utils/torch_tools.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bofire/utils/torch_tools.py b/bofire/utils/torch_tools.py index d6a9269b..d1206c2d 100644 --- a/bofire/utils/torch_tools.py +++ b/bofire/utils/torch_tools.py @@ -4,6 +4,7 @@ import numpy as np import pandas as pd import torch +import torch.jit from botorch.models.transforms.input import InputTransform from torch import Tensor from torch.nn import Module