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

Review and Test Type Hint Simplification in linkability Function #61

Open
sourcery-ai bot opened this issue Oct 23, 2024 · 0 comments
Open

Review and Test Type Hint Simplification in linkability Function #61

sourcery-ai bot opened this issue Oct 23, 2024 · 0 comments

Comments

@sourcery-ai
Copy link

sourcery-ai bot commented Oct 23, 2024

The linkability function in the audmetric module has undergone a simplification of its type hints for the truth and prediction parameters. While this change aims to improve readability, there is a concern about whether it maintains the same level of type safety and does not alter the function's behavior or expected input types.

Additionally, it has been observed that calling audmetric.linkability(True, True) results in a TypeError with the message: "iteration over a 0-d array". This indicates a potential issue with handling scalar types in the function.

Currently, there are no tests for scalar types in test_linkability, which could help in identifying and resolving this issue.

Action Items:

  1. Review the simplification of type hints to ensure type safety and correct behavior.
  2. Investigate the TypeError when scalar types are used as inputs.
  3. Add tests for scalar types in test_linkability to prevent similar issues in the future.

I created this issue for @ChristianGeng from #60 (comment).

Tips and commands

Interacting with Sourcery

  • Generate a plan of action: Comment @sourcery-ai plan on this issue.
  • Generate a pull request for this issue: Comment @sourcery-ai develop to
    generate a PR that addresses this issue.

Getting Help

As mentioned below, the scope of the MR should be extended:

  • scalar values are not intended to be supported. Therefore the type hint should be adapted,
  • scalar inputs should thwrow
  • _matching_scores has the same problem and should be extended analogously
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

No branches or pull requests

0 participants