Get startedGet started for free

Searching Models

As the MLFlow Model Registry grows and you collaborate with other users, you need to be able to search the Model Registry for models that fit certain criteria.

In this exercise, you will create two filter strings to search the MLflow Model Registry for Models. The first filter string searches for all "Insurance" Models and the second filter string searches Non-"Insurance" Models.

Models have already been created by other collaborators using the same MLflow Model Registry and an instance of the MLflow Client module will already be set as client.

client = mlflow.MlflowClient()

The MLflow Client module will be imported.

This exercise is part of the course

Introduction to MLflow

View Course

Exercise instructions

  • Create a filter string that finds all models with a name prefix 'Insurance'.
  • Search the Model Registry using the insurance_filter_string.
  • Create a filter that finds models that are not equal to the name 'Insurance'.
  • Search the Registry with not_insurance_filter_string filter string variable.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Insurance filter string
insurance_filter_string = "____ ____ '____'"

# Search for Insurance models
print(____.____(____=____))

# Not Insurance filter string
not_insurance_filter_string = "____ ____ '____'"

# Search for non Insurance models
print(____.____(____=____))
Edit and Run Code