GDS Sessions

GDS Sessions are currently in Early Access and not available by default. Contact your account manager to get the feature enabled.

A GDS Session is an on-demand ephemeral compute environment for running GDS workloads. It is offered as part of Neo4j Aura, a fast, scalable, always-on, fully automated cloud graph platform.

A GDS Session reads data from a Neo4j DBMS through a remote projection, runs computations on the projected graph, and optionally writes the results back to the DBMS using remote write-back.

GDS Session management

GDS Sessions, unlike GDS plugin, do not require any installation to a Neo4j DBMS. Instead, a GDS Session is started on-demand to perform GDS computations. To start a GDS Session, use the latest version of the GDS Python Client.

Using the client, it is possible to perform all operations on a GDS Session. For a comprehensive API overview including examples and tutorials, see the GDS Python Client manual.

Session lifecycle operations

  • Create GDS Sessions connected to an AuraDB instance in the Virtual Dedicated Cloud plan.

  • Create GDS Sessions connected to a self-hosted Neo4j DBMS, version 5.24.0 or newer.

  • List running sessions in a specific Aura project.

  • Delete specific sessions.

GDS workloads

  • Perform GDS algorithm computations[1], including all execution modes.

  • Train machine learning models[1].

  • Run machine learning prediction pipelines[1].

Results processing

  • Write back results to a Neo4j DBMS.

  • Stream back results, to

    • the GDS Python Client.

    • an Arrow client for the GDS Arrow Server.

Projecting a graph into a GDS Session

Once you have a GDS Session, you can project a graph into it. This operation is called remote projection because the data source is not a co-located database, but rather a remote one.

A remote projection is similar to a Cypher projection and has a similar syntax. The projection query runs on the database server, but the GDS graph appears in the GDS Session’s Graph Catalog. A key difference is also the name of the aggregating function, which is gds.graph.project.remote.

The standard ways to project a graph with GDS plugin (Native projections, Cypher projections, Legacy Cypher projections) are not supported in GDS Sessions. The projection must be triggered from the data source, which is a Neo4j DBMS or a client of the GDS Arrow Server (see Apache Arrow projection).

Writing back data to a Neo4j DBMS

The GDS Session’s in-memory graph is projected from data in a Neo4j DBMS, either an AuraDB instance or a self-managed server. Write-back operations will persist the data back to the same Neo4j DBMS server. Once all desired results have been written back to the database, the GDS Session can be deleted with no data loss.

Limitations

  • Native projections are not supported, including

    • gds.graph.project

    • gds.graph.project.estimate

  • Cypher projections are not supported, including

    • gds.graph.project (the aggregating function)

  • Legacy Cypher projections are not supported, including

    • gds.graph.project.cypher

    • gds.graph.project.cypher.estimate

  • Model Catalog is supported with limitations:

    • Trained models can only be used for prediction using the same Session in which they were trained. After the Session is deleted, all trained models will be lost.

    • Model publishing is not supported, including

      • gds.model.publish

    • Model persistence is not supported, including

      • gds.model.store

      • gds.model.load

      • gds.model.delete

  • Topological Link Prediction algorithms are not supported, including

    • gds.alpha.linkprediction.adamicAdar

    • gds.alpha.linkprediction.commonNeighbors

    • gds.alpha.linkprediction.preferentialAttachment

    • gds.alpha.linkprediction.resourceAllocation

    • gds.alpha.linkprediction.sameCommunity

    • gds.alpha.linkprediction.totalNeighbors

  • Graph export is not supported, including

    • gds.graph.export

    • gds.graph.export.csv

    • gds.graph.export.csv.estimate

  • Backup & Restore is not supported, including

    • gds.backup

    • gds.restore


1. See Limitations