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

Add testing for JSD metrics #100

Merged
merged 6 commits into from
Jan 16, 2024
Merged

Add testing for JSD metrics #100

merged 6 commits into from
Jan 16, 2024

Conversation

sjh120
Copy link
Collaborator

@sjh120 sjh120 commented Jan 6, 2024

Description

For the JSD testing module, it includes aspects such as value range, divergence being 0 for identical data, and the symmetry of JSD

Motivation and Context

How has this been tested?

Types of changes

  • Maintenance (no change in code, maintain the project's CI, docs, etc.)
  • 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)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Copy link
Contributor

sweep-ai bot commented Jan 6, 2024

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.
  • Apply: Add docstrings to all functions and file headers.

@codecov-commenter
Copy link

codecov-commenter commented Jan 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3264d06) 78.59% compared to head (215c630) 78.68%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #100      +/-   ##
==========================================
+ Coverage   78.59%   78.68%   +0.08%     
==========================================
  Files          59       61       +2     
  Lines        2523     2599      +76     
==========================================
+ Hits         1983     2045      +62     
- Misses        540      554      +14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@Wh1isper Wh1isper left a comment

Choose a reason for hiding this comment

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

You need to add from __future__ import annotations to support new type hint in python3.8/3.9

from future import annotations was previously scheduled to become mandatory in Python 3.10, but the Python Steering Council twice decided to delay the change (announcement for Python 3.10; announcement for Python 3.11). No final decision has been made yet. See also PEP 563 and PEP 649.

tests/metrics/test_jsd.py Outdated Show resolved Hide resolved
@Wh1isper Wh1isper changed the title test_jsd Add testing for JSD metrics Jan 8, 2024
Copy link
Contributor

@MooooCat MooooCat left a comment

Choose a reason for hiding this comment

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

LGTM

@MooooCat MooooCat dismissed Wh1isper’s stale review January 16, 2024 02:09

the annotations has been added

@MooooCat MooooCat merged commit f18b552 into hitsz-ids:main Jan 16, 2024
11 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.

4 participants