init-pipeline runs (maybe doesnt work)

This commit is contained in:
Matthew Honnibal 2020-09-28 03:42:47 +02:00
parent ed2aff2db3
commit b886f53c31
3 changed files with 10 additions and 9 deletions

View File

@ -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

View File

@ -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

View File

@ -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"]