Publishing models

By default, a trained model is visible to the user that created it. Making a model accessible to other users can be achieved by publishing it.

1. Syntax

Publish a model from the catalog:
CALL gds.alpha.model.publish(modelName: String)
YIELD
    modelInfo: Map,
    trainConfig: Map,
    graphSchema: Map,
    loaded: Boolean,
    stored: Boolean,
    creationTime: DateTime,
    shared: Boolean
Table 1. Parameters
Name Type Default Optional Description

modelName

String

n/a

no

The name of a model stored in the catalog.

Table 2. Results
Name Type Description

modelInfo

Map

Detailed information about the trained model. Always includes the modelName and modelType, e.g., GraphSAGE. Dependent on the model type, there are additional fields.

trainConfig

Map

The configuration used for training the model.

graphSchema

Map

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

creationTime

Datetime

Time when the model was created.

shared

Boolean

True, if the model is shared between users.

2. Examples

Publishing trained model:
CALL gds.alpha.model.publish('my-model')
YIELD modelInfo, loaded, shared, stored
RETURN modelInfo.modelName AS modelName, shared
Table 3. Results
modelName shared

"my-model_public"

true

We can see that the model is now shared. The shared model has the _public suffix.