{ "info": { "author": "Mario Kostelac", "author_email": "mario.kostelac@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# \ud83e\udd4a sagemaker-knockout\nKnock the SageMaker instance out when it's not active!\n\n## \u2753 Why?\nAre you enjoying big powerful, pricey SageMaker instances to experiment with your data, but often forget to shut it down after you're done? \ud83d\udcb8\ud83d\udcb8\ud83d\udcb8\ud83d\ude33\n\n`sagemaker-knockout` will knock your machine out when it's inactive! \ud83d\udc7e\n\n## \u2699\ufe0f How does it work?\nIt tracks three metrics to detect the activity. If any of them report as active, machine will not shut down.\n- **Jupyter connections** - if Jupyter server has incoming connections opened, it means you have an open console or notebook tab (with laptop opened). We do not want to shut the machine down in that case\n- **GPU usage** - if you've left your laptop closed, but are running GPU intensive operations, we'll detect that (threshold is set to 5%)\n- **GPU usage** - if you've left your laptop closed, but are running CPU intensive operations, we'll detect that (threshold is set to 10%)\n\n## \ud83e\udde0 Setup\nIn order to make sure you don't need to remember to run this program to shut down your machine \ud83d\ude05, the most covenient setup is to change the SageMaker's lifecycle configuration.\n\nAdd this snippet of code to \"Start notebook\" script:\n```bash\n#!/bin/bash\n\n# make the script fail if anything fails\nset -e\n\n# set up the language so we don't support just ASCII\nexport LC_ALL=en_US.utf-8\nexport LANG=en_US.utf-8\n\necho \"Setting up \ud83e\udd4a sagemaker-knockout...\"\npip3 install sagemaker-knockout\npython3 -m sagemaker_knockout run --daemonize --max-inactive-minutes 60\nsleep 3\npython3 -m sagemaker_knockout check-daemon\n```\n\nAs you can guess, we are running this program in the background (daemonizing) and you can change the inactivity period after which the shutdown process kicks in. Feel free to change it to any number that suits you (yes, I do like long lunch breaks \ud83c\udf54).\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mariokostelac/sagemaker-knockout", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "sagemaker-knockout", "package_url": "https://pypi.org/project/sagemaker-knockout/", "platform": "", "project_url": "https://pypi.org/project/sagemaker-knockout/", "project_urls": { "Homepage": "https://github.com/mariokostelac/sagemaker-knockout" }, "release_url": "https://pypi.org/project/sagemaker-knockout/0.0.7/", "requires_dist": [ "psutil", "gputil", "daemonize", "click", "boto3" ], "requires_python": "", "summary": "Shutdown your SageMaker instance when it's not active", "version": "0.0.7" }, "last_serial": 5694314, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "0640bf4b2fb004d8da6f1411ff3175cc", "sha256": "55d9bd98b8a2bd767d83a21d727a3f7f1b278830c210b359b3b7fa8ca4474607" }, "downloads": -1, "filename": "sagemaker_knockout-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "0640bf4b2fb004d8da6f1411ff3175cc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3521, "upload_time": "2019-08-17T20:44:19", "url": "https://files.pythonhosted.org/packages/93/c6/587e86b097e6e022432f5ad33d411e2281f01533400808de04c9470fb5b4/sagemaker_knockout-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "902a131a2e119b9f13c1905dcba06d7d", "sha256": "ac3d6de93b9fb55ff309f1ef409d27de454846e1936f08bcf67f55952bf45cd7" }, "downloads": -1, "filename": "sagemaker-knockout-0.0.1.tar.gz", "has_sig": false, "md5_digest": "902a131a2e119b9f13c1905dcba06d7d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2077, "upload_time": "2019-08-17T20:44:21", "url": "https://files.pythonhosted.org/packages/3e/d6/06b0fef2de0a779d31210f18e5a64f2f00f01cf3d79184a93537fb9694eb/sagemaker-knockout-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "604d3fdd8391f60d90cfc5427dd35090", "sha256": "497e76053d704f710949a9e17105d643c60b606cb5aa9eeb2eec7ad8e762fa56" }, "downloads": -1, "filename": "sagemaker_knockout-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "604d3fdd8391f60d90cfc5427dd35090", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3764, "upload_time": "2019-08-17T20:50:51", "url": "https://files.pythonhosted.org/packages/59/03/e8fe2b13bd306d4f47f64d5e49688cd73e630b651cc5689fa617bc6fcfd4/sagemaker_knockout-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b8ed106fb2d266ddff91123324f8a8b1", "sha256": "9102937960004cebb49f4411ec2ebc77bd448da69a044846b032317b488120e1" }, "downloads": -1, "filename": "sagemaker-knockout-0.0.2.tar.gz", "has_sig": false, "md5_digest": "b8ed106fb2d266ddff91123324f8a8b1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2109, "upload_time": "2019-08-17T20:50:55", "url": "https://files.pythonhosted.org/packages/f8/c5/08768fe4b77e386a3a901109b90f82e34d4c69f4b60121b14de0b0e6502f/sagemaker-knockout-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "498e4dffc8d1a66aad13ab1ec6b786fe", "sha256": "77268a5c53e3b071d165a78454c337697becede6764b66c5c1ebb574c6014d86" }, "downloads": -1, "filename": "sagemaker_knockout-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "498e4dffc8d1a66aad13ab1ec6b786fe", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3790, "upload_time": "2019-08-17T20:56:28", "url": "https://files.pythonhosted.org/packages/0e/40/60caed7f7863b9aba14b464b4ca3ad9757000519a07c967d8b9f599b18cc/sagemaker_knockout-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "895f434aeb6798b8a62cf80f24920725", "sha256": "affe9c857335b8709b501a35920ed4b30d0e18a3e5dd63aabab904df29aefb5c" }, "downloads": -1, "filename": "sagemaker-knockout-0.0.3.tar.gz", "has_sig": false, "md5_digest": "895f434aeb6798b8a62cf80f24920725", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2125, "upload_time": "2019-08-17T20:56:30", "url": "https://files.pythonhosted.org/packages/3b/1b/50e7d0922cdca68b11ff17de34752bbdeaa2d3af827d06c226539040f5a6/sagemaker-knockout-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "2938b059f3df7dd26949fc9a104e687e", "sha256": "915b413a791b8bd93b66b655f5f6c8abd16c57e52ebf2e6feaa0e6db55815bb4" }, "downloads": -1, "filename": "sagemaker_knockout-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "2938b059f3df7dd26949fc9a104e687e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4050, "upload_time": "2019-08-17T21:45:14", "url": "https://files.pythonhosted.org/packages/4a/8d/4a2d3d274b8b060c6018b150bf6e46d46fdc7f1df30c2ee8b658e5521d28/sagemaker_knockout-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ee60a4c8029a45d0ea347a6cef967173", "sha256": "cd1d2c36699ee7c9d8d270a605f27f2ed065fe45dc59bc9fd6b6c94c0014268a" }, "downloads": -1, "filename": "sagemaker-knockout-0.0.4.tar.gz", "has_sig": false, "md5_digest": "ee60a4c8029a45d0ea347a6cef967173", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2353, "upload_time": "2019-08-17T21:45:16", "url": "https://files.pythonhosted.org/packages/0e/ba/471436d816b31148e2886cfe26c0e5f14d31cf1680d65cc9604197a02301/sagemaker-knockout-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "68ae4e1b166bd926da5df9e0b1c8272b", "sha256": "79f95f8c365ff16cc8c98bd93581f18d2c881b44144f9c3e41a839d2c8b0935e" }, "downloads": -1, "filename": "sagemaker_knockout-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "68ae4e1b166bd926da5df9e0b1c8272b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4359, "upload_time": "2019-08-17T22:57:11", "url": "https://files.pythonhosted.org/packages/33/8c/7b0b5c4b5d6b1cc1eefc55795026281696dff3b50f943a504852e8fc0f46/sagemaker_knockout-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3574def2849c3b49f978534e7d6cece3", "sha256": "e39d0a77644925a3106003c64f786a9052da180af0cc42a88543609bad115d5a" }, "downloads": -1, "filename": "sagemaker-knockout-0.0.5.tar.gz", "has_sig": false, "md5_digest": "3574def2849c3b49f978534e7d6cece3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2730, "upload_time": "2019-08-17T22:57:12", "url": "https://files.pythonhosted.org/packages/d5/d4/6935894c76b31e3199c8d3c81b13da36e07f920a38b1b506640cf7325f8c/sagemaker-knockout-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "0b47f7c3399b2699675ed508e63281bf", "sha256": "8edb972a3abf3742b4d1c1dd90137614a0f2b5e02a213ecc02da002266cff65a" }, "downloads": -1, "filename": "sagemaker_knockout-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "0b47f7c3399b2699675ed508e63281bf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4486, "upload_time": "2019-08-18T08:34:38", "url": "https://files.pythonhosted.org/packages/44/ff/69db795871a55d5346cb78762a3b20144235f01aba16d59e7abded620478/sagemaker_knockout-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "737ae0dea85fc785d137613ee1173e90", "sha256": "20791b484903629e6d28b859e56c187cd76e4f93128b24f42d73e86ad8b466e6" }, "downloads": -1, "filename": "sagemaker-knockout-0.0.6.tar.gz", "has_sig": false, "md5_digest": "737ae0dea85fc785d137613ee1173e90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2827, "upload_time": "2019-08-18T08:34:40", "url": "https://files.pythonhosted.org/packages/f4/af/e9baa6584fbaa751b8e5b50436092999e6e38dcefcdea9ab91d38088c44a/sagemaker-knockout-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "aba5d2595ed5ee71317738a1cf7e4ba6", "sha256": "a6764da626697097b3314157e229c56c5aedd3e0fe40b1589cecf859a41dfc2e" }, "downloads": -1, "filename": "sagemaker_knockout-0.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "aba5d2595ed5ee71317738a1cf7e4ba6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5614, "upload_time": "2019-08-18T11:42:13", "url": "https://files.pythonhosted.org/packages/af/53/759cd2bd9e75d97fde49c96d16868682045bffcaf527ea4eb3be3c727c8c/sagemaker_knockout-0.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "de881e50299642bced7c45d0aec27362", "sha256": "748dae5cdd5349422f6262dcf4725d5cc0c9fc39dfb8c397990b959c3a68bdfe" }, "downloads": -1, "filename": "sagemaker-knockout-0.0.7.tar.gz", "has_sig": false, "md5_digest": "de881e50299642bced7c45d0aec27362", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3980, "upload_time": "2019-08-18T11:42:14", "url": "https://files.pythonhosted.org/packages/a2/42/116c6aa80056052a78f2153d937379d0e3cac82c9b96dc88ccae5bbc6d42/sagemaker-knockout-0.0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "aba5d2595ed5ee71317738a1cf7e4ba6", "sha256": "a6764da626697097b3314157e229c56c5aedd3e0fe40b1589cecf859a41dfc2e" }, "downloads": -1, "filename": "sagemaker_knockout-0.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "aba5d2595ed5ee71317738a1cf7e4ba6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5614, "upload_time": "2019-08-18T11:42:13", "url": "https://files.pythonhosted.org/packages/af/53/759cd2bd9e75d97fde49c96d16868682045bffcaf527ea4eb3be3c727c8c/sagemaker_knockout-0.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "de881e50299642bced7c45d0aec27362", "sha256": "748dae5cdd5349422f6262dcf4725d5cc0c9fc39dfb8c397990b959c3a68bdfe" }, "downloads": -1, "filename": "sagemaker-knockout-0.0.7.tar.gz", "has_sig": false, "md5_digest": "de881e50299642bced7c45d0aec27362", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3980, "upload_time": "2019-08-18T11:42:14", "url": "https://files.pythonhosted.org/packages/a2/42/116c6aa80056052a78f2153d937379d0e3cac82c9b96dc88ccae5bbc6d42/sagemaker-knockout-0.0.7.tar.gz" } ] }