Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey y'all sorry looks like some bugs introduced when migrating from our internal repo to the public one. This should resolve a lot of issues with Figures. Basically, certain entities like Figures don't have any spans associated; it's just boxes:
because they come from vision models.
In this case, the ability to intersect cross layer via operations like
.
(seeEntity.__getattr__()
) is messed up because previously, it relied on being able to hitintersect_by_span
. I've added a deprecation warning to any uses of.getattr
since it's ambiguous; recommend all users to useintersect_by_span
orintersect_by_boxes
in the future, which is more clear.I've then added Figure detection into the CoreRecipe properly, as derived from
doc.blocks
Here's a minimal test to validate:
Here's example of the figure visualization:
Thanks @aakanksha19 for catching!