def test_polymorphic_design_space_deserialization(
        valid_product_design_space_data):
    """Ensure that a deserialized ProductDesignSpace looks sane."""
    module: Module = Module.build(valid_product_design_space_data)
    assert type(module) == ProductDesignSpace
def test_polymorphic_predictor_deserialization(valid_simple_ml_predictor_data):
    """Ensure that a serialized ProductDesignSpace looks sane."""
    module = Module.build(valid_simple_ml_predictor_data)
    assert type(module) == SimpleMLPredictor
def test_polymorphic_processor_deserialization(valid_grid_processor_data):
    module = Module.build(valid_grid_processor_data)
    assert type(module) == GridProcessor
Exemple #4
0
 def build(self, data: dict) -> Module:
     """Build an individual module."""
     module = Module.build(data)
     module.session = self.session
     return module