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

Update nonlinear_constraint_is_feasible to return a boolean tensor #2731

Closed
wants to merge 1 commit into from

Conversation

saitcakmak
Copy link
Contributor

Summary:
nonlinear_constraint_is_feasible checks whether the constraint is feasible for the given (batch of) candidates. Previously, this returned a boolean, which was False if any element of the batch was infeasible. This diff updates it to return a boolean tensor that shows whether each batch is feasible. Use cases are updated to comply with the new behavior.

I'll utilize this in a follow up diff to introduce a helper that evaluates the feasibility of all forms of constraints.

Differential Revision: D69209007

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

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

Copy link

codecov bot commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.99%. Comparing base (c0db823) to head (f3c63e4).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2731   +/-   ##
=======================================
  Coverage   99.99%   99.99%           
=======================================
  Files         203      203           
  Lines       18671    18670    -1     
=======================================
- Hits        18670    18669    -1     
  Misses          1        1           

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

…ytorch#2731)

Summary:

`nonlinear_constraint_is_feasible` checks whether the constraint is feasible for the given (batch of) candidates. Previously, this returned a boolean, which was False if any element of the batch was infeasible. This diff updates it to return a boolean tensor that  shows whether each batch is feasible. Use cases are updated to comply with the new behavior.

I'll utilize this in a follow up diff to introduce a helper that evaluates the feasibility of all forms of constraints.

Reviewed By: dme65

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

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in a43bd4d.

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.

2 participants