mirror of https://github.com/explosion/spaCy.git
issue5230: fixed resource warnings in language
This commit is contained in:
parent
493c77462a
commit
1cd975d4a5
|
@ -903,9 +903,8 @@ class Language(object):
|
||||||
serializers["tokenizer"] = lambda p: self.tokenizer.to_disk(
|
serializers["tokenizer"] = lambda p: self.tokenizer.to_disk(
|
||||||
p, exclude=["vocab"]
|
p, exclude=["vocab"]
|
||||||
)
|
)
|
||||||
serializers["meta.json"] = lambda p: p.open("w").write(
|
serializers["meta.json"] = lambda p: srsly.write_json(p, self.meta)
|
||||||
srsly.json_dumps(self.meta)
|
|
||||||
)
|
|
||||||
for name, proc in self.pipeline:
|
for name, proc in self.pipeline:
|
||||||
if not hasattr(proc, "name"):
|
if not hasattr(proc, "name"):
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -11,7 +11,6 @@ from spacy.pipeline import Pipe
|
||||||
from spacy.tests.util import make_tempdir
|
from spacy.tests.util import make_tempdir
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.xfail
|
|
||||||
def test_language_to_disk_resource_warning():
|
def test_language_to_disk_resource_warning():
|
||||||
nlp = Language()
|
nlp = Language()
|
||||||
with make_tempdir() as d:
|
with make_tempdir() as d:
|
||||||
|
|
Loading…
Reference in New Issue