Skip to content

Commit 7f0c1b1

Browse files
grodinorwightman
authored andcommitted
Add trust_remote_code argument to ReaderHfds
1 parent eb94efb commit 7f0c1b1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

timm/data/readers/reader_hfds.py

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def __init__(
3838
input_key: str = 'image',
3939
target_key: str = 'label',
4040
download: bool = False,
41+
trust_remote_code: bool = False
4142
):
4243
"""
4344
"""
@@ -48,6 +49,7 @@ def __init__(
4849
name, # 'name' maps to path arg in hf datasets
4950
split=split,
5051
cache_dir=self.root, # timm doesn't expect hidden cache dir for datasets, specify a path
52+
trust_remote_code=trust_remote_code
5153
)
5254
# leave decode for caller, plus we want easy access to original path names...
5355
self.dataset = self.dataset.cast_column(input_key, datasets.Image(decode=False))

0 commit comments

Comments
 (0)