> ## Documentation Index
> Fetch the complete documentation index at: https://kumo.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Compute Sessions

> Understand current Kumo SDK session behavior and shared-compute limitations

`kumoai.Session(compute=None)` is a no-op context manager. Shared backend compute sessions are not currently supported by the Kumo service.

The SDK still defines `ComputeType.DATABRICKS_JOB_CLUSTER`, but current Kumo deployments do not support starting shared-cluster sessions.

<Warning>
  Do not pass `ComputeType.DATABRICKS_JOB_CLUSTER` expecting the service to create or reuse a Databricks job cluster. The current service rejects shared-cluster session creation.
</Warning>

## Use the no-op context manager

`Session()` defaults to `compute=None`. You can keep it in shared notebooks or scripts without changing how the enclosed SDK operations run.

```python theme={null}
import kumoai as kumo

kumo.init(url="https://<customer_id>.kumoai.cloud/api", api_key="<api_key>")

with kumo.Session():
    training_table = pquery.generate_training_table(non_blocking=False)

    training_job = trainer.fit(
        graph=graph,
        train_table=training_table,
        non_blocking=False,
    )
```

Entering this context does not create a backend session. Each enclosed operation uses its normal compute lifecycle.

## No-op behavior

With `compute=None`, the context manager:

* does not request a backend session;
* does not create, reuse, release, or auto-expire shared compute;
* does not attach a shared session ID to SDK requests;
* returns control to the enclosed SDK operations without changing their behavior.

This can be useful for compatibility when the same code also runs against an environment or future deployment that supports another session implementation.

## Unsupported shared compute type

`ComputeType.DATABRICKS_JOB_CLUSTER` remains available in the SDK API, but it does not indicate that the active Kumo deployment can provide shared compute.

Passing this compute type causes the SDK to request a backend session. Current deployments reject that request because Databricks shared job-cluster sessions are no longer supported, and the SDK surfaces the failure as a `RuntimeError`.

```python theme={null}
# This compute type is defined by the SDK but unsupported by current deployments.
compute = kumo.ComputeType.DATABRICKS_JOB_CLUSTER
```

Keep `compute=None` unless Kumo documents shared-session support for your deployment.

## Migrating existing session code

If an existing workflow requests `DATABRICKS_JOB_CLUSTER`, remove that compute argument while shared sessions are unsupported:

```python theme={null}
# Current supported behavior: a no-op context manager.
with kumo.Session():
    trainer.fit(graph=graph, train_table=training_table)
```

Removing the compute argument does not make the enclosed operations share a cluster. It only allows them to run with their normal independent compute lifecycle.

## Related APIs

* `kumo.Session(compute=None)`: no-op context manager that does not create a backend session.
* `kumo.ComputeType.DATABRICKS_JOB_CLUSTER`: SDK enum value retained even though current deployments do not support shared-cluster sessions.
