Checking if a model exists

This feature is in the beta tier. For more information on feature tiers, see API Tiers.

We can check if a model is available in the catalog by looking up its name.

1. Syntax

Check if a model exists in the catalog:
CALL gds.beta.model.exists(modelName: String)
YIELD
    modelName: String,
    modelType: String,
    exists: Boolean
Table 1. Parameters
Name Type Default Optional Description

modelName

String

n/a

no

The name of a model.

Table 2. Results
Name Type Description

modelName

String

The name of a model.

modelType

String

The type of the model.

exists

Boolean

True, if the model exists in the model catalog.

2. Example

In this section we are going to demonstrate the usage of gds.beta.model.exists. Assume we trained a model by running train on one of our Machine learning algorithms.

Check if a model exists in the catalog:
CALL gds.beta.model.exists('my-model');
Table 3. Results
modelName modelType exists

"my-model"

"graphSage"

true