Skip to content

Commit e8aef7f

Browse files
author
The TensorFlow Datasets Authors
committed
Include trust_remote_code flag for code-based HF builders preparation.
PiperOrigin-RevId: 661246526
1 parent 77f2b14 commit e8aef7f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tensorflow_datasets/core/dataset_builders/huggingface_dataset_builder.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ def __init__(
200200
tfds_num_proc: Optional[int] = None,
201201
ignore_hf_errors: bool = False,
202202
overwrite_version: str | None = None,
203+
trust_remote_code: bool = False,
203204
**config_kwargs,
204205
):
205206
self._hf_repo_id = hf_repo_id
@@ -210,7 +211,10 @@ def __init__(
210211
)
211212
try:
212213
self._hf_builder = hf_datasets.load_dataset_builder(
213-
self._hf_repo_id, self._hf_config, **self.config_kwargs
214+
self._hf_repo_id,
215+
self._hf_config,
216+
trust_remote_code=trust_remote_code,
217+
**self.config_kwargs,
214218
)
215219
except Exception as e:
216220
raise RuntimeError(

0 commit comments

Comments
 (0)