Skip to content

Instantly share code, notes, and snippets.

@nlauchande
Last active September 1, 2019 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nlauchande/b79726283a70732260e5c15396ccbb55 to your computer and use it in GitHub Desktop.
Save nlauchande/b79726283a70732260e5c15396ccbb55 to your computer and use it in GitHub Desktop.
with mlflow.start_run():
LogReg_pipeline.fit(X_train, train["label"])
# compute the testing accuracy
prediction = LogReg_pipeline.predict(X_test)
accuracy = accuracy_score(test["label"], prediction)
mlflow.log_metric("model_accuracy", accuracy)
mlflow.sklearn.log_model(LogReg_pipeline, "LogisticRegressionPipeline")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment