-
Notifications
You must be signed in to change notification settings - Fork 404
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
[Bug] get_polytope_samples
fails for inequalities over q
-batches and the actual dimension
#2468
Comments
An additional note: These kind of constraints are supported by |
There is a misunderstanding here - the Instead, what you will need to do is augment your domain - instead of drawing samples in
The constraint
Aside: If you want to draw multiple samples while using some of them before drawing new ones, yo'll want to consider using
This is a reasonable point from an API perspective - in principle one could build an interface that based on the dimension (and non-zero locations) of the constraint indices passed in does the domain-augmentation automatically under the hood. However, that would still leave some ambiguity in terms of the return type of the function - if |
…pe_samples`, raise informative error. This addresses pytorch#2468
Thanks you very much for your detailed answer 😄 I did some more testing and agree, it seems like I have just been (un-)lucky with drawing samples in my first round of testing. Also, thanks for the hint towards the |
…amples` (#2469) Summary: Adds more detail to the expected tensor sizes in the docstrings, raises an explicit `ValueError` if those don't match. This addresses #2468 Pull Request resolved: #2469 Reviewed By: saitcakmak Differential Revision: D61252180 Pulled By: Balandat fbshipit-source-id: 1ea5135920debb5fcb57ab277586c448d7b8a7d9
🐛 Bug
When using linear inequalities across multiple points resp. different
q
-batches, a broadcasting error withinsparse_to_dense_constraints
occurs when defining a constraint.This error only happens in a "mixed" setting when defining the constraint over both the
q
-batch dimension and the point dimension (see "Additional context").Thanks already for any help :)
To reproduce
** Stack trace/error message **
Expected Behavior
I would have expected this code to calculate a sample of points
x
of shape(2,2)
fulfillingx[0,0] + x[0,1] + x[1,0] >= 1
, as imposing such a constraint is supported across both individual axes.System information
Please complete the following information:
Additional context
Defining the inequalities either only along the
q
-batch or the "point" dimension works as expected, that is, the following code behaves as expected:The text was updated successfully, but these errors were encountered: