diff --git a/cml/controller/api.py b/cml/controller/api.py index b0db2cebea63a9b2cad350cac9fbd8b8afdef2cc..e02d2fbd16dd00bad7cac0736637b21449cb6a7f 100644 --- a/cml/controller/api.py +++ b/cml/controller/api.py @@ -86,9 +86,20 @@ def get_data_source(): return preprocessing_usecase.execute(preprocessing_req) -def construction(*args): - ml_models = [ConstructionClusteringMLModel(raw_model) for raw_model in args] +def construction(construct_type, *args, **kwargs): construction_settings = specific_settings_factory("construction") + construction_settings.construct_type = construct_type + + if construct_type == "conceptual": + ml_models = [ConstructionClusteringMLModel(raw_model) + for raw_model in args] + + elif construct_type == "procedural": + ml_models = [Autoencoder] + + else: + raise Exception("Operation not supported!") + create_constructor_req = CreateConstructorRequest(construction_settings, ml_models) create_construction_usecase = CreateConstructorUsecase()