cellarium-ai / cellarium-ml

Distributed single-cell data analysis.
BSD 3-Clause "New" or "Revised" License
21 stars 3 forks source link

Allow `PredictionWriter` to create different kinds of saved output #265

Open sjfleming opened 6 days ago

sjfleming commented 6 days ago

Perhaps write_prediction could be an input argument, and maybe you could specify a different writer function for different use cases? Not sure if this could work.

Now we write batches as separate CSV output files with write_prediction() https://github.com/cellarium-ai/cellarium-ml/blob/ca4d6f11a4b26f6c3573a190a783066b9eaccd8f/cellarium/ml/callbacks/prediction_writer.py#L14-L38

Is it possible to do something like keep appending to the same h5 file, for instance? Perhaps PredictionWriter could be made to accommodate other kinds of output writers.

sjfleming commented 5 days ago

Maybe the more sensible thing to do is have a separate PredictionWriter, like PredictionWriterH5, for that kind of thing