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

Fix Tutorial Notebooks to Not Shell out Python #1034

Open
cancan101 opened this issue Jul 18, 2014 · 7 comments
Open

Fix Tutorial Notebooks to Not Shell out Python #1034

cancan101 opened this issue Jul 18, 2014 · 7 comments

Comments

@cancan101
Copy link
Contributor

@cancan101 cancan101 commented Jul 18, 2014

Calls like: !show_weights.py convolutional_network_best.pkl Have problems when running on a remote IPython Notebook server as they do not render the images inline and instead give messages like this:

pylearn2.utils.exc.EnvironmentVariableError: 
PYLEARN2_VIEWER_COMMAND not defined. PLEASE READ THE FOLLOWING MESSAGE
CAREFULLY TO SET UP THIS ENVIRONMENT VARIABLE:
pylearn2 uses an external program to display images. Because different
systems have different image programs available, pylearn2 requires the
 user to specify what image viewer program to use.

You need to choose an image viewer program that pylearn2 should use.
Then tell pylearn2 to use that image viewer program by defining your
PYLEARN2_VIEWER_COMMAND environment variable.

You need to choose PYLEARN_VIEWER_COMMAND such that running

they also seem unnatural/ not clean. Why not import that module and call into it rather than using the command line parser, etc?

@dwf
Copy link
Contributor

@dwf dwf commented Jul 19, 2014

I agree, this has been on my mind for a while. Ideally we should just make
the patch viewer object expose the appropriate IPython display hooks and
have a top-level function that instantiates it easily.
On Jul 18, 2014 7:20 PM, "Alex Rothberg" notifications@github.com wrote:

Calls like: !show_weights.py convolutional_network_best.pkl Have problems
when running on a remote IPython Notebook server as they do not render the
images inline and instead give messages like this:

pylearn2.utils.exc.EnvironmentVariableError:
PYLEARN2_VIEWER_COMMAND not defined. PLEASE READ THE FOLLOWING MESSAGE
CAREFULLY TO SET UP THIS ENVIRONMENT VARIABLE:
pylearn2 uses an external program to display images. Because different
systems have different image programs available, pylearn2 requires the
user to specify what image viewer program to use.

You need to choose an image viewer program that pylearn2 should use.
Then tell pylearn2 to use that image viewer program by defining your
PYLEARN2_VIEWER_COMMAND environment variable.

You need to choose PYLEARN_VIEWER_COMMAND such that running

they also seem unnatural/ not clean. Why not import that module and call
into it rather than using the command line parser, etc?


Reply to this email directly or view it on GitHub
#1034.

@cancan101
Copy link
Contributor Author

@cancan101 cancan101 commented Jul 21, 2014

These are the changes that I made to get plot_monitor to work embedded in a Notebook: https://github.com/cancan101/pylearn2/compare/ipython_embed_script

@cancan101
Copy link
Contributor Author

@cancan101 cancan101 commented Jul 23, 2014

@dwf I actually think that a pretty simple change will catch many of these: cancan101@16e33da

@bartvm bartvm closed this Jul 24, 2014
@bartvm bartvm reopened this Jul 24, 2014
@goodfeli
Copy link
Contributor

@goodfeli goodfeli commented Jul 30, 2014

I would just recommend not using ipython notebooks anymore. They get math rendering errors on most browsers if you write more than 20 lines or so of math.

@cancan101
Copy link
Contributor Author

@cancan101 cancan101 commented Jul 30, 2014

Is that a mathjax bug or an ipython notebook bug?
Also, abandoning Ipython Notebooks because of some math rendering issues seems a bit extreme.

@goodfeli
Copy link
Contributor

@goodfeli goodfeli commented Jul 30, 2014

The math rendering was the only interesting reason to use them in this context, and it's basically broken. They are more annoying to run remotely, harder to do code review on because they don't line wrap sensibly, and have all sorts of browser performance issues.

@madisonmay
Copy link
Contributor

@madisonmay madisonmay commented Jul 30, 2014

I'm also not a fan of ipython notebooks for pylearn2 -- with the huge monitor outputs generated by running train.py on certain yaml files, ipython notebooks can sometimes take minutes to load on my machine. The multilayer_perceptron tutorial is particularly slow to load because of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.