Production on Databricks
Run Engine in a single-node GPU Lakeflow Job. Use MLflow for tracking and Unity Catalog for model registration and retained artifacts.
Prepare Databricks
Adapt the following steps to your workspace configuration. This guide uses dedicated, single-node GPU compute and the MLflow Unity Catalog registration path.
Provision resources
- Choose a compatible GPU runtime from Databricks setup.
- Size the node using GPU sizing. Include CPU, RAM, GPU memory and local SSD capacity. For example, the guidance for 100 GiB of source Parquet recommends 32 vCPUs, at least 150 GiB RAM and 400 GiB free local SSD scratch, increasing to 800 GiB for graphs with many edges. GPU memory depends on the model.
- Place scratch on the node’s local SSD and retained artifacts in a Unity Catalog volume. Network storage and cloud block volumes are not supported as Engine working storage.
- Provision a run-as service principal, an MLflow experiment, a model namespace, an artifact volume and an output schema. Identify the source tables the job will read.
Configure access
-
Grant the run-as identity the permissions needed for its tasks:
-
Configure the connector’s SQL warehouse or cluster query target using Databricks connectors. This query target is separate from the GPU job compute.
-
Configure authentication through the job identity or managed secrets. Use the service principal for scheduled execution rather than notebook-user credentials.
Install dependencies
- Follow the runtime-specific preparation in Install Kumo. Select an Engine build compatible with the runtime and containing the MLOps APIs used by the job.
- Add
kumo-engine[databricks,mlflow]to the job’s Python library requirements. Thedatabricksextra supplies the connector and Databricks SDK; themlflowextra supplies MLflow tracking dependencies and GPU metrics support. Use the same approved package version for training and scoring. - Add the
s3extra if the job reads S3 through the Engine connector:kumo-engine[databricks,mlflow,s3]. Include any other source-specific extras identified in the connector setup. - Install these requirements on job compute. For notebook tasks, follow the installation guide’s Python restart instructions after changing packages.
- Run the setup guide’s import and GPU check in the job environment. Record the installed versions with the deployment configuration.
Prepare the model and prediction script
-
Select an evaluated model and retain its complete bundle, exact version and required text embedding assets. Store these outside temporary scratch. See Publish and Retrieve Models.
-
Move the working prediction code into
predict_batch.py, including imports, connector setup, graph definitions and predictive-query definitions. The production script illustrates the structure; replace its Snowflake connectors with your Databricks connectors. -
Supply the following inputs through your script arguments or job configuration:
These are application inputs, not built-in Engine CLI flags. A model bundle does not contain the source data or graph snapshot.
-
Load the model and build or reload the intended snapshot. Regenerate the prediction population for the batch.
-
Call
Trainer.predictinside the Kumo MLOps context to retain prediction records for monitoring. Configure a durable artifact root and MLflow tracking destination. -
Export predictions to the attempt destination. Check the saved keys, population and task-specific row counts before making the output available to the application.
Deploy the job
- Create a Python task in Lakeflow Jobs that runs
predict_batch.py. - Configure its run-as identity, GPU compute, Python libraries and application inputs. Start with one concurrent run.
- Set a task timeout and failure notifications. Add bounded retries after configuring duplicate-safe output delivery.
- Run the job manually from fresh compute. Review the terminal job status, saved predictions, MLflow run and Kumo prediction records.
- Measure peak RAM, GPU memory, scratch use and job duration with representative data. Adjust node capacity before increasing concurrency. Additional workers do not automatically distribute an Engine graph.
- Test an interrupted run and retry before publishing its output. Keep the same model, data version, population and prediction anchor across attempts. Only one attempt should be accepted for each logical batch.
The job runs under the service principal and requires access to the saved model, prediction output location, and MLflow and Kumo tracking stores.
Schedule predictions and monitor results
- Schedule the job after the upstream data refresh, or configure a dependency on the refresh task.
- Record the model version, data or snapshot version, prediction anchor, batch identifier, accepted output location and job status together.
- Configure operational alerts for failed jobs and missed freshness deadlines. Track job duration, resource use and requested, scored and skipped rows.
- Compute score drift from retained Kumo prediction records. Evaluate model performance when labels become available and the prediction outcome window has completed.
- Export monitoring results to governed tables and configure their refresh schedule, alert thresholds and responsible operator.
Job logs describe execution health; drift and labeled outcomes describe model behavior. Investigate data freshness and population changes before deciding to retrain. Spark UDF or pyfunc scoring does not automatically create Kumo prediction records and can require a full snapshot per executor.
For output delivery, keep each attempt separate until validation succeeds. Publish the accepted location once per batch and retain the previous accepted output on failure. See Schedule Prediction Jobs.
Promote and refresh models
- Train and register a candidate without changing the production alias.
- Compare the candidate with the current model using the same evaluation population and outcome definition.
- Run the candidate in the production job environment, then promote the accepted version. Record the exact version used for each prediction batch.
- Retain the previous model, embedding assets and runtime configuration. To roll back, select that version for subsequent jobs and restore the previous accepted output where needed.
Follow MLOps workflows on Databricks to separate training, validation, promotion and inference. See Refresh a Model for refresh cadence and evaluation guidance.
Assign ISV operating responsibilities
-
Assign the following responsibilities before deployment:
-
For ISV-operated environments, separate customer credentials, artifact roots, outputs and execution resources. A shared Python process does not provide tenant isolation.
-
Store credentials in managed secrets or use workload identity. Define credential rotation and revocation procedures, and exclude tokens and customer rows from diagnostic logs.
-
Agree on compute ownership, artifact retention and deletion permissions.