Listing models

Information about models in the catalog can be retrieved using the gds.model.list() procedure.

Syntax

List models from the catalog:
CALL gds.model.list(modelName: String)
YIELD
    modelName: String,
    modelType: String,
    modelInfo: Map,
    creationTime: DateTime,
    trainConfig: Map,
    graphSchema: Map,
    loaded: Boolean,
    stored: Boolean,
    published: Boolean
Table 1. Parameters
Name Type Default Optional Description

modelName

String

n/a

yes

The name of a model. If not specified, all models in the catalog are listed.

Table 2. Results
Name Type Description

modelName

String

Name of the model.

modelType

String

Type of the model. Indicates what training algorithm was used to train the model.

modelInfo

Map

Detailed type-specific information about the trained model.

creationTime

Datetime

Time when the model was created.

trainConfig

Map

Train configuration used for training the model.

graphSchema

Map

Schema of the graph on which the model was trained.

loaded

Boolean

True, if the model is loaded in the in-memory model catalog.

stored

Boolean

True, if the model is stored on disk.

published

Boolean

True, if the model has been published.

Examples

In this section we will illustrate how to list models in the model catalog. For simplicity, we will assume that two models named my-model1 and my-model2 have already been trained and exist in the model catalog.

Listing all models

The simplest case is to list all models. This can be done by calling gds.model.list() without any parameters.

Listing information about all models:
CALL gds.model.list()
YIELD modelName, modelType, modelInfo, loaded, stored, published
Table 3. Results
modelName modelType modelInfo loaded stored published

"my-model1"

"example-model-type"

{exampleModelInfo="exampleValue"}

true

false

false

"my-model2"

"example-model-type"

{number=42}

true

false

false

Because this model is just an example, we omit its training details.

Listing a specific model

We can also request to list details about a specific model only. This is done by supplying the model name as parameter to the procedure.

Listing information about a specific model:
CALL gds.model.list('my-model1')
YIELD modelName, modelType, modelInfo, loaded, stored, published
Table 4. Results
modelName modelType modelInfo loaded stored published

"my-model1"

"example-model-type"

{exampleModelInfo="exampleValue"}

true

false

false