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

[PY-646][external] Resolved precision bug #763

Merged
merged 1 commit into from Jan 8, 2024
Merged

Conversation

JBWilkie
Copy link
Contributor

@JBWilkie JBWilkie commented Jan 4, 2024

Problem

As described in PY-646, sufficiently small polygons can result in an assertion error due to rounding 4 decimal place floats to integers. This can cause the minimum & maximum x or y coordinates of the enclosing bounding box to be equal, resulting in a "flat" bbox with no area that is therefore invalid

Solution

Pass the rounding arg as False to prevent this

Changelog

Resolved rounding error for very small polygons in Pytorch dataloaders

Copy link

linear bot commented Jan 4, 2024

Copy link
Contributor

@owencjones owencjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good.

def update_property(self, team_slug: Optional[str], params: Union[FullProperty, JSONDict]) -> FullProperty:
def update_property(
self, team_slug: Optional[str], params: Union[FullProperty, JSONDict]
) -> FullProperty:
darwin_config = DarwinConfig.from_old(self.config)
future_client = ClientCore(darwin_config)

return update_property_future(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slight naming issue here, which is probably ok to leave, but a Future is a thing in itself, similar to a Javascript Promise, so worth bearing in mind in erm... future

@JBWilkie JBWilkie merged commit b3e9317 into master Jan 8, 2024
16 checks passed
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.

None yet

2 participants