I am creating an mlflow experiment which logs a logistic regression model together with a metric and an artifact.
import mlflow
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import precision_recall_fscore_support
with mlflow.start_run(run_name=run_name, experiment_id=experiment_id):
logreg = LogisticRegression()
logreg.fit(x_train, y_train)
print('training over', flush=True)
y_pred = logreg.predict(x_test)
mlflow.sklearn.log_model(logreg, "model")
mlflow.log_metric("f1", precision_recall_fscore_support(y_test, y_pred, average='weighted')[2])
mlflow.log_artifact(x_train.to_csv('train.csv')
for some data (x_train, y_train, x_test, y_test
)
Is there any way to access the artifacts for that specific experiment_id for this run_name and read the train.csv
and also read the model
?