Annoying MLFlow Artifact Servicing Tutorial Windows Bug

So I was following the otherwise excellent MLFlow official tutorial on Windows and keep running into this annoying bug while attempting to serve the model:

mlflow.exceptions.MlflowException: Could not find a registered artifact repository for: c:/XXXX/XXXXX/data_mlflow/mlflow/examples/sklearn_elasticnet_wine/mlruns/0/
b02a6befa2824c339891b088803b723e/artifacts/model. Currently registered schemes are: [”, ‘file’, ‘s3’, ‘gs’, ‘wasbs’, ‘ftp’, ‘sftp’, ‘dbfs’, ‘hdfs’, ‘viewfs’, ‘runs’, ‘models’]”

I was like… WTF? I am following the official tutorial word by word without any typing and how could it brick???

It turned out to be an issue with MLFlow not handling path very well on Windows (probably should have used pathlib?

The issue as pointed in the GitHub issue here: https://github.com/mlflow/mlflow/issues/1193#issuecomment-490418110

As pointed out by enpinzolas, you should replace prefix “C:/xxxx” in the path string with “file://C:/xxxx”.

This fixed it for me and I was able to serve the training example properly.

In hindsight, the error message makes sense. “C:” was not in that list given. “file:” is. They REALLY should have better parsed that link.  Most likely because the nature of the adaptability. A small PR should be in order to fix this.