-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Let --data-path be specified when running download.py scripts #642
Conversation
I'm gonna quickly add in docs, then this should be ready to merge. |
There was an explicitly-declared `path` keyword argument, so 'path' would never be present in `**overrides`. This line just overwrote any manually-specified value the user might've passed to the `path` parameter.
Docs added, and looked at (both on the site on the local server and in the README on GitHub) to make sure the formatting came out right. Still not quite ready for merge - in the process of documenting ways to specify the path at load time, I realised that passing a
Once that's done, I'll hand this over to y'all. |
This is ready for review, I think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great — especially appreciate the docs!
Agree – looks great and thanks for adding the sections to the docs and readme! 👍 |
I'll leave it to you to do so or not as you see fit - I feel like I probably shouldn't be making the decision about whether I get added or not. :) |
@ExplodingCabbage Sure, we'd be happy to add you! 😃 Just saw that your GitHub profile only shows your user name – which name would you like me to use for the CONTRIBUTORS.md? We usually list contributors as "Full name, username", but an alias instead of the full name would be fine, too. |
@ines My real name is "Mark Amery" (and I've just updated my profile to show it). :) |
Description
Adds a
--data-path
(or-d
) argument to the download.py scripts that lets the path to download to be specified.Motivation and Context
Makes downloading to a custom location easier; resolves #637
How Has This Been Tested?
Manually. After
pip install -e .
, I did agit clean -xdf
to clean my local repo, then, in sequence:Checked that
gives the empty string
Ran
python3 -m spacy.en.download all -d ~/some_dir
Checked that
spacy.load('en')('Hello, world')[0].pos_
still gave the empty string but thatspacy.util.set_data_path('/home/mark/some_dir'); spacy.load('en')('Hello, world')[0].pos_
didn't.Ran
python3 -m spacy.en.download all
Checked that
spacy.load('en')('Hello, world')[0].pos_
no longer gave the empty string.Tried running
python3 -m spacy.en.download all
andpython3 -m spacy.en.download all -d ~/some_dir
again and confirmed that both exited early saying that the model was already installed.Types of changes
Checklist: