Skip to content

Fix dataset downloads: use the figshare API endpoint (WAF blocks ndownloader)#337

Open
JPL11 wants to merge 1 commit into
neuromorphs:developfrom
JPL11:fix-figshare-waf-download
Open

Fix dataset downloads: use the figshare API endpoint (WAF blocks ndownloader)#337
JPL11 wants to merge 1 commit into
neuromorphs:developfrom
JPL11:fix-figshare-waf-download

Conversation

@JPL11

@JPL11 JPL11 commented Jul 20, 2026

Copy link
Copy Markdown

Fixes #329, fixes #330.

What broke

figshare.com/ndownloader/files/<id> now sits behind an AWS WAF bot challenge. Non-browser clients get an empty HTTP 202 with x-amzn-waf-action: challenge instead of the file, so tonic's downloader writes a 0-byte archive (0it [00:00, ?it/s] in the reports) and extraction fails. A browser user agent does not help; the challenge is not UA-based.

The fix

https://api.figshare.com/v2/file/download/<id> serves the same files (same ids) without the challenge, redirecting straight to S3. This PR swaps the three affected URLs (DVSGesture train/test, CIFAR10DVS); the md5s are unchanged.

Verification

  • curl -sI https://figshare.com/ndownloader/files/38022171202, x-amzn-waf-action: challenge, 0 bytes
  • Full download of the DVSGesture test archive (691 MB) through the API endpoint completes and matches the expected md5 56070e45dadaa85fff82e0fbfbc06de5
  • CIFAR10DVS and DVSGesture-train respond to range requests through the API endpoint with the correct total sizes (11.2 GB / 2.4 GB); I did not re-download those in full, their md5s in the dataset classes are untouched

figshare.com/ndownloader now sits behind an AWS WAF bot challenge that
returns an empty HTTP 202 to non-browser clients, so urllib-based
downloads produce a 0-byte file and extraction fails (neuromorphs#329, neuromorphs#330).
The api.figshare.com/v2/file/download endpoint serves the same files
(same ids) without the challenge; the DVSGesture test archive downloads
completely from it and matches the expected md5.
Copilot AI review requested due to automatic review settings July 20, 2026 03:39

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.98%. Comparing base (94f92fd) to head (399566c).
⚠️ Report is 5 commits behind head on develop.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #337      +/-   ##
===========================================
- Coverage    76.48%   74.98%   -1.51%     
===========================================
  Files           48       49       +1     
  Lines         2994     3054      +60     
===========================================
  Hits          2290     2290              
- Misses         704      764      +60     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Issue on DVSGesture Dataset Not able to download CIFAR10DVS.

3 participants