Home > Back-end >  Multiple artifact paths when logging a model using mlflow and sklearn
Multiple artifact paths when logging a model using mlflow and sklearn

Time:06-23

I'm using mlflow to log parameters and artifacts of a Logistic Regression, but when I try to log the model so I can see all the files in the Mlflow UI, I see two folders: one named 'model' and the other one named 'logger' (the one I set).

model = LogisticRegression()

mlflow.set_tracking_uri('file:///artifacts')
mlflow.set_experiment('test')
mlflow.autolog()

with mlflow.start_run(run_name=run_name) as run:
   model.train(X_train, y_train)
   mlflow.sklearn.log_model(model, 'logreg')

enter image description here

Not sure if I'm missing something or if there's a configuration for that.

I hope someone out there can help me!

CodePudding user response:

You have set autolog and you are also logging the model explicitly. Remove one and then try.

  • Related