Skip to content

Commit 63919c8

Browse files
committed
Die on HTTP error
1 parent cd825f7 commit 63919c8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

download_dataset.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
for split in ['train', 'valid', 'test']:
1717
filename = ds + "." + split + '.jsonl'
1818
r = requests.get("https://storage.googleapis.com/gpt-2/output-dataset/v1/" + filename, stream=True)
19+
r.raise_for_status()
1920

2021
with open(os.path.join(subdir, filename), 'wb') as f:
2122
file_size = int(r.headers["content-length"])

0 commit comments

Comments
 (0)