Skip to content

Commit

Permalink
Include trust_remote_code flag for code-based HF builders preparation.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 661246526
  • Loading branch information
The TensorFlow Datasets Authors committed Aug 12, 2024
1 parent 77f2b14 commit e8aef7f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ def __init__(
tfds_num_proc: Optional[int] = None,
ignore_hf_errors: bool = False,
overwrite_version: str | None = None,
trust_remote_code: bool = False,
**config_kwargs,
):
self._hf_repo_id = hf_repo_id
Expand All @@ -210,7 +211,10 @@ def __init__(
)
try:
self._hf_builder = hf_datasets.load_dataset_builder(
self._hf_repo_id, self._hf_config, **self.config_kwargs
self._hf_repo_id,
self._hf_config,
trust_remote_code=trust_remote_code,
**self.config_kwargs,
)
except Exception as e:
raise RuntimeError(
Expand Down

0 comments on commit e8aef7f

Please sign in to comment.