Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove --no-cache-dir when downloading models #6857

Merged
merged 2 commits into from
Jan 30, 2021
Merged

Conversation

tupui
Copy link
Contributor

@tupui tupui commented Jan 29, 2021

Description

When --no-cache-dir is present, it prevents caching to properly function.

If the user still wants to do this, there is the possibility to pass options with user_pip_args.
But you should not enforce options like these. In my case this is preventing some docker build (using buildkit caching) to have proper caching of models.

Types of change

This PR removes the enforced pip options and leave this to the user.

Checklist

  • I have submitted the spaCy Contributor Agreement.
  • I ran the tests, and all new and existing tests passed.
  • My changes don't require a change to the documentation, or if they do, I've added all required information.

When `--no-cache-dir` is present, it prevents caching to properly function.

If the user still wants to do this, there is the possibility to pass options with `user_pip_args`.
But you should not enforce options like these. In my case this is preventing some docker build (using buildkit caching) to have proper caching of models.
@ines ines added feat / cli Feature: Command-line interface models Issues related to the statistical models labels Jan 30, 2021
@ines
Copy link
Member

ines commented Jan 30, 2021

Thanks for the PR, this is definitely reasonable! 👍

I think we initially added this because people kept running into this problem: pypa/pip#2984 (and we may have not yet had support for passing through arbitrary pip args). But if we document the --no-cache-dir suggestion, users can just set this manually if they run into memory problems.

(On a related note, we might also consider distributing models as binary wheels, at least as an additional option. My PR #6860 adds the ability to build wheels via spacy package.)

@ines ines merged commit 8ddf53f into explosion:master Jan 30, 2021
@tupui
Copy link
Contributor Author

tupui commented Jan 30, 2021

Thanks @ines for handling this quickly, really appreciate 😀. So another reason for me to use latest 😉.

The wheels are for sure a good thing! Looking forward to try this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / cli Feature: Command-line interface models Issues related to the statistical models
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants