Install Kumo Engine in a Snowflake Notebook
Run Kumo in your Snowflake notebook’s Python process, using Snowflake tables as the source for a local graph. The notebook runtime supplies the Snowflake identity, so you do not need a Kumo account or API key. This guide prepares the environment and connector for the Snowflake TPC-H notebook example.
Prerequisites
Use Snowflake GPU Container Runtime 2.9 with Python 3.12. Choose an x86 compute pool and review GPU sizing and working storage.
Your notebook role needs access to:
- Package access through Snowflake Artifact Repository or a PyPI external access integration.
- The query warehouse, database, schema, and source tables you plan to read.
- Output tables or a model registry if you plan to publish results there.
The compute pool runs the notebook, graph ingestion, and model computation. The query warehouse supplies Snowflake SQL compute for source access. They are separate resources.
Refer to Snowflake’s compute pool configuration.
Installation Methods
Install Kumo Engine with the Snowflake extra in a notebook cell before importing it:
Follow Snowflake’s container runtime package guidance. Restart the kernel if prompted after installation. After a restart, rerun the import, scratch configuration, and connector cells below.
Installation Verification
Verify the installed packages and GPU access before configuring storage:
Save this output when reporting an installation problem.
This check verifies package imports and a built-in PyTorch CUDA operation. It does not verify source access or a full training job.
If the check fails, confirm that your package build is compatible with the runtime’s PyTorch and CUDA versions.
Configure Working Storage
Choose a writable directory on local storage with room for staged source data, the graph index, training artifacts, and predictions.
The example uses /tmp/kumoai-local. Confirm that this path is on the intended working disk in your compute pool, or replace it with the appropriate local path.
A directory name alone does not identify its storage backing.
Run the following cell to check write access and available space, then configure the scratch directory:
This checks write access and available space, not whether an entire workload fits.
Keep source data in Snowflake and export results you need beyond the runtime’s storage lifetime. Refer to Publish and Retrieve Models and Make Predictions.
Connect Your Data
Prepare the views described in the Snowflake TPC-H notebook example. Replace the example warehouse, database, and schema below with the target warehouse, database, and schema for those views:
from_spcs_env() creates both the connector and its identity from the runtime’s account, host, and mounted OAuth token.
Do not copy the token into the notebook.
The environment must provide the Snowflake runtime credentials. An active Snowpark session by itself is not sufficient.
If the helper reports missing runtime credentials, check that the notebook is running in the intended container environment. Refer to Snowflake’s service-user credential documentation.
Inspect the catalog and one table’s schema to verify source access:
For the example, the schema must contain CUSTOMER, PART, ORDERS, and LINEITEM with the columns specified in the notebook, including the synthetic LINEITEM_ID column in the LINEITEM view.
Use the source table names and casing reported by your connector.
A successful schema read establishes access to that table’s metadata. The later graph snapshot reads and stages the table’s data.
Next Steps
Continue to the Snowflake TPC-H notebook example.