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

FIX NeuralNetBinaryClassifier with torch.compile #1058

Merged
merged 2 commits into from
May 30, 2024

Conversation

BenjaminBossan
Copy link
Collaborator

Fixes #1057

NeuralNetBinaryClassifier was not working with torch.compile because the non-linearity was not correctly inferred. This inference depends on the instance type of the criterion. However, when using torch.compile, the criterion is wrapped, resulting in the isinstance check to miss. Now, we unwrap the criterion before checking the instance type.

Fixes #1057

NeuralNetBinaryClassifier was not working with torch.compile because the
non-linearity was not correctly inferred. This inference depends on the
instance type of the criterion. However, when using torch.compile, the
criterion is wrapped, resulting in the isinstance check to miss. Now, we
unwrap the criterion before checking the instance type.
@ottonemo ottonemo merged commit 346d705 into master May 30, 2024
15 checks passed
@BenjaminBossan BenjaminBossan deleted the fix-binary-classifier-with-compile branch May 31, 2024 15:26
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.

Error predicting when using compile=True with NeuralNetBinaryClassifier
2 participants