{ "cells": [ { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# Info mode\n", "\n", "This notebook documents the capabilities of the MML info mode." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2024-01-17T13:38:33.101361Z", "start_time": "2024-01-17T13:38:28.657328Z" }, "collapsed": false }, "outputs": [], "source": [ "# giving no tasks will deliver no output information\n", "# side note: this is the default configuration when entering solely 'mml' allowing to test a successful installation\n", "!mml info tasks=none" ] }, { "cell_type": "markdown", "metadata": { "collapsed": false }, "source": [ "For further explanation we need some installed tasks, you may download and store them automatically by yourselves when running\n", "`mml create tasks=fake`. See the `create` mode tutorial for more details on this feature. Assume these tasks have been installed:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2024-01-17T13:38:55.202197Z", "start_time": "2024-01-17T13:38:50.614625Z" }, "collapsed": false }, "outputs": [], "source": [ "# giving some tasks will automatically present task information and create a sample grid\n", "!mml info tasks=fake" ] }, { "cell_type": "markdown", "metadata": { "collapsed": false }, "source": [ "The output provides us with an overview on the most important features of the tasks we used. Further it generated a sample grid with one image per task. Let's inspect that image:" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "ExecuteTime": { "end_time": "2024-01-17T13:40:05.880972Z", "start_time": "2024-01-17T13:40:05.823832Z" }, "collapsed": false }, "outputs": [], "source": [ "# the grid was placed here: /home/scholzpa/Documents/exp/mml_results/default/PLOTS/sample_grid/grid_0079.png. as can be seen by the log\n", "from IPython import display\n", "\n", "display.Image(\"/home/scholzpa/Documents/exp/mml_results/default/PLOTS/sample_grid/grid_0079.png\")" ] }, { "cell_type": "markdown", "metadata": { "collapsed": false }, "source": [ "Be aware that the default preprocessing configuration has been applied!" ] }, { "cell_type": "markdown", "metadata": { "collapsed": false }, "source": [ "Info mode further support inspecting\n", " - trained models,\n", " - study results of a (persistent!) hyperparameter optimization\n", "\n", "Use the respective `mode.subroutines` when calling `mml` and either specify the study or reuse some models\n" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "ExecuteTime": { "end_time": "2024-01-17T13:45:58.620828Z", "start_time": "2024-01-17T13:45:53.976626Z" }, "collapsed": false }, "outputs": [], "source": [ "!mml info mode.subroutines=[hpo] hpo=sql mode.study_name=pami2_fed_hpo_03" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2024-01-17T13:51:32.860491Z", "start_time": "2024-01-17T13:51:28.385345Z" }, "collapsed": false }, "outputs": [], "source": [ "!mml info mode.subroutines=[models] reuse.models=test tasks=fake" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.6" } }, "nbformat": 4, "nbformat_minor": 0 }