mila-iqia / blocks

A Theano framework for building and training neural networks
Other
1.16k stars 351 forks source link

Catch any exception on old backend import #1192

Closed dmitriy-serdyuk closed 7 years ago

dmitriy-serdyuk commented 7 years ago

Theano 9.0 crashes when trying to import the old backend.

dmitriy-serdyuk commented 7 years ago

@rizar, this is an important one.

rizar commented 7 years ago

Can you please change to "except Exception" in order not to catch KeyboardInterrupt and other stuff like that?

https://stackoverflow.com/questions/730764/try-except-in-python-how-do-you-properly-ignore-exceptions

After that, LGTM

dmitriy-serdyuk commented 7 years ago

I wanted to say that KeyboardInterrupt never happens in import section, but considering the slowness of import of theano sometimes... I'll change it.

rizar commented 7 years ago

That's precisely how I reasoned about it :)

On Mon, 5 Jun 2017 at 21:02 Dmitriy Serdyuk notifications@github.com wrote:

I wanted to say that KeyboardInterrupt never happens in import section, but considering the slowness of import of theano sometimes... I'll change it.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/mila-udem/blocks/pull/1192#issuecomment-306352015, or mute the thread https://github.com/notifications/unsubscribe-auth/AAn8YhYwOuoproNvoldtDM_UZ36rbF7Nks5sBKUZgaJpZM4NwqOa .