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

Catch exception by Theano 0.10+ on importing theano.sandbox.cuda #899

Merged
merged 1 commit into from
Mar 1, 2018

Conversation

f0k
Copy link
Member

@f0k f0k commented Feb 21, 2018

At some point after removing theano.sandbox.cuda, Theano opted to raise a nose.SkipTest exception instead of an ImportError when trying to import it. Some checks in Lasagne were still expecting an ImportError when theano.sandbox.cuda was not available. To avoid introducing a dependency on nose, this PR changes those checks to catch a generic Exception. This might mask other exceptions for users of Theano 0.8/0.9 trying to get CUDA to run, but avoids misleading exceptions for users of Theano 0.10. Seems that's the best we can do (without introducing a dependency on nose or checking the exception class name).

@f0k f0k added this to the v0.2 milestone Feb 21, 2018
@f0k f0k merged commit 37ca134 into Lasagne:master Mar 1, 2018
@f0k f0k deleted the catch-sandbox-cuda branch March 1, 2018 14:56
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.

None yet

1 participant