-
Notifications
You must be signed in to change notification settings - Fork 61
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
Vb/document entity annotation al 5106 #987
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
482fa99
to
8200151
Compare
6d2f6cc
to
5a2c7ca
Compare
@pytest.fixture | ||
def configured_project_pdf_entity(client, ontology, rand_gen, | ||
dataset_pdf_entity): | ||
project = client.create_project(name=rand_gen(str), |
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.
Couldn't we reuse configured_project_without_data_rows
fixture here? Also, we should prefer QueueMode.Batch
over QueueMode.Dataset
, QueueMode.Dataset
is an older paradigm.
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.
will look into both
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.
this is done
e5279df
to
cef16d0
Compare
examples/annotation_import/pdf.ipynb
Outdated
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.
Interesting that we're getting such a large diff. Maybe some of our commits don't have databooks running, perhaps we should add databooks as a CI job too. No action needed for now, I've made a note for myself.
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.
also maybe the reason is that I ran my notebook via a jupyter server this time, and not VSC? Perhaps we should all standardize our notebook runtime
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, thats a good idea, I've noticed using jupyter creates huge diffs compared to vscode
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.
It may also be because someone working on this notebook did not have the pre-commit hooks installed.
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.
totally possible as Andrea has updated this notebook
Should we also have NDJSON serialization tests similar to other examples under |
good idea |
def to_common(self) -> DocumentEntity: | ||
return TextEntity(name=self.name, text_selections=self.text_selections) | ||
|
||
return obj.from_common(annotation.value, subclasses, annotation.name, |
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.
Realized that there are two returns here, would the second return ever be called?
text_selections: List[DocumentTextSelection] | ||
|
||
def to_common(self) -> DocumentEntity: | ||
return TextEntity(name=self.name, text_selections=self.text_selections) |
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.
Should TextEntity
be DocumentEntity
since that's the return type?
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
examples/annotation_import/pdf.ipynb
Outdated
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, thats a good idea, I've noticed using jupyter creates huge diffs compared to vscode
b031fce
to
3ed0e4e
Compare
Add DocumentEntity to tests Added integration test
3ed0e4e
to
59b060c
Compare
59b060c
to
0b4590f
Compare
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.
Great work! Thanks for the updates!
Story: https://labelbox.atlassian.net/browse/AL-5106
Adding support for
DocumentEntity
proper annotation type