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

More user friendly error message for import sinn #8

Open
alcrene opened this issue Nov 4, 2020 · 0 comments
Open

More user friendly error message for import sinn #8

alcrene opened this issue Nov 4, 2020 · 0 comments
Assignees

Comments

@alcrene
Copy link
Collaborator

alcrene commented Nov 4, 2020

In sinn.common, we should detect if a types have been loaded and frozen. A natural thing for a new user to do is type

import sinn

at the top of a session, and at present this throws the error

ImportError: cannot import name 'FloatX' from '<unknown module name>' (unknown location)

which is a very poor first impression. Instead we should detect this, provide a summary of the correct import sequence,

from mackelab_toolbox.cgshim import shim, typing
shim.load('theano')
typing.freeze_types()
import sinn

and refer to the a new readme section which explains in more detail how we deal with dynamic types.

@alcrene alcrene self-assigned this Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant