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

Forte export #690

Merged
merged 15 commits into from
Mar 23, 2022
Merged

Forte export #690

merged 15 commits into from
Mar 23, 2022

Conversation

zhanyuanucb
Copy link
Collaborator

This PR fixes #688

Description of changes

Added export method to Pipeline that checks a predefined environment variable FORTE_EXPORT_PATH and export pipeline config into it.

Possible influences of this PR.

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

Test Conducted

Added tests in tests/forte/pipeline_test.py

  • export should do nothing if FORTE_EXPORT_PATH is not defined
  • export should raise FileNotFoundError if FORTE_EXPORT_PATH is assigned but does not exists
  • export should dump pipeline config to FORTE_EXPORT_PATH if it exists
  • users should be able to export a pipeline multiple times, with different export names

@codecov
Copy link

codecov bot commented Mar 17, 2022

Codecov Report

Merging #690 (0e26397) into master (343e8c0) will increase coverage by 0.07%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #690      +/-   ##
==========================================
+ Coverage   80.86%   80.94%   +0.07%     
==========================================
  Files         242      242              
  Lines       17809    17883      +74     
==========================================
+ Hits        14401    14475      +74     
  Misses       3408     3408              
Impacted Files Coverage Δ
forte/pipeline.py 93.93% <100.00%> (+0.21%) ⬆️
tests/forte/pipeline_test.py 97.22% <100.00%> (+0.20%) ⬆️

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 343e8c0...0e26397. Read the comment docs.

forte/pipeline.py Outdated Show resolved Hide resolved
forte/pipeline.py Outdated Show resolved Hide resolved
forte/pipeline.py Outdated Show resolved Hide resolved
forte/pipeline.py Outdated Show resolved Hide resolved
forte/pipeline.py Outdated Show resolved Hide resolved
forte/pipeline.py Outdated Show resolved Hide resolved
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.

Looks very nice, thank you!

@hunterhector hunterhector merged commit a4c1f77 into asyml:master Mar 23, 2022
@zhanyuanucb zhanyuanucb deleted the forte-export branch March 23, 2022 20:12
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.

Improve the procedure to convert Forte pipeline to YAML
3 participants