Skip to content

Add timeout to MNIST data download#891

Open
massy-o wants to merge 1 commit into
LineaLabs:mainfrom
massy-o:codex/add-mnist-download-timeout
Open

Add timeout to MNIST data download#891
massy-o wants to merge 1 commit into
LineaLabs:mainfrom
massy-o:codex/add-mnist-download-timeout

Conversation

@massy-o
Copy link
Copy Markdown

@massy-o massy-o commented May 14, 2026

Summary

  • add an explicit timeout to the MNIST integration slice data download request

Why

The integration slice downloads sample data from GitHub when the local cache is missing. If the remote request stalls, the test process can hang on the socket indefinitely. A bounded timeout makes failures faster and easier to diagnose.

Testing

  • python3 -m py_compile tests/integration/slices/numpy_mnist.py

"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20100101 Firefox/10.0"
}
request_opts = {"headers": headers, "params": {"raw": "true"}}
request_opts = {"headers": headers, "params": {"raw": "true"}, "timeout": 30}
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Self-review: The timeout lives in request_opts so the existing requests.get call shape stays the same while the data download no longer waits indefinitely when GitHub stalls.

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.

1 participant