Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit f689558

Browse files
committed
add missing base path to output file so files are not written to cwd
1 parent 5dd29ea commit f689558

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchtext/data/datasets_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def _clean_inner_tags_file(f_orig, base, stream):
6767
'<url', '<keywords', '<talkid', '<description', '<reviewer',
6868
'<translator', '<title', '<speaker', '<doc', '</doc'
6969
]
70-
f_txt = os.path.basename(f_orig.replace('.tags', ''))
70+
f_txt = os.path.join(base, os.path.basename(f_orig.replace('.tags', '')))
7171
os.makedirs(base, exist_ok=True)
7272
with codecs.open(f_txt, mode='w', encoding='utf-8') as fd_txt:
7373
for line in stream.readlines():

0 commit comments

Comments
 (0)