-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: add parse with layout and extract resume key value #60
Conversation
any_parser/any_parser.py
Outdated
@@ -221,6 +222,8 @@ def async_extract( | |||
process_type = ProcessType.FILE | |||
elif model == ModelType.PRO: | |||
process_type = ProcessType.FILE_REFINED_QUICK | |||
elif model == ModelType.ADVANCED: |
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.
nit: let's call this parse_with_layout in the ModelType.
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.
ack
any_parser/utils.py
Outdated
@@ -8,6 +8,7 @@ | |||
class ModelType(Enum): | |||
BASE = "base" | |||
PRO = "pro" | |||
ADVANCED = "advanced" |
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.
nit: let's call this parse with layout.
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.
ack
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.
nit: it looks like the image plot cannot be previewed in the ipynb?
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.
Yes, it seems the vscode can render it, but ipynb can't.
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.
Oh, I think it might be the timeout issue? I don't know how ipynb caches the results.
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.
qq: this is async API and what is the timeout issue that you are talking about?
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.
Done.
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.
Well, it looks fine locally, but Github fails to render it properly.
any_parser/any_parser.py
Outdated
elif model == ModelType.PARSE_WITH_LAYOUT: | ||
process_type = ProcessType.PARSE_WITH_LAYOUT |
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.
let's not nest the all different parse
into the same async_extract. Let's add a new SDK called async_parse_with_layout
.
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.
ack
any_parser/utils.py
Outdated
@@ -8,6 +8,7 @@ | |||
class ModelType(Enum): | |||
BASE = "base" | |||
PRO = "pro" | |||
PARSE_WITH_LAYOUT = "parse_with_layout" |
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.
like above. let's have a separated parse_with_layout instead of nesting parse_with_layout in current logic.
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.
ack
Let's update the description to follow, feat, test, and todo. Also, this PR contains both adding extract_resume_key_value for both sync and async and the async_extract_with_layout, so let's clearly mention it in the PR title. |
Also, is the extract_resume a rebase on top of #57? |
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 with minor comment
- check notebook display
- rename the PR to reflect the change on parse with layout and extract resume key value.
Add SDK for parse with layout and extract resume key value.
parse with layout
async_parse_with_layout
extract resume key value
extract_resume_key_value
async_extract_resume_key_value