-
Notifications
You must be signed in to change notification settings - Fork 72
feat: Refactor for local inference #5
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
Conversation
MthwRobinson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I like UnknownModelException addition.
| @@ -1,12 +1,14 @@ | |||
| import pytest | |||
| from unittest.mock import patch | |||
| from unittest.mock import patch, mock_open | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't know about mock_open before!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me either!
| return model_path, config_path, label_map | ||
|
|
||
|
|
||
| class UnknownModelException(Exception): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:-)
Bumps [ipython](https://github.com/ipython/ipython) from 8.5.0 to 8.6.0. - [Release notes](https://github.com/ipython/ipython/releases) - [Commits](ipython/ipython@8.5.0...8.6.0) --- updated-dependencies: - dependency-name: ipython dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Small factorization, primarily moving some of the api processing code out to where it can be reused.
Testing:
Functionality should be unchanged from a user perspective.
Tests should pass.
Curl should work while app is running locally:
make run-app-devpipeline-oer/sample-docsdirectory, or replacefake-oer.pdfwith the path to another pdf:Should succeed and return narrative sections.
Should succeed and return checkboxes (should be present if
fake-oer.pdfis used).Should fail with "unknown model" error message.