aimhubio / aim

Aim 💫 — An easy-to-use & supercharged open-source experiment tracker.
https://aimstack.io
Apache License 2.0
5.12k stars 315 forks source link

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

Open ummadiviany opened 2 years ago

ummadiviany commented 2 years ago

🐛 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

Additional

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

Screenshot 2022-04-28 163823_AIM_ISSUE

rubenaprikyan commented 2 years ago

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 commented 2 years ago

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

ummadiviany commented 2 years ago

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

rubenaprikyan commented 2 years ago

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

rubenaprikyan commented 2 years ago

@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.

ummadiviany commented 2 years ago

@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 commented 2 years ago

@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.

rubenaprikyan commented 2 years ago

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.

ummadiviany commented 2 years ago

@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??

rubenaprikyan commented 2 years ago

@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.