Skip to content

Dev Cheat Sheet

Harutaka Kawamura edited this page Oct 19, 2023 · 4 revisions

Cheat Sheet

Git

Skip git commit hooks:

git commit -n -s -m "commit message"

Pip

Install merged version of PR 123:

pip install git+https://github.com/mlflow/mlflow.git@refs/pull/123/merge

Install unmerged version of PR 123:

pip install git+https://github.com/mlflow/mlflow.git@refs/pull/123/head

UI

Launch MLflow UI with the latest mlflow:

docker run --rm -w /mlflow -v $(pwd)/mlruns:/mlflow/mlruns -p 5000:5000 python:3.8 bash -c 'pip install mlflow && mlflow server --host 0.0.0.0 --gunicorn-opts "--log-level debug"'

R

# Run R in interactive mode. Useful when testing R code.
docker run --rm -it rocker/r-ver

pytest

https://docs.pytest.org/en/6.2.x/usage.html#specifying-tests-selecting-tests

Debugging issues

The condaforge/miniforge3 image is useful when debugging errors without polluting the local environment:

docker run -it --rm -w /mlflow -v $(pwd):/mlflow condaforge/miniforge3

Run a.py with the latest version of mlflow:

docker run --rm -w /mlflow -v $(pwd)/a.py:/mlflow/a.py python:3.8 bash -c "pip install mlflow && python a.py"
Clone this wiki locally