asyml / forte

Forte is a flexible and powerful ML workflow builder. This is part of the CASL project: http://casl-project.ai/
Apache License 2.0
239 stars 60 forks source link

Update default serialization to the new `json` method. #918

Closed hunterhector closed 1 year ago

hunterhector commented 1 year ago

This PR remove more dependencies to jsonpickle by replacing the default configs to the new json method. This help towards finishing https://github.com/asyml/forte/issues/836

Description of changes

In reader and writer classes, such as those in base_reader.py and writers.py, the default configuration is always jsonpickle or sometimes pickle. In this PR, those are replaced as json.

Possible influences of this PR.

Usage of these methods will actually call the new serialization method now.

Test Conducted

Describe what test cases are included for the PR.

codecov[bot] commented 1 year ago

Codecov Report

Merging #918 (39e27a2) into master (38c96f5) will decrease coverage by 0.02%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #918      +/-   ##
==========================================
- Coverage   81.06%   81.05%   -0.02%     
==========================================
  Files         256      256              
  Lines       19851    19851              
==========================================
- Hits        16093    16091       -2     
- Misses       3758     3760       +2     
Impacted Files Coverage Δ
forte/data/readers/deserialize_reader.py 64.44% <ø> (ø)
forte/processors/base/writers.py 68.60% <ø> (ø)
forte/processors/writers.py 62.50% <ø> (ø)
tests/forte/data/data_store_serialization_test.py 98.43% <ø> (ø)
tests/forte/data/data_store_test.py 95.58% <ø> (ø)
tests/forte/data/readers/html_reader_test.py 98.76% <ø> (ø)
...atasets/wikipedia/dbpedia/dbpedia_datasets_test.py 100.00% <ø> (ø)
tests/forte/image_annotation_test.py 80.76% <ø> (ø)
...ta_augment/algorithms/data_augmentation_op_test.py 97.71% <ø> (ø)
forte/data/base_reader.py 87.40% <100.00%> (ø)
... and 10 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more