What happens when you call:
from clearml.backend_interface.task.repo import ScriptInfo
print(ScriptInfo._ScriptInfo__legacy_jupyter_notebook_server_json_parsing(None))
I think it just ends up in /home/sagemaker-user/{notebook}.ipynb
every time
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
weird that it won't return that single session
so my reading of the jupyter-kernel-gateway
docs is that each session is containerized, so each notebook "session" is totally isolated
Hmm and you are getting empty list for thi one:
server_info['url'] = f"http://{server_info['hostname']}:{server_info['port']}/"
and this
server_info['url'] = f"http://{server_info['hostname']}:{server_info['port']}/{server_info['base_url']}/"
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
Try to add here:
None
server_info['url'] = f"http://{server_info['hostname']}:{server_info['port']}/"
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
What do you have in "server_info['url']" ?
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
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" ?
seems like it's using None and that doesn't provide the normal api/sessions
endpoint - or, it does, but returns an empty list
right now I can't figure out how to get the session in order to get the notebook path
@<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)
api/kernels
does report back the active kernel, but doesn't give notebook paths or anything
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
but the only exception handler is for requests.exceptions.SSLError