nannyml.io.raw_files_writer module
- class nannyml.io.raw_files_writer.RawFilesWriter(path: str, credentials: Optional[Dict[str, Any]] = None, fs_args: Optional[Dict[str, Any]] = None)[source]
Bases:
FileWriter
Writes Result data and plots to disk (local/remote/cloud).
Creates a new
RawFilesWriter
instance.- Parameters:
path (str) – The directory to write the results in. Each
Result
being written there will end create its own subdirectory. Each of those will contain data and plots subdirectories.format (str) – The file format for the data export. Should be one of
parquet
orcsv
.write_args (Dict[str, Any], default=None) – Specific arguments passed along the method performing the actual writing.
credentials (Dict[str, Any], default=None) – Used to provide credential information following specific
fsspec
implementations.fs_args (default=None) – Specific arguments passed along to the
fsspec
filesystem initializer.
Examples
>>> writer = RawFilesWriter(path='/output', format="parquet") >>> # plots is a Dictionary mapping a plot name to a plotly Figure >>> # this is some legacy stuff to be cleaned up >>> writer.write(result, plots={}, calculator_name='test')