cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Is Model Registry possible in Databricks Free Edition?

xyz999
New Contributor II

Has anyone registered a Model in Databricks Free Edition? It seems not working or not available in Free Edition.



5 REPLIES 5

Advika
Databricks Employee
Databricks Employee

Hello @xyz999!

Yes, this is a supported feature. You can register models in Databricks Free Edition using the MLflow Model Registry.

You can refer to the official documentation here:
https://docs.databricks.com/gcp/en/mlflow#model-registry-with-unity-catalog
https://docs.databricks.com/gcp/en/machine-learning/manage-model-lifecycle/

xyz999
New Contributor II

Hello Advika, I followed the documentation and had the following code/model, I keep getting this error ;
[CONFIG_NOT_AVAILABLE] Configuration spark.mlflow.modelRegistryUri is not available. SQLSTATE: 42K0I
Any help would be greatly appreciated.


MyCode:
# Import necessary libraries
import pandas as pd
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import accuracy_score
import mlflow
import mlflow.sklearn


# Load the Iris dataset
iris = load_iris()
X = pd.DataFrame(iris.data, columns=iris.feature_names)
y = pd.Series(iris.target)


# Split the dataset
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)


# Optional: Enable MLflow autologging
mlflow.sklearn.autolog()


# Start MLflow run
with mlflow.start_run() as run:
# Train model
clf = RandomForestClassifier(n_estimators=100, random_state=42)
clf.fit(X_train, y_train)


# Predict and evaluate
predictions = clf.predict(X_test)
acc = accuracy_score(y_test, predictions)
print(f"Accuracy: {acc}")


# Capture run ID
run_id = run.info.run_id
print(f"MLflow Run ID: {run_id}")


# Get model URI
model_uri = f"runs:/{run_id}/model"
model_name = "IrisClassifierModel"


# Register the model
mlflow.register_model(model_uri=model_uri, name=model_name)
print(f"Model registered as '{model_name}'")


# Done
print("Model training, logging, and registration complete.")

 

 

xyz999
New Contributor II

Does anyone have any input to this. It looks like S3 issue, model registry does not really work in Free Edition, documentation does not seem correct. 

SP_6721
Contributor III

Hi @xyz999 

Have you tried to upgrade to models in Unity Catalog:

import mlflow
mlflow.set_registry_uri("databricks-uc")

xyz999
New Contributor II

Yes, if I use UC it gives this error:
MlflowException: The following failures occurred while uploading one or more artifacts to s3 โ€ฆ 'S3UploadFailedError(\'Failed to upload /local_disk0/repl_tmp_data โ€ฆ