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

The example script build_model_from_scratch.py works only in ipython or jupyter #1351

Closed
abhisrkckl opened this issue Jul 22, 2022 · 0 comments

Comments

@abhisrkckl
Copy link
Contributor

abhisrkckl commented Jul 22, 2022

The script doesn't work if run from a command line or from a python REPL.

The issue is that there is a display() function used in this script that is undefined if run with python, but gets magically defined if run in jupyter or ipython.

The solution is to import it from IPython like this:
from IPython.core.display_functions import display

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

No branches or pull requests

1 participant