Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pipeline states to ir #499

Merged
merged 26 commits into from
Sep 20, 2021
Merged

Add pipeline states to ir #499

merged 26 commits into from
Sep 20, 2021

Conversation

mylibrar
Copy link
Collaborator

This PR fixes #498 .

Description of changes

  • BaseProcessor
    • Remove the "selector" key in default_configs().
  • Pipeline
    • Add a new entry "PIPELINE_STATES" in IR to serialized the current state of pipeline.
      • _initialized
      • _enable_profiling
      • _check_type_consistency
      • _do_init_type_check
      • resource.onto_specs_dict
      • resource.merged_entry_tree

Possible influences of this PR.

Describe what are the possible side-effects of the code change.

Test Conducted

remote_processor_test.py is updated to check whether a pipeline can correctly update its states based on IR.

@codecov
Copy link

codecov bot commented Aug 10, 2021

Codecov Report

Merging #499 (7299fd6) into master (8ee2c6c) will increase coverage by 0.13%.
The diff coverage is 94.38%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #499      +/-   ##
==========================================
+ Coverage   79.22%   79.35%   +0.13%     
==========================================
  Files         220      220              
  Lines       15574    15718     +144     
==========================================
+ Hits        12338    12473     +135     
- Misses       3236     3245       +9     
Impacted Files Coverage Δ
forte/pipeline.py 93.53% <86.36%> (-0.93%) ⬇️
forte/data/selector.py 88.15% <90.90%> (-0.74%) ⬇️
forte/data/ontology/code_generation_objects.py 93.02% <92.85%> (-0.01%) ⬇️
forte/version.py 100.00% <100.00%> (ø)
tests/forte/advanced_pipeline_test.py 99.20% <100.00%> (ø)
tests/forte/data/selector_test.py 98.38% <100.00%> (+1.01%) ⬆️
tests/forte/pipeline_test.py 97.77% <100.00%> (ø)
forte/data/data_pack.py 77.82% <0.00%> (+0.19%) ⬆️

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 8ee2c6c...7299fd6. Read the comment docs.

forte/pipeline.py Outdated Show resolved Hide resolved
Copy link
Member

@hunterhector hunterhector left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me. There are a few comments to fix.

But for the problem on selector serialization, we may need to have a better solution. The selectors are currently very flexible but hard to serialize, an alternative is to restrict its interface (for example, use HParam/Config and remove all init kwargs). This may require another PR. Let's fix the rest of the comments and keep this PR on hold.

forte/pipeline.py Outdated Show resolved Hide resolved
forte/pipeline.py Outdated Show resolved Hide resolved
forte/pipeline.py Outdated Show resolved Hide resolved
@hunterhector
Copy link
Member

forte/pipeline.py Outdated Show resolved Hide resolved
forte/data/selector.py Outdated Show resolved Hide resolved
forte/pipeline.py Outdated Show resolved Hide resolved
@mylibrar
Copy link
Collaborator Author

Blocked by #503

forte/data/selector.py Outdated Show resolved Hide resolved
forte/data/selector.py Outdated Show resolved Hide resolved
forte/data/selector.py Outdated Show resolved Hide resolved
forte/data/selector.py Outdated Show resolved Hide resolved
Copy link
Member

@hunterhector hunterhector left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these all look good now.

@mylibrar mylibrar merged commit d7cbcfa into asyml:master Sep 20, 2021
@mylibrar mylibrar deleted the suqi-localtest branch September 22, 2021 17:29
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.

Add pipeline states to intermediate representation
3 participants