aim icon indicating copy to clipboard operation
aim copied to clipboard

Inline aim is not working in paperspace notebooks or StudioLab Sagemeaker AWS notebooks

Open ummadiviany opened this issue 3 years ago • 10 comments

🐛 Bug

I am trying to use aim inline UI in AWS Sagemaker Notebooks. But I am not able to see the UI.

To reproduce

Platform : StudioLab Sagemaker AWS Notebook

Expected behavior

The aim UI has to load, instead refused to connect is showing.

Environment

  • Aim Version : 3.8.1
  • Python version : 3.9.10
  • pip version : 21.2.4
  • OS (e.g., Linux) : Ubuntu 21.04
  • Any other relevant information

Additional

The used test code and resulting output is shown in the below image.

Screenshot 2022-04-28 163823_AIM_ISSUE

ummadiviany avatar Apr 28 '22 11:04 ummadiviany

Hi @ummadiviany, thanks fo the question. I need to have a little exploration for the StudioLab, will get back here soon. Till I will be back, please go over this guide, may be helpful here.

rubenaprikyan avatar Apr 28 '22 11:04 rubenaprikyan

@ummadiviany And to run aim ui on notebook, you need to pass your notebook' proxy url as --proxy-url argument of %aim up command.

rubenaprikyan avatar Apr 28 '22 11:04 rubenaprikyan

Thanks @rubenaprikyan for pointing out. But its still not working out for me. Attaching a screenshot here. image

It also produces a link at the end. Even following the link it produces the following result. Invalid or Expired Auth Token. Request a new presigned URL to continue using SageMaker. image

ummadiviany avatar Apr 28 '22 11:04 ummadiviany

@ummadiviany have you installed jupyter-server-proxy package on your notebook instance from the source(aim forked repository as mentioned in the guide) ?

rubenaprikyan avatar Apr 28 '22 11:04 rubenaprikyan

@ummadiviany it need some time to approve the new account on SageMaker StudioLab, I can do some tests once they will approve the account. Until it please make sure you did everything right for the proxy server.

rubenaprikyan avatar Apr 28 '22 16:04 rubenaprikyan

@ummadiviany have you installed jupyter-server-proxy package on your notebook instance from the source(aim forked repository as mentioned in the guide) ?

@rubenaprikyan Yes I have installed jupyter-server-proxy but still facing the same error.

ummadiviany avatar Apr 28 '22 17:04 ummadiviany

@ummadiviany it need some time to approve the new account on SageMaker StudioLab, I can do some tests once they will approve the account. Until it please make sure you did everything right for the proxy server.

It will take a ~week to accept and verify your account.

ummadiviany avatar Apr 28 '22 17:04 ummadiviany

Hi @ummadiviany, sorry for the late reply. There is an issue while using notebook extension in StudioLab.

Here are steps to run aim ui on StudioLab using terminal, try to run with terminal until we will fix extension' issue on StudioLab.

  • set __AIM_PROXY_URL__ env variable to https://<instance>.studio.<region>.sagemaker.aws
  • $aim up --base-path /studiolab/default/jupyter/proxy/absolute/43800/aim-sage
  • open printed Proxy url in a new browser tab

rubenaprikyan avatar May 07 '22 19:05 rubenaprikyan

@rubenaprikyan Yes it finally working through terminal. But a slight change in the printed URL is required. Here are the final steps. In terminal

  1. $ set __AIM_PROXY_URL__ = "https://<instance>.studio.<region>.sagemaker.aws"
  2. $ aim up --base-path /studiolab/default/jupyter/proxy/absolute/43800/aim-sage
  3. It will print an url like this http://127.0.0.1:43800/studiolab/default/jupyter/proxy/absolute/43800/aim-sage
  4. Change that url to https://<instance>.studio.<region>.sagemaker.aws/studiolab/default/jupyter/proxy/absolute/43800/aim-sage
  5. Open this modified url in new tab, it will work.

Shall we close this now??

ummadiviany avatar May 08 '22 04:05 ummadiviany

@ummadiviany If __AIM_PROXY_URL__ environment variable is set, it will print proxied url as well. Here is the complete part of doc https://aimstack.readthedocs.io/en/latest/using/sagemaker_notebook_ui.html#using-terminal.

There is an actual bug with notebook extension on this. Will ping here to close the issue.

rubenaprikyan avatar May 09 '22 15:05 rubenaprikyan