Aan de slagGa gratis aan de slag

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.

Deze oefening maakt deel uit van de cursus

Introduction to MLflow

Cursus bekijken

Oefeninstructies

  • 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.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# 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(____.____(____=____))
Code bewerken en uitvoeren