[EM] Remove text file input for external memory.#11562
Merged
trivialfis merged 13 commits intodmlc:masterfrom Jul 15, 2025
Merged
[EM] Remove text file input for external memory.#11562trivialfis merged 13 commits intodmlc:masterfrom
trivialfis merged 13 commits intodmlc:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes support for text-file-based external memory, standardizes in-memory and external-memory test utilities, and updates documentation and examples accordingly.
- Deprecate and remove “cache” suffix parsing in DMatrix::Load; always load data in-memory or via new iterator-based external memory API
- Introduce
GetExternalMemoryDMatrixFromDatahelper and refactor tests to useRandomDataGeneratorandHostDeviceVectorfor external-memory scenarios - Remove legacy ExternalMemory examples from JVM packages and update tutorials to reflect removal of text-file external memory
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/data/data.cc | Disallow “#cache” URI syntax and simplify DMatrix::Load |
| tests/cpp/helpers.{h,cc} | Add GetExternalMemoryDMatrixFromData for tests |
| tests/cpp/data/test_sparse_page_* | Refactor to use iterator API and RandomDataGenerator |
| tests/cpp/common/test_hist_util.* | Migrate to HostDeviceVector and remove deprecated helpers |
| jvm-packages/.../ExternalMemory.* | Remove ExternalMemory example code and references |
| doc/tutorials/*.rst | Update guidance to note removal of text-file external memory |
Comments suppressed due to low confidence (4)
doc/tutorials/external_memory.rst:521
- [nitpick] This standalone bullet may render incorrectly in RST. Consider using a proper directive (e.g., .. note:: or a paragraph) and ensuring a blank line before the item for correct formatting.
- The text file cache format has been removed in 3.1.0.
tests/cpp/data/test_sparse_page_dmatrix.cu:11
- The test uses FileExists but no longer includes the header that defines it (previously provided by filesystem.h). Please reintroduce the appropriate include (e.g. "../filesystem.h") or add a forward declaration for FileExists.
#include "../helpers.h"
tests/cpp/data/test_sparse_page_dmatrix.cc:16
- This file uses dmlc::TemporaryDirectory but the include for filesystem.h (which defines TemporaryDirectory) was removed. Add back the include for filesystem.h or <dmlc/filesystem.h>.
#include "../helpers.h"
src/data/data.cc:1007
- [nitpick] The parameter name for the cache prefix was removed, making the signature less self-documenting. Consider restoring the parameter name (e.g., cache_prefix) for clarity.
template DMatrix* DMatrix::Create(
Member
Author
|
cc @rongou . |
rongou
approved these changes
Jul 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #9472 .