cancel
Showing results for 
Search instead for 
Did you mean: 
Machine Learning
Dive into the world of machine learning on the Databricks platform. Explore discussions on algorithms, model training, deployment, and more. Connect with ML enthusiasts and experts.
cancel
Showing results for 
Search instead for 
Did you mean: 

Mlflow Error in Databricks notebooks

AmanJain1008
New Contributor

Getting this error in experiments tab of databricks notebook.
There was an error loading the runs. The experiment resource may no longer exist or you no longer have permission to access it.

AmanJain1008_0-1692877356155.png

 

here is the code I am using

mlflow.tensorflow.autolog()
with mlflow.start_run(run_name = "sample_run_2") as run:
    mlflow.log_param("eval_result", 4)
    mlflow.log_param("new", 4)

 I am using a GPU cluster with 9.1 runtime and mlflow version in 1.28.0

1 REPLY 1

Kumaran
Databricks Employee
Databricks Employee

Hi @AmanJain1008,

Thank you for posting your question in the Databricks Community.

Could you kindly check whether you are able to reproduce the issue with the below code examples:

 

# Import Libraries
import pandas as pd
import numpy as np
import mlflow
import mlflow.sklearn

# Load Data
data = {'Feature1': np.random.rand(10), 'Feature2':np.random.rand(10), 'Label': np.random.randint(0,2,10)}
df = pd.DataFrame(data)

# Separating features and target variable
X = df[['Feature1','Feature2']]
y = df['Label']
import tensorflow as tf
# enabling autologging for TensorFlow
mlflow.tensorflow.autolog()

# Start an MLflow run with a specified run name
with mlflow.start_run(run_name="sample_run_2") as run:
  
  # Specify evaluations results and new process parameter values
  eval_result = 4
  new = 4

  # Log the evaluations results and new process parameter values
  mlflow.log_param("eval_result", eval_result)
  mlflow.log_param("new", new)
  
  # Train a model using TensorFlow
  model = tf.keras.Sequential([
      tf.keras.layers.Dense(10, input_shape=(X.shape[1],), activation='relu'),
      tf.keras.layers.Dense(1, activation='sigmoid'),
  ])
  
  model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
  model.fit(X, y, epochs=10, batch_size=1)

 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group