nannyml.io.pickle_file_writer module

class nannyml.io.pickle_file_writer.PickleFileWriter(path: str, credentials: Optional[Dict[str, Any]] = None, fs_args: Optional[Dict[str, Any]] = None, write_args: Optional[Dict[str, Any]] = None)[source]

Bases: nannyml.io.file_writer.FileWriter

A Writer implementation that writes Results to disk (local/remote/cloud) as a pickle file.

Parameters
  • path (str) – The directory in which to output the generated pickle file. The name of the pickle file will equal the fully qualified result class name with a pkl extension, e.g. nannyml.drift.univariate.result.pkl

  • credentials (Dict[str, Any]) – Used to provide credential information following specific fsspec implementations.

  • fs_args – Specific arguments passed along to the fsspec filesystem initializer.

Examples

>>> writer = PickleFileWriter(
...    path='s3://my-output-bucket/output',
...    credentials={'aws_access_key_id': 'access_key_id', 'aws_secret_access_key': 'secret_access_key'}
... )
>>> writer.write(result)