Reputation
Badges 1
75 × Eureka!seems like it's using None and that doesn't provide the normal api/sessions
endpoint - or, it does, but returns an empty list
if I change it to 0.0.0.0 it works
and $QUEUE and $NUM_WORKERS are particular to my setup, but they just give the name of the queue and how many copies of the agent to run
if there are any tests/debugging you'd like me to try, just let me know
but maybe that doesn't matter, actually - it might be one session per host I guess
My use case is running forecasting models in production across multiple businesses
And then we want to compare backtests or just this week's estimates across multiple of those models/branches
curious whether it impacts anything besides sagemaker. I'm thinking it's generically a kernel gateway issue, but I'm not sure if other platforms are using that yet
so my reading of the jupyter-kernel-gateway
docs is that each session is containerized, so each notebook "session" is totally isolated
api/kernels
does report back the active kernel, but doesn't give notebook paths or anything
but r.json()
is an empty list
as best I can tell it'll only have one .ipynb in $HOME
with this setup, which may work...
but even then the sessions endpoint is still empty
it does return kernels, just not sessions
and that requests.get()
throws an exception:
ConnectionError: HTTPConnectionPool(host='default', port=8888): Max retries exceeded with url: /jupyter/default/api/sessions (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7ba9cadc30>: Failed to establish a new connection: [Errno -2] Name or service not known'))
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
Yes, I'm running a notebook in Studio. Where should it be captured?
nice! Just tested it on my end as well, looks like it works!
I'll give it a shot and see! Just setting up a test server now, so it's still a hypothetical question just from reading the docs so far
But we're also testing out new models all the time, which are typically implemented as git branches - they run on the same set of inputs but don't output their results into production
thanks for the thoughtful response, @<1523701205467926528:profile|AgitatedDove14> ! I think I'll need to test out some workflows to see what works
I'm not sure if Subprojects will work for that - can you use the Web UI to compare the artifacts from two separate subprojects?
So I'm thinking maybe a Project for each thing we're forecasting, and then new Tasks for each time we run it
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.
but the call to jupyter_server.serverapp.list_running_servers()
does return the server
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
and the only calls to "uri": "/api/sessions"
are the ones I made during testing - sagemaker doesn't seem to ever call that itself
and cat /var/log/studio/kernel_gateway.log | grep ipynb
comes up empty