[doc] fix inconsistent doc and minor typo for external memory (#8773)

This commit is contained in:
Dai-Jie (Jay) Wu 2023-02-10 01:05:34 +08:00 committed by GitHub
parent 199c421d60
commit ad0ccc6e4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,7 @@ constructor.
# input_data is a function passed in by XGBoost who has the exact same signature of # input_data is a function passed in by XGBoost who has the exact same signature of
# ``DMatrix`` # ``DMatrix``
X, y = load_svmlight_file(self._file_paths[self._it]) X, y = load_svmlight_file(self._file_paths[self._it])
input_data(X, y) input_data(data=X, label=y)
self._it += 1 self._it += 1
# Return 1 to let XGBoost know we haven't seen all the files yet. # Return 1 to let XGBoost know we haven't seen all the files yet.
return 1 return 1
@ -63,7 +63,7 @@ constructor.
booster = xgboost.train({"tree_method": "approx"}, Xy) booster = xgboost.train({"tree_method": "approx"}, Xy)
The above snippet is a simplifed version of ``demo/guide-python/external_memory.py``. For The above snippet is a simplified version of ``demo/guide-python/external_memory.py``. For
an example in C, please see ``demo/c-api/external-memory/``. an example in C, please see ``demo/c-api/external-memory/``.
**************** ****************