alibi-detect
alibi-detect copied to clipboard
Fix loading of drift detector which contains a preprocessing function without using a model
Currently loading a saved drift detector which uses a preprocessing step via a preprocess_fn couples the preprocessing step to the presence of a model, which should not be necessary. This results in errors when loading a detector which contains a saved preprocess_fn but not a model. Note that this error can be avoided as follows:
kwargs = dict(preprocess_fn=preprocess_fn)
detector = load_detector('path_to_detector', **kwargs)
... but this is of course not the intended use and should be fixed.