bosk.pipeline.serializer.skops
#
skops-based serialization.
Module Contents#
Classes#
Skops-based pipeline serialization. |
- class bosk.pipeline.serializer.skops.SkopsBlockSerializer(trusted=True)#
Bases:
bosk.pipeline.serializer.base.BaseBlockSerializer
Skops-based pipeline serialization.
Skops is more secure than Joblib, but doesn’t allow to serialize the whole pipelines. If you are going to do so, consider
bosk.pipeline.serializer.ZipPipelineSerializer
.- Parameters:
trusted (bool) – Will the given data be trusted or not. Note that it is True by default.
- dump(block, out_file)#
Serialize and dump the pipeline to the file.
- Parameters:
pipeline – The pipeline to serialize.
out_file – Output file or stream.
block (bosk.block.base.BaseBlock) –
- load(in_file)#
Load and deserialize a block from the file.
- Parameters:
in_file – Input file or stream.
- Return type: