Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Improve entry attribute assignment speed and serialization speed#534

Merged
hunterhector merged 36 commits intoasyml:masterfrom
hunterhector:slow
Sep 22, 2021
Merged

Improve entry attribute assignment speed and serialization speed#534
hunterhector merged 36 commits intoasyml:masterfrom
hunterhector:slow

Conversation

@hunterhector
Copy link
Member

This PR fixes #533.

Description of changes

  1. Added parameters to allow serialization in multiple formats, implement a new pickle-based format.
  2. Remove complex checks in entry attributes, implement pointer translation in serialization/deserialization.

Possible influences of this PR.

  1. Some generation results could be different from before, but the default generation is still jsonpickle, which means it should not be different most of the time.

Test Conducted

  1. Created new tests for serialization-deserialization.
  2. Added a new expected serialization test.
  3. Remove old tests that check for pointers in the Entry state, now check whether the entry state is the correct/expected type.

@codecov
Copy link

codecov bot commented Sep 22, 2021

Codecov Report

Merging #534 (c3ae595) into master (d7cbcfa) will increase coverage by 0.06%.
The diff coverage is 92.95%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #534      +/-   ##
==========================================
+ Coverage   79.35%   79.42%   +0.06%     
==========================================
  Files         220      220              
  Lines       15718    15781      +63     
==========================================
+ Hits        12473    12534      +61     
- Misses       3245     3247       +2     
Impacted Files Coverage Δ
forte/data/index.py 79.12% <0.00%> (ø)
forte/data/span.py 79.16% <0.00%> (+2.24%) ⬆️
forte/processors/nlp/ner_predictor.py 17.12% <0.00%> (ø)
...orte/data/ontology/ontology_code_generator_test.py 100.00% <ø> (ø)
...e/data/readers/race_multi_choice_qa_reader_test.py 97.87% <ø> (ø)
tests/forte/data/selector_test.py 98.38% <ø> (ø)
tests/forte/pipeline_test.py 96.88% <ø> (-0.90%) ⬇️
...rte/datasets/wikipedia/dbpedia/dbpedia_datasets.py 81.35% <75.00%> (-0.08%) ⬇️
forte/data/multi_pack.py 78.11% <77.77%> (+5.98%) ⬆️
forte/data/ontology/core.py 82.22% <89.65%> (+3.48%) ⬆️
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d7cbcfa...c3ae595. Read the comment docs.

@hunterhector hunterhector merged commit 0ca9602 into asyml:master Sep 22, 2021
@hunterhector hunterhector deleted the slow branch September 22, 2021 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Serialization and entry attribute assignment are slow

1 participant