so my reading of the jupyter-kernel-gateway
docs is that each session is containerized, so each notebook "session" is totally isolated
What do you have in "server_info['url']" ?
print(requests.get(url='
print(requests.get(url='
Hmm what do you have here?
os.system("cat /var/log/studio/kernel_gateway.log")
if I use the same kernel there'll be two
and the only calls to "uri": "/api/sessions"
are the ones I made during testing - sagemaker doesn't seem to ever call that itself
at least in 2018 it returned sessions! None
This is strange, let me see if we can get around it, because I'm sure it worked 🙂
Yep I think you are correct, you should have had the same output as a local jupyter notebook, and it seems that in sagemaker studio it is not working 😞
Let me check something
it does return kernels, just not sessions
seems like it's using None and that doesn't provide the normal api/sessions
endpoint - or, it does, but returns an empty list
As another test I ran Jupyter Lab locally using the same custom Docker container that we're using for Sagemaker Studio, and it works great there, just like the native local Jupyter Lab. So it's seemingly not the image, but maybe something to do with how Studio runs it as a kernel.
So it's seemingly not the image, but maybe something to do with how Studio runs it as a kernel.
Yeah I think that for some reason it fails detecting this is actually jupyter noteboko (not really sure why), Thank you for double checking on the container !!
the server_info
is
[{'base_url': '/jupyter/default/',
'hostname': '0.0.0.0',
'password': False,
'pid': 9,
'port': 8888,
'root_dir': '/home/sagemaker-user',
'secure': False,
'sock': '',
'token': '',
'url': '
',
'version': '1.23.2'}]
Just ran the same notebook in a local Jupyter Lab session and it worked as I expected it might, saving a copy to Artifacts
As in, which tab when I'm viewing the Experiment should I see it on? Should it be code, an artifact, or something else?
one possibility for getting the notebook filepath is finding and parsing /home/sagemaker-user/.jupyter/lab/workspaces/default-37a8.jupyterlab-workspace
I think, but I don't know if I can tie that to a specific session
as best I can tell it'll only have one .ipynb in $HOME
with this setup, which may work...
right now I can't figure out how to get the session in order to get the notebook path
you mean the code that fires "HTTPConnectionPool" ?