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.
Latihan ini adalah bagian dari kursus
Introduction to MLflow
Petunjuk latihan
- 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_stringfilter string variable.
Latihan interaktif praktis
Cobalah latihan ini dengan menyelesaikan kode contoh berikut.
# 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(____.____(____=____))