Helper utilities for out-of-core learning