mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 10:16:27 +03:00
init-pipeline runs (maybe doesnt work)
This commit is contained in:
parent
ed2aff2db3
commit
b886f53c31
|
@ -15,7 +15,8 @@ from .debug_config import debug_config # noqa: F401
|
||||||
from .debug_model import debug_model # noqa: F401
|
from .debug_model import debug_model # noqa: F401
|
||||||
from .evaluate import evaluate # noqa: F401
|
from .evaluate import evaluate # noqa: F401
|
||||||
from .convert import convert # 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 .init_config import init_config, fill_config # noqa: F401
|
||||||
from .validate import validate # noqa: F401
|
from .validate import validate # noqa: F401
|
||||||
from .project.clone import project_clone # noqa: F401
|
from .project.clone import project_clone # noqa: F401
|
||||||
|
|
|
@ -12,16 +12,17 @@ import srsly
|
||||||
import warnings
|
import warnings
|
||||||
from wasabi import msg, Printer
|
from wasabi import msg, Printer
|
||||||
import typer
|
import typer
|
||||||
|
from ._util import init_cli, Arg, Opt, parse_config_overrides, show_validation_error
|
||||||
|
|
||||||
DEFAULT_OOV_PROB = -20
|
DEFAULT_OOV_PROB = -20
|
||||||
|
|
||||||
|
|
||||||
@init_cli.command("vocab")
|
#@init_cli.command("vocab")
|
||||||
@app.command(
|
#@app.command(
|
||||||
"init-model",
|
# "init-model",
|
||||||
context_settings={"allow_extra_args": True, "ignore_unknown_options": True},
|
# 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
|
# hidden=True, # hide this from main CLI help but still allow it to work with warning
|
||||||
)
|
#)
|
||||||
def init_model_cli(
|
def init_model_cli(
|
||||||
# fmt: off
|
# fmt: off
|
||||||
ctx: typer.Context, # This is only used to read additional arguments
|
ctx: typer.Context, # This is only used to read additional arguments
|
||||||
|
|
|
@ -16,7 +16,6 @@ from ._util import import_code, get_sourced_components
|
||||||
from ..language import Language
|
from ..language import Language
|
||||||
from .. import util
|
from .. import util
|
||||||
from ..training.example import Example
|
from ..training.example import Example
|
||||||
from ..training.initialize import must_initialize, init_pipeline
|
|
||||||
from ..errors import Errors
|
from ..errors import Errors
|
||||||
from ..util import resolve_dot_names
|
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)
|
T = registry.resolve(config["training"], schema=ConfigSchemaTraining)
|
||||||
dot_names = [T["train_corpus"], T["dev_corpus"], T["raw_text"]]
|
dot_names = [T["train_corpus"], T["dev_corpus"], T["raw_text"]]
|
||||||
train_corpus, dev_corpus, raw_text = resolve_dot_names(config, dot_names)
|
train_corpus, dev_corpus, raw_text = resolve_dot_names(config, dot_names)
|
||||||
optimizer T["optimizer"]
|
optimizer = T["optimizer"]
|
||||||
score_weights = T["score_weights"]
|
score_weights = T["score_weights"]
|
||||||
batcher = T["batcher"]
|
batcher = T["batcher"]
|
||||||
train_logger = T["logger"]
|
train_logger = T["logger"]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user