Skip to content

Do not open file write file until download is complete.#140

Merged
GaelVaroquaux merged 1 commit intoscikit-learn:masterfrom
fabianp:lfw
Apr 29, 2011
Merged

Do not open file write file until download is complete.#140
GaelVaroquaux merged 1 commit intoscikit-learn:masterfrom
fabianp:lfw

Conversation

@fabianp
Copy link
Copy Markdown
Member

@fabianp fabianp commented Apr 28, 2011

@ogrisel: is this OK?

This way we avoid (or more precisely minimize) the need to deal with
partially downloaded files and the errors that arise when you
Control-C a started download.

@ogrisel
Copy link
Copy Markdown
Member

ogrisel commented Apr 28, 2011

Ok this will load 200Mb in memory. If this ever causes a problem we should implement downloading to a temporary file and rename it to the right location at the end of the download instead, or delete it in case of failure.

This way we avoid (or more precisely minimize) the need to deal with
partially downloaded files and the errors that arise when you
Control-C a started download.
@fabianp
Copy link
Copy Markdown
Member Author

fabianp commented Apr 28, 2011

Doesn't it always load 200mb in memory when .read() is called ?

@ogrisel
Copy link
Copy Markdown
Member

ogrisel commented Apr 28, 2011

Yes off-course, you are right. Please feel free to merge.

@GaelVaroquaux
Copy link
Copy Markdown
Member

I think that 200Mb is OK nowadays.

@GaelVaroquaux
Copy link
Copy Markdown
Member

And besides, Fabian is right, it is used anyhow, sorry for the noise. I'll merge.

GaelVaroquaux added a commit that referenced this pull request Apr 29, 2011
Do not open file write file until download is complete.
@GaelVaroquaux GaelVaroquaux merged commit adcbdfd into scikit-learn:master Apr 29, 2011
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.

3 participants