sponsor Vim development Vim logo Vim Book Ad

vim-mlflow : Browse MLflow tracking results in Vim, including ASCII plots of metrics.

 script karma  Rating 0/0, Downloaded by 4  Comments, bugs, improvements  Vim wiki

created by
Andy Ganse
 
script type
utility
 
description
`Vim‑mlflow` is a lightweight Vim/NVim plugin that lets you browse and interact
with MLflow experiments, runs, metrics, parameters, tags, and artifacts directly
in your Vim editor.  It opens a dedicated sidebar and a detail pane so you can
explore data without leaving the terminal, even allowing you to plot metric
histories and browse non-graphical artifacts.  The plugin is written in
Vimscript with embedded Python and talks to MLflow through its Python API.
It works with both MLflow3.x and MLflow2.x ML tracking servers (but not the
GenAI traces/etc in MLflow3.x currently; feedback/demand can guide such future
steps).

Tested on Vim 8.2 - 9.1, NVim v0.11.5, and Python3.10 - 3.14.

## TL;DR
* Must run Vim/NVim in a python environment with `mlflow` installed.
* Vim must be a compiled-with-python version (check `vim --verison` for `+python3`);
  or for NVim just install the `pynvim` package in that python environment as well.
* Extract the zipfile into `~/.vim/bundle/vim-mlflow` (or your normal install location),
  or put `Plugin 'aganse/vim-mlflow'` or your package manager equivalent into your
  resource file to load plugin.
* At minimum set `let g:mlflow_tracking_uri = "http://<mlflow_trk_svr_host>:<port>";`
  in your resource file to your MLflow tracking server.  Other options listed below.
* Press `\m` (leader-key and `m`) to start the plugin, and press `?` in there to
  check the help listing for other keys.  Navigate with the standard vim movement
  keys, and "open" various items via `o` or `<enter>`.

## Usage
* Ensure you're in your python environment with MLflow before starting Vim.
* Press `\m` to start vim-mlflow (default setting, ie leader-key and m. or can
  use `:call RunMLflow()`).  You can update that leader/key mapping via
  `nnoremap <leader>m :call RunMLflow()<CR>`.
* Vim-mlflow opens a sidebar (`__MLflow__`) that lists all experiments on the
  connected MLflow server.
* Navigate the cursor around with the standard vim movement keys, and "open"
  various items via `o` or `<enter>` key.
* Select experiments to show their respective lists of runs; drill into runs to
  view metrics, parameters, tags, and artifacts. View ASCII plots of metric
  histories, and text artifacts inline.
* Open a run comparison pane (`__MLflowRuns__`) to compare metrics across
  multiple selected runs in multiple experiments.
* Press `?` in the sidebar for a full help listing of the keys map.

Additional detailed info is available about configuration options, troubleshooting,
and more in the README.md file found in this zipfile or in this plugin's Github repo
https://github.com/aganse/vim-mlflow
 
install details
#### 1. Check that your Vim supports python3:
- In Vim: `vim --version | grep +python3` (if no +python3 line is found, you
  must install a Vim build compiled with Python3.)
- In NVim you're good to go as long as you install pynvim in your python env
  down in 3 below.

#### 2. Highly recommended to create/use a python virtual environment:
- `python3 -m venv .venv`
- `source .venv/bin/activate  ## syntax for linux/mac`

#### 3. Install the `mlflow` Python package (and also `pynvim` for Nvim):
- `pip install mlflow` (in both Vim and NVim)
- In NVim you also need this package in your env to support the python:
  `pip install pynvim`

#### 4. Load Vim-mlflow in your Vim/NVim resource file:
- You can do "manually", e.g. extract zipfile into `~/.vim/plugin/vim-mlflow`,
  or for NVim add `set runtimepath+=~/.vim/plugin/vim-mlflow`
  to `~/.config/nvim/init.vim`.
- Or you can add the plugin to your plugin manager, e.g. using Vundle add
  `Plugin 'aganse/vim-mlflow'` to your resource file and run `:PluginInstall`.

#### 5. Set your config settings in your Vim/NVim resource file:
- Set your MLflow tracking URI.  Fyi the default is `http://localhost:5000`,
  which may be relevant for a simple local test setup, but often you'll have
  some other host and port to set:
  `let g:mlflow_tracking_uri = "http://<mlflow_trk_svr_host>:<port>";`

- The Configuration section has quite a list of settings (colors, characters,
  sizing, etc) that can be customized.

- For NVim you may need to set `setlocal nowrap` in your resource file - see
  last Troubleshooting tip below regarding line-wrap default in NVim affecting
  content layout.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-mlflow-1.0.2.zip 1.0.2 2025-12-22 8.2 Andy Ganse Initial upload
ip used for rating: 216.73.216.158

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github