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

Make project pull order insensitive #6131

Merged
merged 1 commit into from Sep 24, 2020
Merged

Conversation

honnibal
Copy link
Member

spacy project pull was simply going through the commands in the order they're defined in the file, which means if you put an earlier-running command lower down, your pulls wouldn't work. In short examples it feels natural that of course, the earlier thing is earlier in the file. But when you add stuff over time, or have a template, you can easily just not have them in order. This already bit me when training the models, so I figured I'd better fix it.

The "fancy" approach to this sort of thing is to define the input/output dependencies as a graph, and then do a topological sort. I'm using a while loop because it gets the same result and the code is much clearer (imo). What I'm doing would even work if we wanted to download the things in parallel...In that case we would just use a thread or an async library to do the work, the outer loop would be the same. Maybe worth remembering if we want to support parallelism in spacy project run.

  • 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.

@ines ines added bug Bugs and behaviour differing from documentation feat / cli Feature: Command-line interface v3.0 Related to v3.0 labels Sep 24, 2020
@honnibal honnibal merged commit 17a6b0a into develop Sep 24, 2020
@ines ines deleted the bugfix/project-pull-order branch October 3, 2020 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs and behaviour differing from documentation feat / cli Feature: Command-line interface v3.0 Related to v3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants