Removing models
This feature is in the beta tier. For more information on feature tiers, see API Tiers.
If we no longer need a trained model and want to free up memory, we can remove the model from the catalog.
1. Syntax
CALL gds.beta.model.drop(modelName: String, failIfMissing: Boolean)
YIELD
modelInfo: Map,
trainConfig: Map,
graphSchema: Map,
loaded: Boolean,
stored: Boolean,
creationTime: DateTime,
shared: Boolean
Name | Type | Default | Optional | Description |
---|---|---|---|---|
modelName |
String |
|
no |
The name of a model stored in the catalog. |
failIfMissing |
Boolean |
|
yes |
By default, the library will raise an error when trying to remove a non-existing model. When set to |
Name | Type | Description |
---|---|---|
modelInfo |
Map |
Detailed information about the trained model. Always includes the |
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. Example
In this section we are going to demonstrate the usage of gds.beta.model.drop
.
Assume we trained a model by running train
on one of our Machine learning algorithms.
CALL gds.beta.model.drop('my-model')
YIELD modelInfo, loaded, shared, stored
RETURN modelInfo.modelName AS modelName, loaded, shared, stored
modelName | loaded | shared | stored |
---|---|---|---|
|
|
|
|
In this example, the removed my-model
was of the imaginary type some-model-type
.
The model was loaded in-memory, but neither stored on disk nor published.
If the model name does not exist, an error will be raised. |
Was this page helpful?