Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel
Integration:  git
85ae758104
add models the 5 models
10 months ago
85ae758104
add models the 5 models
10 months ago
85ae758104
add models the 5 models
10 months ago
85ae758104
add models the 5 models
10 months ago
85ae758104
add models the 5 models
10 months ago
f04ca48a04
Initial commit
10 months ago
85ae758104
add models the 5 models
10 months ago
Storage Buckets

README.md

You have to be logged in to leave a comment. Sign In

Make Predictions

Find run_id in the file MLmodel

Predict on a Spark DataFrame:

import mlflow
from pyspark.sql.functions import struct, col
logged_model = 'runs:/{run_id}/catboost_model'


# Load model as a Spark UDF. Override result_type if the model does not return double values.
loaded_model = mlflow.pyfunc.spark_udf(spark, model_uri=logged_model, result_type='double')

# Predict on a Spark DataFrame.
df.withColumn('predictions', loaded_model(struct(*map(col, df.columns))))

Predict on a Pandas DataFrame:

import mlflow
logged_model = 'runs:/{run_id}/catboost_model'

# Load model as a PyFuncModel.
loaded_model = mlflow.pyfunc.load_model(logged_model)

# Predict on a Pandas DataFrame.
import pandas as pd
loaded_model.predict(pd.DataFrame(data))
Tip!

Press p or to see the previous file or, n or to see the next file

About

No description

Collaborators 1

Comments

Loading...