aws-samples / aws-samples/sagemaker-studio-apps-lifecycle-config-examples
auto-idle won't work until a terminal or a python kernel is opened
- Dominant language
- Python
- Stars
- 32
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
Hello
# Context
We've implemented the LCC and it's python library ASI in version 0.3.1, on a custom docker managed sagemaker image (JupyterApp 4).
This is working well, as long as the user has opened a terminal or a python kernel.
# Problem
If the user has only started the instance on the SageMaker Studio interface, and never connected to it, the instance will never be killed.
This is because the python script issues the following error :
```
2025-02-19T09:49:02.184116z - [auto-stop-idle] - An error accurred while checking idle state. Exception: time data '' does not match format '%Y-%m-%dT%H:%M:%S.%fz'
```
# Request
Would it be possible to count instance idling when no time data has been returned (because no terminal or python notebook has been started) ?
This is a modification required on this function
https://github.com/aws-samples/sagemaker-studio-apps-lifecycle-config-examples/blob/main/jupyterlab/auto-stop-idle/python-package/src/sagemaker_studio_jlab_auto_stop_idle/auto_stop_idle.py#L128
Thanks !
Regards / Ben
Contributor guide
Assessment
This issue has not been assessed yet.