Skip to content

[PLT-1993] Fixed relationship label bug #1918

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

Merged
merged 10 commits into from
Nov 23, 2024
Merged

[PLT-1993] Fixed relationship label bug #1918

merged 10 commits into from
Nov 23, 2024

Conversation

Gabefire
Copy link
Collaborator

@Gabefire Gabefire commented Nov 22, 2024

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

  • Relationship annotations are broken if the source is used in more then one relationship
  • this pr looks to simplify everyting
  • All test are working besides the MEA one this PR will not allow extra keys in object annotations anymore but this was never mentioned in our docs and is not required for anything

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Document change (fix typo or modifying any markdown files, code comments or anything in the examples folder only)

All Submissions

  • Have you followed the guidelines in our Contributing document?
  • Have you provided a description?
  • Are your changes properly formatted?

New Feature Submissions

  • Does your submission pass tests?
  • Have you added thorough tests for your new feature?
  • Have you commented your code, particularly in hard-to-understand areas?
  • Have you added a Docstring?

Changes to Core Features

  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Have you updated any code comments, as applicable?

@Gabefire Gabefire requested a review from a team as a code owner November 22, 2024 20:32
@@ -0,0 +1,217 @@
import datetime
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Relationships work different then other relationship so need a dedicated integration test

@@ -60,143 +60,19 @@
class NDLabel(BaseModel):
annotations: AnnotationType

class _Relationship(BaseModel):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This stuff was used when we use to deserialized so not needed anymore also is very complicated

)


def test_relationship():
with open("tests/data/assets/ndjson/relationship_import.json", "r") as file:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Simplified this test into two

@@ -233,19 +230,13 @@ def test_create_from_label_objects(
),
ObjectAnnotation(
name="bbox",
extra={
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This could be breaking but want a second opinion. The extra field breaks the annotation if a customer decides to add it. It is not shown that they need to do this in the docs, and I don't see why they would. The old complicated logic removed these but to simplify this I think it is best to just not support this type of extra key

@Gabefire Gabefire changed the title [PLT-1993] Fixed relationship labels [PLT-1993] Fixed relationship label bug Nov 23, 2024
@Gabefire Gabefire merged commit f95e611 into develop Nov 23, 2024
16 of 23 checks passed
@Gabefire Gabefire deleted the gu/fix_annotations branch November 23, 2024 02:28
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.

2 participants