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

BUG: Fix check for SageMaker environment #580

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bnmajor
Copy link
Collaborator

@bnmajor bnmajor commented Nov 14, 2022

No description provided.

@bnmajor bnmajor requested a review from thewtex November 14, 2022 14:38
Copy link
Member

@aylward aylward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we need to distinguish StudioLab from Studio?

For StudioLab for itkWidgets, I had to use the StudioLab GUI to enable the loading of extensions, I had to use conda to install node.js to support enabling of the ImJoy extensions, and then I had to use the StudioLab GUI (couldn't use the juptyer-extension-manager or whatever command should have worked within python) to enable the ImJoy extension, and then I had to restart the environment.

Based on what you've said during meetings, it seems like such tasks are not needed for Sagemaker Studio, but I am not certain.

If the requirements are different, then we should distinguish Studio from StudioLab here.

@bnmajor
Copy link
Collaborator Author

bnmajor commented Nov 15, 2022

@aylward I don't think that we actually need to differentiate but I will run through all of the steps to confirm.

I had to use the StudioLab GUI to enable the loading of extensions

Unfortunately this is the case for JupyterLab and Jupyter Notebook as well but we can address this in the docs so that it is clear. It is much more likely that people already have extensions enabled for local Jupyter instances but if they don't this would still be a hang-up. I don't believe there is a way to handle this programmatically.

I had to use conda to install node.js to support enabling of the ImJoy extensions and then I had to use the StudioLab GUI (couldn't use the juptyer-extension-manager or whatever command should have worked within python) to enable the ImJoy extension, and then I had to restart the environment.

I am starting from a fresh environment myself right now since my account had to be re-created and I am finding that the steps that I took last time do not seem to work and I cannot seem to get the notebook to recognize the presence of the imjoy-jupyterlab-widget at all. This is good that I am starting fresh because I can work through all the kinks to make sure the docs and warnings are all correct, but I am confused about the extension problems because I did not have to use the GUI last time. Do you know if using the GUI you installed imjoy-jupyter-extension or imjoy-jupyterlab-extension?

@aylward
Copy link
Member

aylward commented Nov 15, 2022 via email

@bnmajor
Copy link
Collaborator Author

bnmajor commented Nov 15, 2022

@aylward After some more testing I can confirm that:

  1. We should not need to differentiate between Studio and Studio Lab environments. They seem to require the same steps to get up and running.
  2. The reason that you had to use the GUI for all of those steps is because the default kernel is not the same as the environment that the notebook is launched from, so although you installed the imjoy extension properly with pip, the notebook did not pick up on it.
  3. Node is only required in order to install the imjoy-jupyter-extension that is suggested when you search for extensions through the GUI which isn't necessary with pip
    1. I just sent out an email to Steve to try to sort out the best way to handle the kernel/launch env issue but in the meantime you can open a terminal and do a pip install imjoy-jupyterlab-extension from there and then refresh the page to get the extension to work.

@thewtex
Copy link
Member

thewtex commented Nov 15, 2022

To improve the user experience, I am wondering if during

import itkwidgets

where someone is trying to use itkwidgets in Sage* environment, we install itkwidgets[lab] in the environment that is providing the Sage* JupyterLab frontend application, and issue a warning that they need to refresh the page?

In addition, we can see how to get itkwidgets installed by default...

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

Successfully merging this pull request may close these issues.

3 participants