Skip to content

Conversation

@Joshuathomas18
Copy link

Summary

Previously, changing the label of automatically or semi-automatically annotated objects did not update their corresponding source field (AUTO / SEMI-AUTO).
This caused inconsistencies in annotation metadata, particularly when reassigning labels post-automation.

This PR adds conditional logic in updateAnnotationsAsync() to correctly set the source whenever the label_id changes.


Motivation and Context

This change ensures that annotations remain consistent and traceable even after label modifications.
Maintaining accurate source values is important for:

  • Differentiating manual and automated annotations in dataset exports.
  • Ensuring correct analytics on annotation methods.
  • Avoiding data drift in semi-automated pipelines.

Implementation Details

  • Added a label change check inside updateAnnotationsAsync().
  • When label_id changes, the function now updates the source to:
    • MANUAL if modified manually,
    • Retains AUTO or SEMI-AUTO only when automation still applies.
  • Added inline comments for future maintainability.

How Has This Been Tested?

  • Verified in the annotation UI that label changes correctly update source.
  • Tested both AUTO and SEMI-AUTO annotation types.
  • Confirmed the update persists in task exports and the REST API response.
  • No regressions found in manual annotation flow.

Checklist

  • Submitted changes into the develop branch
  • Created a changelog fragment (see top comment in CHANGELOG.md)
  • Updated documentation (if applicable)
  • Added / validated test cases
  • Linked related issue (if any)

License

  • I submit my code changes under the same MIT License that covers this project.

Related Links

Previously, changing the label of automatically annotated objects did not update their source field (AUTO  SEMI-AUTO). Added conditional logic in updateAnnotationsAsync() to set source correctly when label_id changes.
@sonarqubecloud
Copy link

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.

1 participant