as best I can tell it'll only have one .ipynb in $HOME
with this setup, which may work...
api/kernels
does report back the active kernel, but doesn't give notebook paths or anything
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'}]
but even then the sessions endpoint is still empty
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
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" ?
which I looked at previously to see if I could import sagemaker.kg or kernelgateway or something, but no luck
I additionally tried using a Sagemaker Notebook instance, to see if it was the kernel dockerization that Studio uses that was messing things up. But it seems to actually log less information from a Notebook instance vs Studio .
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
What do you have in "server_info['url']" ?
I think it just ends up in /home/sagemaker-user/{notebook}.ipynb
every time
if there are any tests/debugging you'd like me to try, just let me know
This is strange, let me see if we can get around it, because I'm sure it worked 🙂
What happens when you call:
from clearml.backend_interface.task.repo import ScriptInfo
print(ScriptInfo._ScriptInfo__legacy_jupyter_notebook_server_json_parsing(None))
but maybe that doesn't matter, actually - it might be one session per host I guess
right now I can't figure out how to get the session in order to get the notebook path
if I instead change the request url to f"http://{server_info['hostname']}:{server_info['port']}/api/sessions"
then it gets a 200 response... however , the response is an empty list
seems like it's using None and that doesn't provide the normal api/sessions
endpoint - or, it does, but returns an empty list
Hmm and you are getting empty list for thi one:
server_info['url'] = f"http://{server_info['hostname']}:{server_info['port']}/"