-
Notifications
You must be signed in to change notification settings - Fork 68
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
Failure to load Lantern error escapes tryCatch() function #1157
Comments
This doesn't look like the error that torch would show when failing to start, but an error caused by trying to use torch functions with lantern not installed. Are you sure that all torch calls are avoided when |
I'm pretty sure that no Again I'm pretty open to suggestions on how to query whether the |
I see the problem now. Actually we are not allowed to raise an error in |
Thank you for your prompt answers! Does your suggestion implies I can use |
Yes, I think you can do something like:
|
Thank you! I'll try asap and report if it worked... |
Hi, the code you suggested, worked perfectly:
Thank you very much! Might I suggest to include this code in the documentation/examples? |
Hello,
I'm trying to optionally integrate torch in my R package, but,
when I tried to check whether the torch library is effectively available to run,
the following code did still fail to execute:
with this error:
Would it be possible to have this error fall within the range of the
tryCatch()
function?PS: Maybe I'm doing something wrong, but I tried to look anywhere on the resources and didn't find anything about this case.
So I'm asking here: which is the best way to have the
torch
as optional feature?The text was updated successfully, but these errors were encountered: