Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Extra features are not filtered out in prediction #49

Open
mkaranasou opened this issue Aug 30, 2020 · 1 comment
Open

Bug: Extra features are not filtered out in prediction #49

mkaranasou opened this issue Aug 30, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@mkaranasou
Copy link
Collaborator

Conditions:

  • Have a scikit model, e.g. the test model
  • Have payload_size_average in configuration under the extra features (which is not included in the model's features)
  • Run irawlog pipeline.

Result:
Key error for payload_size_average when predicting.

Note: I haven't tested it with a pyspark model, but it shouldn't be a problem since the part of the code that throws key error is only used in the scikit-learn workflow.

@mkaranasou mkaranasou added the bug Something isn't working label Aug 30, 2020
@mkaranasou
Copy link
Collaborator Author

Shortened output:

  File "/home/spark/baskerville/src/baskerville/models/anomaly_model_sklearn.py", line 125, in predict_dict
    x = [extract_features_in_order(x, detector.features)]
  File "/home/spark/baskerville/src/baskerville/models/anomaly_model_sklearn.py", line 41, in extract_features_in_order
    return [feature_dict[feature] for feature in model_features]
  File "/home/spark/baskerville/src/baskerville/models/anomaly_model_sklearn.py", line 41, in <listcomp>
    return [feature_dict[feature] for feature in model_features]
KeyError: 'payload_size_average'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant