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

Prevent unused NaNs from marking constraints as infeasible in pareto_frontier_evaluator #2431

Closed
wants to merge 2 commits into from

Conversation

saitcakmak
Copy link
Contributor

Summary: get_outcome_constraint_transforms evaluates the constraints by taking the product of tensor A with Y and comparing the outcome to rhs (uses einsum for this). The product of 0 and nan evaluates to nan, leading to the constraint being marked infeasible, even if that nan is from some unused metric. By setting unused elements to 0, this diff prevents such issues.

Differential Revision: D56953680

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label May 3, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D56953680

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.30%. Comparing base (3f8540e) to head (0bd0152).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2431   +/-   ##
=======================================
  Coverage   95.30%   95.30%           
=======================================
  Files         494      494           
  Lines       47920    47938   +18     
=======================================
+ Hits        45670    45688   +18     
  Misses       2250     2250           

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

saitcakmak added 2 commits May 7, 2024 11:17
)

Summary:

This would previously filter out the observations with missing metrics with a warning, which could lead to issues in downstream usage. Returning the observations with NaN lets the downstream users deal with NaNs while keeping the expected return shapes.

Reviewed By: mpolson64

Differential Revision: D56949439
…frontier_evaluator (facebook#2431)

Summary:

`get_outcome_constraint_transforms` evaluates the constraints by taking the product of tensor `A` with `Y` and comparing the outcome to `rhs` (uses einsum for this). The product of `0` and `nan` evaluates to `nan`, leading to the constraint being marked infeasible, even if that `nan` is from some unused metric. By setting unused elements to `0`, this diff prevents such issues.

Reviewed By: mpolson64

Differential Revision: D56953680
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D56953680

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 6f04957.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants