Skip to content

Commit 27733a4

Browse files
fix: change cache_dir in read operator to working_dir (#136)
1 parent c77b559 commit 27733a4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

graphgen/operators/read/read.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def _build_reader(suffix: str, cache_dir: str | None, **reader_kwargs):
5050
def read(
5151
input_path: Union[str, List[str]],
5252
allowed_suffix: Optional[List[str]] = None,
53-
cache_dir: Optional[str] = "cache",
53+
working_dir: Optional[str] = "cache",
5454
parallelism: int = 4,
5555
recursive: bool = True,
5656
**reader_kwargs: Any,
@@ -60,7 +60,7 @@ def read(
6060
6161
:param input_path: File or directory path(s) to read from
6262
:param allowed_suffix: List of allowed file suffixes (e.g., ['pdf', 'txt'])
63-
:param cache_dir: Directory to cache intermediate files (PDF processing)
63+
:param working_dir: Directory to cache intermediate files (PDF processing)
6464
:param parallelism: Number of parallel workers
6565
:param recursive: Whether to scan directories recursively
6666
:param reader_kwargs: Additional kwargs passed to readers
@@ -70,7 +70,7 @@ def read(
7070
# 1. Scan all paths to discover files
7171
logger.info("[READ] Scanning paths: %s", input_path)
7272
scanner = ParallelFileScanner(
73-
cache_dir=cache_dir,
73+
cache_dir=working_dir,
7474
allowed_suffix=allowed_suffix,
7575
rescan=False,
7676
max_workers=parallelism if parallelism > 0 else 1,
@@ -100,7 +100,7 @@ def read(
100100
# 3. Create read tasks
101101
read_tasks = []
102102
for suffix, file_paths in files_by_suffix.items():
103-
reader = _build_reader(suffix, cache_dir, **reader_kwargs)
103+
reader = _build_reader(suffix, working_dir, **reader_kwargs)
104104
ds = reader.read(file_paths)
105105
read_tasks.append(ds)
106106

0 commit comments

Comments
 (0)