Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ax/storage/botorch_modular_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
InputPerturbation,
InputTransform,
LearnedFeatureImputation,
Log10,
Normalize,
Round,
Warp,
Expand Down Expand Up @@ -219,6 +220,7 @@
INPUT_TRANSFORM_REGISTRY: dict[type[InputTransform], str] = {
ChainedInputTransform: "ChainedInputTransform",
LearnedFeatureImputation: "LearnedFeatureImputation",
Log10: "Log10",
Normalize: "Normalize",
Round: "Round",
Warp: "Warp",
Expand Down
10 changes: 9 additions & 1 deletion ax/storage/json_store/tests/test_json_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
AdditiveMapSaasSingleTaskGP,
EnsembleMapSaasSingleTaskGP,
)
from botorch.models.transforms.input import Normalize
from botorch.models.transforms.input import Log10, Normalize
from botorch.models.transforms.outcome import Standardize
from botorch.sampling.normal import SobolQMCNormalSampler
from gpytorch.mlls.exact_marginal_log_likelihood import ExactMarginalLogLikelihood
Expand Down Expand Up @@ -653,6 +653,14 @@ def test_EncodeDecode(self) -> None:
else:
raise e

def test_model_config_with_log10_roundtrip(self) -> None:
config = ModelConfig(
input_transform_classes=[Log10],
input_transform_options={"Log10": {"indices": [1]}},
)
decoded = object_from_json(json.loads(json.dumps(object_to_json(config))))
self.assertEqual(decoded, config)

def test_EncodeDecode_dataclass_with_initvar(self) -> None:
@dataclasses.dataclass
class TestDataclass:
Expand Down
Loading