Revampt download to local dir process (#2223)
* still an early draft
* this is better
* fix
* revampt/refactor download process
* resume download by default + do not upload .huggingface folder
* compute sha256 if necessary
* fix hash
* add tests + fix some stuff
* fix snapshot download tests
* fix test
* lots of docs
* add secu
* as constant
* dix
* fix tests
* remove unused code
* don't use jsons
* style
* Apply suggestions from code review
Co-authored-by: Lysandre Debut <hi@lysand.re>
* Apply suggestions from code review
Co-authored-by: Lysandre Debut <hi@lysand.re>
* Warn more about resume_download
* fix test
* Add tests specific to .huggingface folder
* remove advice to use hf_transfer when downloading from cli
* fix torhc test
* more test fix
* feedback
* suggested changes
* more robust
* Apply suggestions from code review
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
* comment
* commen
* robust tests
* fix CI
* ez
* more ribust?
* allow for 1s diff
* don't raise on unlink
* style
* robustenss
---------
Co-authored-by: Lysandre Debut <hi@lysand.re>
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>