Fix categorical data with external memory. (#10433)

This commit is contained in:
Jiaming Yuan
2024-06-18 04:34:54 +08:00
committed by GitHub
parent a8ddbac163
commit b4cc350ec5
5 changed files with 31 additions and 7 deletions

View File

@@ -43,7 +43,7 @@ def make_batches(
class Iterator(xgboost.DataIter):
"""A custom iterator for loading files in batches."""
def __init__(self, file_paths: List[Tuple[str, str]]):
def __init__(self, file_paths: List[Tuple[str, str]]) -> None:
self._file_paths = file_paths
self._it = 0
# XGBoost will generate some cache files under current directory with the prefix