sgkit-dev / sgkit

Scalable genetics toolkit
https://sgkit-dev.github.io/sgkit
Apache License 2.0
231 stars 32 forks source link

Parts of work redone when a dask worker dies #1154

Open benjeffery opened 10 months ago

benjeffery commented 10 months ago

This arose in the context of https://github.com/pystatgen/sgkit-publication/issues/35#issuecomment-1840492652 where dask workers being rotated due to slow memory leaks caused work to be redone and the VCF parse to never complete. This likely also happens with other format parsers.

Upon investigation, it was found that dask requires the result of each parse task to be in cluster memory, despite this just being a None. Possible ways to fix this:

1: Make a note on disk that a chunk has completed being parsed as make the second parse task a no-op. Downside of this is lots of files on disk. 2: Cancel the dask future after completion. Downside of this is a confusing dask progress bar that slowly gets less work to be done without any looking completed. 3: Some tweak to the dask memory manager to replicate parse task results

2 seems to be the best option.

jeromekelleher commented 10 months ago

Related:

Upstream dask issue: https://github.com/dask/dask/issues/10654

hammer commented 10 months ago

Linking https://github.com/pystatgen/sgkit/issues/1152 to be sure we get these fixes for PLINK data too!