Use mmap for external memory. (#9282)

- Have basic infrastructure for mmap.
- Release file write handle.
This commit is contained in:
Jiaming Yuan
2023-06-19 18:52:55 +08:00
committed by GitHub
parent d8beb517ed
commit ee6809e642
16 changed files with 599 additions and 275 deletions

View File

@@ -64,7 +64,8 @@ def run_data_iterator(
subsample_rate = 0.8 if subsample else 1.0
it = IteratorForTest(
*make_batches(n_samples_per_batch, n_features, n_batches, use_cupy)
*make_batches(n_samples_per_batch, n_features, n_batches, use_cupy),
cache="cache"
)
if n_batches == 0:
with pytest.raises(ValueError, match="1 batch"):