#set tracking uri mlflow.set_tracking_uri(uri = "http://127.0.0.1:8080") #create an instance of a PandasDataset dataset = mlflow.data.from_pandas( eval_data, source = 'kaggle', name = "ds_salaries", targets = "salary") #create a new MLflow Experiment mlflow.set_experiment("Salary Prediction") #start an MLflow run with mlflow.start_run(run_name = "salary_baseline_regression") as run: #log the dataset mlflow.log_input(dataset, context = "training") #log the hyperparameters mlflow.log_params(params) #log pngs mlflow.log_artifact('Result.png') #set a tag that we can use to remind ourselves what this run was for mlflow.set_tag("Model Type", "Baseline") #log the model model_info = mlflow.sklearn.log_model( sk_model = regr, artifact_path = 'model', signature = infer_signature(X_train, regr.predict(X_train)), input_example = X_train, registered_model_name = "salary_baseline_regression") model_uri = mlflow.get_artifact_uri("model") #create the model uri and evalute the model result = mlflow.evaluate(model = model_uri, data = dataset, model_type = "regressor", evaluators=["default"])