From 4c4eef0aa38503547353d0e5a082f76c098e9480 Mon Sep 17 00:00:00 2001 From: kohlhaasrebecca <rebecca.kohlhaas@outlook.com> Date: Mon, 29 Jan 2024 11:42:43 +0100 Subject: [PATCH] Warning for no std with constraints/OLS --- src/bayesvalidrox/pylink/pylink.py | 3 +-- src/bayesvalidrox/surrogate_models/surrogate_models.py | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/bayesvalidrox/pylink/pylink.py b/src/bayesvalidrox/pylink/pylink.py index 8899447c5..227a51ab3 100644 --- a/src/bayesvalidrox/pylink/pylink.py +++ b/src/bayesvalidrox/pylink/pylink.py @@ -17,7 +17,6 @@ import multiprocessing from functools import partial import tqdm -import umbridge # TODO: add this to the imports!? #from multiprocessing import get_context from multiprocess import get_context @@ -470,9 +469,9 @@ class PyLinkForwardModel(object): n_c_points = len(c_points) all_outputs = {} - # TODO: if umbridge, just run, no parallel from here # If the link type is UM-Bridge, then no parallel needs to be started from here if self.link_type.lower() == 'umbridge': + import umbridge if not hasattr(self, 'x_values'): raise AttributeError('For model type `umbridge` the attribute `x_values` needs to be set for the model!') # Init model diff --git a/src/bayesvalidrox/surrogate_models/surrogate_models.py b/src/bayesvalidrox/surrogate_models/surrogate_models.py index a64a4dc31..ba488d096 100644 --- a/src/bayesvalidrox/surrogate_models/surrogate_models.py +++ b/src/bayesvalidrox/surrogate_models/surrogate_models.py @@ -135,6 +135,12 @@ class MetaModel(): """ + # Generate general warnings + if self.apply_constraints or self.pce_reg_method.lower() == 'ols': + print('THere are no estimations of surrogate uncertainty available' + ' for the chosen regression options. This might lead to issues' + ' in later steps.') + # Add InputSpace to MetaModel if it does not have any if not hasattr(self, 'InputSpace'): self.InputSpace = InputSpace(self.input_obj) -- GitLab