spaCy/spacy/tests/doc
Madeesh Kannan 41389ffe1e
Avoid pickling Doc inputs passed to Language.pipe() (#10864)
* `Language.pipe()`: Serialize `Doc` objects to bytes when using multiprocessing to avoid pickling overhead

* `Doc.to_dict()`: Serialize `_context` attribute (keeping in line with `(un)pickle_doc()`

* Correct type annotations

* Fix typo

* `Doc`: Do not serialize `_context`

* `Language.pipe`: Send context objects to child processes, Simplify `as_tuples` handling

* Fix type annotation

* `Language.pipe`: Simplify `as_tuple` multiprocessor handling

* Cleanup code, fix typos

* MyPy fixes

* Move doc preparation function into `_multiprocessing_pipe`
Whitespace changes

* Remove superfluous comma

* Rename `prepare_doc` to `prepare_input`

* Update spacy/errors.py

* Undo renaming for error

Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>
2022-06-02 20:06:49 +02:00
..
__init__.py Revert #4334 2019-09-29 17:32:12 +02:00
test_add_entities.py Support negative examples in partial NER annotations (#8106) 2021-06-17 17:33:00 +10:00
test_array.py Migrate regression tests into the main test suite (#9655) 2021-12-04 20:34:48 +01:00
test_creation.py Validate pos values when creating Doc (#9148) 2021-09-16 13:28:05 +02:00
test_doc_api.py Override SpanGroups.setdefault to provide default SpanGroup (#10772) 2022-05-12 10:06:25 +02:00
test_graph.py Tidy up and auto-format 2021-01-15 11:57:36 +11:00
test_json_doc_conversion.py Add Doc.from_json() (#10688) 2022-06-02 14:03:47 +02:00
test_morphanalysis.py Tidy up and auto-format 2020-10-03 17:20:18 +02:00
test_pickle_doc.py Avoid pickling Doc inputs passed to Language.pipe() (#10864) 2022-06-02 20:06:49 +02:00
test_retokenize_merge.py Tidy up with flake8: imports, comparisons, etc. 2021-06-28 12:08:15 +02:00
test_retokenize_split.py Migrate regression tests into the main test suite (#9655) 2021-12-04 20:34:48 +01:00
test_span_group.py Support more internal methods for SpanGroup (#10476) 2022-04-01 09:56:26 +02:00
test_span.py Add SpanRuler component (#9880) 2022-06-02 13:12:53 +02:00
test_token_api.py Auto-format code with black (#9234) 2021-09-20 08:49:19 +02:00
test_underscore.py Merge branch 'master' into tmp/sync 2020-03-26 13:38:14 +01:00