-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[jvm-packages] Supports external memory #11127
base: master
Are you sure you want to change the base?
Conversation
c9a074e
to
9c50758
Compare
9c50758
to
20a36f8
Compare
int nthread) throws XGBoostError { | ||
this(iter, null, missing, maxBin, nthread); | ||
int nthread, | ||
boolean useExternalMemory) throws XGBoostError { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a new structure for external memory instead of reusing the class?
@@ -391,6 +392,116 @@ class DataIteratorProxy { | |||
}; | |||
}; | |||
|
|||
// An iterator proxy for external memory. | |||
class ExternalMemoryIteratorProxy { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same as the original one with only label
is supported?
|
||
public: | ||
explicit ExternalMemoryIteratorProxy(jobject jiter): jiter_(jiter) { | ||
XGProxyDMatrixCreate(&proxy_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These function calls need to be checked.
This PR introduces a new parameter "useExternalMemory" to indicate whether to use external memory when build QuantileDMatrix. If it's set to true, then the cached file will be cached into the directory specified by
spark.local.dir
, ifspark.local.dir
is not set, "/tmp/ will be used for the caching.