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 soft topk_mask operator, fix ranks docs and tests #396

Merged
merged 4 commits into from
Jul 14, 2023
Merged

Conversation

marcocuturi
Copy link
Contributor

@marcocuturi marcocuturi commented Jul 13, 2023

  • Add a soft topk_mask operator that returns values between [0,1] rather than a binary mask selecting the top k values.
  • Fix docs in ranks that were claiming output values were normalized to be between [0,1] when they're in fact in [0,n-1].
  • Fix tests in ranks that run now over multiple axis for a tensor.
    solves ott.tools.soft_sort.ranks doc mismatch with function signature #395

@marcocuturi marcocuturi changed the title Add soft topk_mask operator, fix ranks doc and tests Add soft topk_mask operator, fix ranks doc and tests Jul 13, 2023
@marcocuturi marcocuturi changed the title Add soft topk_mask operator, fix ranks doc and tests Add soft topk_mask operator, fix ranks docs and tests Jul 13, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jul 14, 2023

Codecov Report

Merging #396 (9f20b50) into main (68f9d08) will decrease coverage by 0.72%.
The diff coverage is 100.00%.

❗ Current head 9f20b50 differs from pull request most recent head 0ec9fc0. Consider uploading reports for the commit 0ec9fc0 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #396      +/-   ##
==========================================
- Coverage   91.26%   90.54%   -0.72%     
==========================================
  Files          55       55              
  Lines        5896     5904       +8     
  Branches      855      589     -266     
==========================================
- Hits         5381     5346      -35     
- Misses        379      417      +38     
- Partials      136      141       +5     
Impacted Files Coverage Δ
src/ott/tools/soft_sort.py 95.55% <100.00%> (+0.31%) ⬆️

... and 3 files with indirect coverage changes

@marcocuturi marcocuturi merged commit 4278f67 into main Jul 14, 2023
@michalk8 michalk8 deleted the topk branch July 20, 2023 05:28
@michalk8 michalk8 mentioned this pull request Jul 20, 2023
michalk8 pushed a commit that referenced this pull request Jun 27, 2024
* fix ranks

* indent

* fix test

* fix normalization of target_weights
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