Skip to content

WikiText-2 BadZipFile fix + Update links in INFO.md to use relative paths - #2689

Open
abhi-cser wants to merge 7 commits into
d2l-ai:masterfrom
abhi-cser:patch-1
Open

abhi-cser wants to merge 7 commits into
d2l-ai:masterfrom
abhi-cser:patch-1

Conversation

@abhi-cser

@abhi-cser abhi-cser commented Apr 8, 2026 •

Copy link
Copy Markdown

Description of changes:

  1. Fix INFO.md setup.py links to be repo-relative
  2. WikiText-2 BadZipFile fix (broken S3 URL → HuggingFace datasets fallback)
  3. datasets added to install_requires
  4. setup.py repo-relative link fixes

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.

Copilot AI review requested due to automatic review settings April 8, 2026 19:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates incorrect setup.py links in INFO.md to use repo-relative paths so they resolve correctly when viewed from the repository.

Changes:

  • Replace http://setup.py links with ./setup.py in the d2l-en release checklist.
  • Replace http://setup.py links with ./setup.py in the optional restore step.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Add a HuggingFace datasets fallback for loading WikiText-2 when the original S3 zip URL is unavailable. Introduces _read_wiki_hf (using datasets.load_dataset('Salesforce/wikitext','wikitext-2-v1')) and wraps the existing download_extract/_read_wiki call in a try/except to fall back to _read_wiki_hf in both d2l/mxnet.py and d2l/torch.py.
@abhi-cser abhi-cser changed the title Update links in INFO.md to use relative paths WikiText-2 BadZipFile fix + Update links in INFO.md to use relative paths Apr 9, 2026
…urce

The previous patch only fixed d2l/mxnet.py and d2l/torch.py (library source),
but CI runs notebooks from the markdown source via d2lbook. The #@save
functions defined in the .md cells are what actually execute — and those still
had the old bare d2l.download_extract() call with no try/except.

This commit adds _read_wiki_hf() and wraps download_extract in a try/except
with the HuggingFace datasets fallback directly in the bert-dataset.md source,
for both mxnet and pytorch tabs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants