nice! Just tested it on my end as well, looks like it works!
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'}]
Try to add here:
None
server_info['url'] = f"http://{server_info['hostname']}:{server_info['port']}/"
I've poked around both the internal URL that Jupyter kernel is running on and some of the files in /sagemaker/.jupyter
but no luck so far - I can find plenty of kernel info, but not session
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 !!
@<1532532498972545024:profile|LittleReindeer37> nice!!! 😍
Do you want to PR? it will be relatively easy to merge and test, and I think that they might even push it to the next version (or worst case quick RC)
weird that it won't return that single 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" ?
as best I can tell it'll only have one .ipynb in $HOME
with this setup, which may work...
At the top there should be the URL of the notebook (I think)
but even then the sessions endpoint is still empty
but one possible workaround is to try to figure out if it's running in a gateway and then find the only notebook running on that server
poking around a little bit, and clearml.backend_interface.task.repo.scriptinfo.ScriptInfo._get_jupyter_notebook_filename()
returns None
right now I can't figure out how to get the session in order to get the notebook path
What do you have in "server_info['url']" ?
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
Hmm and you are getting empty list for thi one:
server_info['url'] = f"http://{server_info['hostname']}:{server_info['port']}/"
yeah, even then it'll run but return 0 notebooks
but maybe that doesn't matter, actually - it might be one session per host I guess
Hmm what do you have here?
os.system("cat /var/log/studio/kernel_gateway.log")