cyto_dl.callbacks.tabular_saver module#

class cyto_dl.callbacks.tabular_saver.SaveTabularData(save_dir, meta_keys=[], as_parquet: bool = True, suffix: str | None = None)[source]#

Bases: Callback

Callback to save tabular data to disk as a .csv or .parquet after prediction.

Parameters:
  • save_dir (str) – directory to save the tabular data

  • meta_keys (list) – list of keys in the metadata to include as columns in the saved data

  • as_parquet (bool) – Saves data as parquet if True, otherwise saves as csv

on_predict_epoch_end(trainer, pl_module)[source]#
pred_to_df(pred)[source]#
save_feats(predictions, stage)[source]#