diff --git a/spacy/cli/__init__.py b/spacy/cli/__init__.py index 92cb76971..5569e630d 100644 --- a/spacy/cli/__init__.py +++ b/spacy/cli/__init__.py @@ -15,7 +15,8 @@ from .debug_config import debug_config # noqa: F401 from .debug_model import debug_model # noqa: F401 from .evaluate import evaluate # noqa: F401 from .convert import convert # noqa: F401 -from .init_model import init_model # noqa: F401 +#from .init_model import init_model # noqa: F401 +from .init_pipeline import init_pipeline # noqa: F401 from .init_config import init_config, fill_config # noqa: F401 from .validate import validate # noqa: F401 from .project.clone import project_clone # noqa: F401 diff --git a/spacy/cli/init_model.py b/spacy/cli/init_model.py index 6decb6172..4194f1bd0 100644 --- a/spacy/cli/init_model.py +++ b/spacy/cli/init_model.py @@ -12,16 +12,17 @@ import srsly import warnings from wasabi import msg, Printer import typer +from ._util import init_cli, Arg, Opt, parse_config_overrides, show_validation_error DEFAULT_OOV_PROB = -20 -@init_cli.command("vocab") -@app.command( - "init-model", - context_settings={"allow_extra_args": True, "ignore_unknown_options": True}, - hidden=True, # hide this from main CLI help but still allow it to work with warning -) +#@init_cli.command("vocab") +#@app.command( +# "init-model", +# context_settings={"allow_extra_args": True, "ignore_unknown_options": True}, +# hidden=True, # hide this from main CLI help but still allow it to work with warning +#) def init_model_cli( # fmt: off ctx: typer.Context, # This is only used to read additional arguments diff --git a/spacy/cli/train.py b/spacy/cli/train.py index 468de583b..8a360ad44 100644 --- a/spacy/cli/train.py +++ b/spacy/cli/train.py @@ -16,7 +16,6 @@ from ._util import import_code, get_sourced_components from ..language import Language from .. import util from ..training.example import Example -from ..training.initialize import must_initialize, init_pipeline from ..errors import Errors from ..util import resolve_dot_names @@ -79,7 +78,7 @@ def train(nlp: Language, output_path: Optional[Path]=None) -> None: T = registry.resolve(config["training"], schema=ConfigSchemaTraining) dot_names = [T["train_corpus"], T["dev_corpus"], T["raw_text"]] train_corpus, dev_corpus, raw_text = resolve_dot_names(config, dot_names) - optimizer T["optimizer"] + optimizer = T["optimizer"] score_weights = T["score_weights"] batcher = T["batcher"] train_logger = T["logger"]