From dea79224edcb536253c0e74803f112b2891ca4ed Mon Sep 17 00:00:00 2001 From: ines Date: Sun, 16 Apr 2017 20:36:51 +0200 Subject: [PATCH] Remove saving & loading docs and link to new workflow --- website/docs/usage/models.jade | 67 +++++----------------------------- 1 file changed, 9 insertions(+), 58 deletions(-) diff --git a/website/docs/usage/models.jade b/website/docs/usage/models.jade index 39c271df4..9d50dcbc0 100644 --- a/website/docs/usage/models.jade +++ b/website/docs/usage/models.jade @@ -235,62 +235,13 @@ p p | If you've trained your own model, for example for - | #[+a("/docs/usage/adding-languages") additional languages], you can - | create a shortuct link for it by pointing #[code spacy.link] to the - | model's data directory. To allow your model to be downloaded and - | installed via pip, you'll also need to generate a package for it. You can - | do this manually, or via the new - | #[+a("/docs/usage/cli#package") #[code spacy package] command] that will - | create all required files, and walk you through generating the meta data. + | #[+a("/docs/usage/adding-languages") additional languages] or + | #[+a("/docs/usage/train-ner") custom named entities], you can save its + | state using the #[code Language.save_to_directory()] method. To make the + | model more convenient to deploy, we recommend wrapping it as a Python + | package. - -+infobox("Important note") - | The model packages are #[strong not suitable] for the public - | #[+a("https://pypi.python.org") pypi.python.org] directory, which is not - | designed for binary data and files over 50 MB. However, if your company - | is running an internal installation of pypi, publishing your models on - | there can be a convenient solution to share them with your team. - -p The model directory should look like this: - -+code("Directory structure", "yaml"). - └── / - ├── MANIFEST.in # to include meta.json - ├── meta.json # model meta data - ├── setup.py # setup file for pip installation - └── en_core_web_md # model directory - ├── __init__.py # init for pip installation - └── en_core_web_md-1.2.0 # model data - -p - | You can find templates for all files in our - | #[+a(gh("spacy-dev-resouces", "templates/model")) spaCy dev resources]. - | Unless you want to customise installation and loading, the only file - | you'll need to modify is #[code meta.json], which includes the model's - | meta data. It will later be copied into the package and data directory. - -+code("meta.json", "json"). - { - "name": "core_web_md", - "lang": "en", - "version": "1.2.0", - "spacy_version": "1.7.0", - "description": "English model for spaCy", - "author": "Explosion AI", - "email": "contact@explosion.ai", - "license": "MIT" - } - -p - | Keep in mind that the directories need to be named according to the - | naming conventions. The #[code lang] setting is also used to create the - | respective #[code Language] class in spaCy, which will later be returned - | by the model's #[code load()] method. - -p - | To generate the package, run the following command from within the - | directory. This will create a #[code .tar.gz] archive in a directory - | #[code /dist]. - -+code(false, "bash"). - python setup.py sdist ++infobox("Saving and loading models") + | For more information and a detailed guide on how to package your model, + | see the documentation on + | #[+a("/docs/usage/saving-loading") saving and loading models].