Esempio n. 1
0
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
Esempio n. 2
0
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
Esempio n. 3
0
def test_polymorphic_processor_deserialization(valid_grid_processor_data):
    module = Module.build(valid_grid_processor_data)
    assert type(module) == GridProcessor
Esempio n. 4
0
 def build(self, data: dict) -> Module:
     """Build an individual module."""
     module = Module.build(data)
     module.session = self.session
     return module