Commit be583847 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

[CheckpointWrapper] Allow custom save and load functions through estimator tags

parent b652eb14
Pipeline #46109 passed with stage
in 3 minutes and 57 seconds
......@@ -249,8 +249,16 @@ class CheckpointWrapper(BaseWrapper, TransformerMixin):
self.model_path = model_path
self.features_dir = features_dir
self.extension = extension
self.save_func = save_func or bob.io.base.save
self.load_func = load_func or bob.io.base.load
self.save_func = (
save_func
or estimator._get_tags().get("bob_features_save_fn")
or bob.io.base.save
)
self.load_func = (
load_func
or estimator._get_tags().get("bob_features_load_fn")
or bob.io.base.load
)
self.sample_attribute = sample_attribute
self.hash_fn = hash_fn
if model_path is None and features_dir is None:
......
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