Commit 595f674f authored by Martino Bertoni's avatar Martino Bertoni 🌋
Browse files

raise exception on sign0 predict when no features are shared with input data

parent f2c2b031
......@@ -467,6 +467,9 @@ class sign0(BaseSignature, DataSignature):
raise Exception("Input type must be %s" % self.input_type)
"Use same features arrangement as fitted signature.")
if len(set(features_) & set(features)) == 0:
raise Exception("No overlap between provided features and "
"expected ones. Check your feature names.")
if len(set(features_) & set(features)) < len(set(features_)):
self.__log.warning("Not all original features are covered, "
"Missing columns will be set to 0.")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment