MLMI2-CSSI / MLMI2-CSSI/foundry

Implement streaming for data downloads

Open
#302 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
88
Forks
17
PR merge metrics
No merged PRs in 30d

Description

Our present implementation for data downloads reads the entire file into memory before writing.
You can avoid that by reading in chunks: https://stackoverflow.com/questions/16694907/download-large-file-in-python-with-requests

See: https://github.com/MLMI2-CSSI/foundry/blob/092fe738826324c3a50810d7910bf3fa4ce5984a/foundry/https_download.py#L70

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in foundry/https_download.py around line 70 and inspect how downloads are read before being written. Change the download flow to process the response in chunks, then verify that a large data file is written successfully without loading the entire file into memory.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.