From 8030875516d1d72b2d27c520998d490a6f42736c Mon Sep 17 00:00:00 2001 From: RobertTLange Date: Wed, 8 Mar 2023 15:22:21 +0100 Subject: [PATCH] Update changelog --- CHANGELOG.md | 7 +++-- examples/getting_started.ipynb | 49 +++++++++++++++++----------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ab6e16..32aa122 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,9 @@ -## [v0.0.2] - [Unreleased] - -### Added +## [v0.0.2] - [03/2022] ### Changed -### Fixed +- Restructure requirements and installations. +- Update notebook. ## [v0.0.1] - [12/09/2021] diff --git a/examples/getting_started.ipynb b/examples/getting_started.ipynb index f1cc2f4..aeaaef8 100644 --- a/examples/getting_started.ipynb +++ b/examples/getting_started.ipynb @@ -1,6 +1,7 @@ { "cells": [ { + "attachments": {}, "cell_type": "markdown", "id": "08f9d077-64ed-4dc3-b772-498569e96d2b", "metadata": { @@ -8,7 +9,7 @@ }, "source": [ "# `mle-monitor`: Lightweight Resource Monitoring\n", - "### Author: [@RobertTLange](https://twitter.com/RobertTLange) [Last Update: December 2021][![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mle-infrastructure/mle-monitor/blob/main/examples/getting_started.ipynb)\n", + "### Author: [@RobertTLange](https://twitter.com/RobertTLange) [Last Update: March 2023][![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mle-infrastructure/mle-monitor/blob/main/examples/getting_started.ipynb)\n", "\n", "\"Did I already run this experiment before? How many resources are currently available on my cluster?\" If these are common questions you encounter during your daily life as a researcher, then `mle-monitor` is made for you. It provides a lightweight API for tracking your experiments using a pickle protocol database (e.g. for hyperparameter searches and/or multi-configuration/multi-seed runs). Furthermore, it comes with built-in resource monitoring on Slurm/Grid Engine clusters and local machines/servers. Finally, it leverages [`rich`](https://github.com/willmcgugan/rich) in order to provide a terminal dashboard that is updated online with new protocolled experiments and the current state of resource utilization. Here is an example of a dashboard running on a Grid Engine cluster:\n", "\n", @@ -121,11 +122,11 @@ { "data": { "text/html": [ - "
[15:37:51] INFO     Added experiment 1 to protocol.                       mle_protocol.py:162\n",
+       "
[15:19:55] INFO     Added experiment 1 to protocol.                       mle_protocol.py:170\n",
        "
\n" ], "text/plain": [ - "\u001b[2;36m[15:37:51]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m Added experiment \u001b[1;36m1\u001b[0m to protocol. \u001b]8;id=521006;file:///Users/rob/Dropbox/core-code/mle-infrastructure/mle-monitor/mle_monitor/mle_protocol.py\u001b\\\u001b[2mmle_protocol.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=364308;file:///Users/rob/Dropbox/core-code/mle-infrastructure/mle-monitor/mle_monitor/mle_protocol.py#162\u001b\\\u001b[2m162\u001b[0m\u001b]8;;\u001b\\\n" + "\u001b[2;36m[15:19:55]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m Added experiment \u001b[1;36m1\u001b[0m to protocol. \u001b]8;id=600704;file:///Users/rob/anaconda3/envs/mle-toolbox/lib/python3.9/site-packages/mle_monitor/mle_protocol.py\u001b\\\u001b[2mmle_protocol.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=954284;file:///Users/rob/anaconda3/envs/mle-toolbox/lib/python3.9/site-packages/mle_monitor/mle_protocol.py#170\u001b\\\u001b[2m170\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, @@ -183,7 +184,7 @@ " 'time_per_job': '00:05:00',\n", " 'num_cpus': 2,\n", " 'num_gpus': 1,\n", - " 'git_hash': '60cb3e3883da3888865b47abf0d5b6257e6d91e5',\n", + " 'git_hash': 'ef86aa6343db21998ba58942e3c5e5124d3463c1',\n", " 'loaded_config': [{'train_config': {'lrate': 0.1},\n", " 'model_config': {'num_layers': 5},\n", " 'log_config': {'time_to_track': ['step_counter'],\n", @@ -192,15 +193,15 @@ " 'what_to_print': ['loss'],\n", " 'print_every_k_updates': 10,\n", " 'overwrite_experiment_dir': 1}}],\n", - " 'e-hash': '897b974332747d81e84b3ed688f7862d',\n", + " 'e-hash': '1795b93d0ded1d5ab9c5a63243abe649',\n", " 'retrieved_results': False,\n", " 'stored_in_cloud': False,\n", " 'report_generated': False,\n", " 'job_status': 'running',\n", " 'completed_jobs': 0,\n", - " 'start_time': '12/09/21 15:37',\n", + " 'start_time': '03/08/23 15:19',\n", " 'duration': '0:10:00',\n", - " 'stop_time': '12/10/21 01:37'}" + " 'stop_time': '03/09/23 01:19'}" ] }, "execution_count": 5, @@ -232,7 +233,7 @@ "
                                                                                             \n",
        "  🔖   🆔     🗓     Project   Purpose         Type               CPU   GPU                 \n",
        " ────────────────────────────────────────────────────────────────────────────                \n",
-       "     1    12/09   MNIST     Test Protocol   search   Local   5    2     1                  \n",
+       "     1    03/08   MNIST     Test Protocol   search   Local   5    2     1                  \n",
        "                                                                                             \n",
        "
\n" ], @@ -240,7 +241,7 @@ "\u001b[34m \u001b[0m \n", "\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m🔖\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m🆔\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m 🗓 \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34mProject\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34mPurpose \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34mType \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;33m▶\u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;33m♻\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34mCPU\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34mGPU\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m \n", "\u001b[34m ──────────────────────────────────────────────────────────────────────────── \u001b[0m \n", - "\u001b[34m \u001b[0m \u001b[35m⠸ \u001b[0m \u001b[34m \u001b[0m 1 \u001b[34m \u001b[0m 12/09 \u001b[34m \u001b[0m MNIST \u001b[34m \u001b[0m Test Protocol \u001b[34m \u001b[0m search \u001b[34m \u001b[0m Local \u001b[34m \u001b[0m 5 \u001b[34m \u001b[0m 2 \u001b[34m \u001b[0m 1 \u001b[34m \u001b[0m \n", + "\u001b[34m \u001b[0m \u001b[35m⠙ \u001b[0m \u001b[34m \u001b[0m 1 \u001b[34m \u001b[0m 03/08 \u001b[34m \u001b[0m MNIST \u001b[34m \u001b[0m Test Protocol \u001b[34m \u001b[0m search \u001b[34m \u001b[0m Local \u001b[34m \u001b[0m 5 \u001b[34m \u001b[0m 2 \u001b[34m \u001b[0m 1 \u001b[34m \u001b[0m \n", "\u001b[34m \u001b[0m \n" ] }, @@ -251,19 +252,19 @@ "data": { "text/html": [ "
                                                                                             \n",
-       "  🔖   🆔     🗓     Project   Purpose         Type               CPU   GPU   ⏳ Completed  \n",
-       "                                                                                  Jobs      \n",
+       "                                                                               ⏳ Completed  \n",
+       "  🔖   🆔     🗓     Project   Purpose         Type               CPU   GPU      Jobs      \n",
        " ─────────────────────────────────────────────────────────────────────────────────────────── \n",
-       "     1    12/09   MNIST     Test Protocol   search   Local   5    2     1     0 /10    0%  \n",
+       "     1    03/08   MNIST     Test Protocol   search   Local   5    2     1     0 /10    0%  \n",
        "                                                                                             \n",
        "
\n" ], "text/plain": [ "\u001b[34m \u001b[0m\n", - "\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m🔖\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m🆔\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m 🗓 \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34mProject\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34mPurpose \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34mType \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;33m▶\u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;33m♻\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34mCPU\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34mGPU\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m⏳ Completed\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\n", - "\u001b[34m \u001b[0m \u001b[34m \u001b[0m \u001b[34m \u001b[0m \u001b[34m \u001b[0m \u001b[34m \u001b[0m \u001b[34m \u001b[0m \u001b[34m \u001b[0m \u001b[34m \u001b[0m \u001b[34m \u001b[0m \u001b[34m \u001b[0m \u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m Jobs \u001b[0m\u001b[1;33m✔\u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\n", + "\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m⏳ Completed\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\n", + "\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m🔖\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m🆔\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m 🗓 \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34mProject\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34mPurpose \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34mType \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;33m▶\u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;33m♻\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34mCPU\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34mGPU\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m Jobs \u001b[0m\u001b[1;33m✔\u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\n", "\u001b[34m ─────────────────────────────────────────────────────────────────────────────────────────── \u001b[0m\n", - "\u001b[34m \u001b[0m \u001b[35m⠼ \u001b[0m \u001b[34m \u001b[0m 1 \u001b[34m \u001b[0m 12/09 \u001b[34m \u001b[0m MNIST \u001b[34m \u001b[0m Test Protocol \u001b[34m \u001b[0m search \u001b[34m \u001b[0m Local \u001b[34m \u001b[0m 5 \u001b[34m \u001b[0m 2 \u001b[34m \u001b[0m 1 \u001b[34m \u001b[0m \u001b[37m 0 /10 \u001b[0m \u001b[35m 0%\u001b[0m \u001b[34m \u001b[0m\n", + "\u001b[34m \u001b[0m \u001b[35m⠙ \u001b[0m \u001b[34m \u001b[0m 1 \u001b[34m \u001b[0m 03/08 \u001b[34m \u001b[0m MNIST \u001b[34m \u001b[0m Test Protocol \u001b[34m \u001b[0m search \u001b[34m \u001b[0m Local \u001b[34m \u001b[0m 5 \u001b[34m \u001b[0m 2 \u001b[34m \u001b[0m 1 \u001b[34m \u001b[0m \u001b[37m 0 /10 \u001b[0m \u001b[35m 0%\u001b[0m \u001b[34m \u001b[0m\n", "\u001b[34m \u001b[0m\n" ] }, @@ -299,7 +300,7 @@ "
                                                                                             \n",
        "  🔖   🆔     🗓     Project   Purpose         Type               CPU   GPU                 \n",
        " ────────────────────────────────────────────────────────────────────────────                \n",
-       "      1    12/09   MNIST     Test Protocol   search   Slurm   5    2     1                  \n",
+       "      1    03/08   MNIST     Test Protocol   search   Slurm   5    2     1                  \n",
        "                                                                                             \n",
        "
\n" ], @@ -307,7 +308,7 @@ "\u001b[34m \u001b[0m \n", "\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m🔖\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m🆔\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m 🗓 \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34mProject\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34mPurpose \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34mType \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;33m▶\u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;33m♻\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34mCPU\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m\u001b[1;34m \u001b[0m\u001b[1;34mGPU\u001b[0m\u001b[1;34m \u001b[0m\u001b[34m \u001b[0m \n", "\u001b[34m ──────────────────────────────────────────────────────────────────────────── \u001b[0m \n", - "\u001b[34m \u001b[0m \u001b[31m✖\u001b[0m \u001b[34m \u001b[0m 1 \u001b[34m \u001b[0m 12/09 \u001b[34m \u001b[0m MNIST \u001b[34m \u001b[0m Test Protocol \u001b[34m \u001b[0m search \u001b[34m \u001b[0m Slurm \u001b[34m \u001b[0m 5 \u001b[34m \u001b[0m 2 \u001b[34m \u001b[0m 1 \u001b[34m \u001b[0m \n", + "\u001b[34m \u001b[0m \u001b[31m✖\u001b[0m \u001b[34m \u001b[0m 1 \u001b[34m \u001b[0m 03/08 \u001b[34m \u001b[0m MNIST \u001b[34m \u001b[0m Test Protocol \u001b[34m \u001b[0m search \u001b[34m \u001b[0m Slurm \u001b[34m \u001b[0m 5 \u001b[34m \u001b[0m 2 \u001b[34m \u001b[0m 1 \u001b[34m \u001b[0m \n", "\u001b[34m \u001b[0m \n" ] }, @@ -395,11 +396,11 @@ { "data": { "text/html": [ - "
[15:37:58] INFO     Added experiment 2 to protocol.                       mle_protocol.py:162\n",
+       "
[15:20:05] INFO     Added experiment 2 to protocol.                       mle_protocol.py:170\n",
        "
\n" ], "text/plain": [ - "\u001b[2;36m[15:37:58]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m Added experiment \u001b[1;36m2\u001b[0m to protocol. \u001b]8;id=660659;file:///Users/rob/Dropbox/core-code/mle-infrastructure/mle-monitor/mle_monitor/mle_protocol.py\u001b\\\u001b[2mmle_protocol.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=823242;file:///Users/rob/Dropbox/core-code/mle-infrastructure/mle-monitor/mle_monitor/mle_protocol.py#162\u001b\\\u001b[2m162\u001b[0m\u001b]8;;\u001b\\\n" + "\u001b[2;36m[15:20:05]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m Added experiment \u001b[1;36m2\u001b[0m to protocol. \u001b]8;id=818970;file:///Users/rob/anaconda3/envs/mle-toolbox/lib/python3.9/site-packages/mle_monitor/mle_protocol.py\u001b\\\u001b[2mmle_protocol.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=795665;file:///Users/rob/anaconda3/envs/mle-toolbox/lib/python3.9/site-packages/mle_monitor/mle_protocol.py#170\u001b\\\u001b[2m170\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, @@ -594,7 +595,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 10, "id": "fed9e8a7-74fd-4725-9bd6-31106018069d", "metadata": {}, "outputs": [], @@ -607,7 +608,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 11, "id": "0c53b8d0-0093-4de4-868b-40f0b0652322", "metadata": {}, "outputs": [ @@ -617,7 +618,7 @@ "dict_keys(['pid', 'p_name', 'mem_util', 'cpu_util', 'cmdline', 'total_cpu_util', 'total_mem_util'])" ] }, - "execution_count": 13, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -1274,7 +1275,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python3 (mle-toolbox)", + "display_name": "mle-toolbox", "language": "python", "name": "mle-toolbox" }, @@ -1288,7 +1289,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.6" + "version": "3.9.7" } }, "nbformat": 4,