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

Fix hash calculation for TextAnswer and RadioAnswer objects #290

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

sergei-encord
Copy link
Collaborator

Fixes the bug with too aggressive deduplication of dynamic answer options

@github-actions
Copy link

Unit test report

95 tests   84 ✔️  4s ⏱️
  1 suites  11 💤
  1 files      0

Results for commit 4f50966.

Copy link
Contributor

@alex-encord alex-encord left a comment

Choose a reason for hiding this comment

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

Nice, this makes sense to me. Would be good to get second 👀


def __eq__(self, other: TextAnswer) -> bool:
if not isinstance(other, TextAnswer):
return False
else:
return self._value == other._value
return (
self._ontology_attribute.feature_node_hash == other._ontology_attribute.feature_node_hash
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we should just do equality by hash, but I'm not sure.

Copy link
Contributor

@denis-cord denis-cord left a comment

Choose a reason for hiding this comment

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

Thanks for looking into this @sergei-encord. Looks solid

@sergei-encord sergei-encord merged commit 42c7317 into master Apr 26, 2023
3 checks passed
@sergei-encord sergei-encord deleted the fix-label-radio-answer-parsing branch April 26, 2023 08:43
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

3 participants