cta-observatory / ctapipe

Low-level data processing pipeline software for CTAO or similar arrays of Imaging Atmospheric Cherenkov Telescopes
https://ctapipe.readthedocs.org
BSD 3-Clause "New" or "Revised" License
62 stars 266 forks source link

Write cross-validation results immediately after cross validation #2480

Closed maxnoe closed 6 months ago

maxnoe commented 7 months ago

Please describe the use case that requires this feature. Currently, the CrossValidator keeps the results of the cross-validation, including the full result table in memory and writes it in finish method of the tools.

We should write the results immediately in the cross validation loop using write_table(..., append=True) to avoid keeping this information in memory unnecessarily.

Describe the solution you'd like

Write cross validation results out immediately after each step, not in finish.