mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Make JsonlReader path optional (#8396)
To avoid config errors during training when `[corpora.pretrain.path]` is `None` with the default `spacy.JsonlCorpus.v1` reader, make the reader path optional, similar to `spacy.Corpus.v1`.
This commit is contained in:
parent
94e1346f44
commit
480a3bf3be
|
@ -41,7 +41,7 @@ def create_docbin_reader(
|
||||||
|
|
||||||
@util.registry.readers("spacy.JsonlCorpus.v1")
|
@util.registry.readers("spacy.JsonlCorpus.v1")
|
||||||
def create_jsonl_reader(
|
def create_jsonl_reader(
|
||||||
path: Path, min_length: int = 0, max_length: int = 0, limit: int = 0
|
path: Optional[Path], min_length: int = 0, max_length: int = 0, limit: int = 0
|
||||||
) -> Callable[["Language"], Iterable[Doc]]:
|
) -> Callable[["Language"], Iterable[Doc]]:
|
||||||
return JsonlCorpus(path, min_length=min_length, max_length=max_length, limit=limit)
|
return JsonlCorpus(path, min_length=min_length, max_length=max_length, limit=limit)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user