In this article
An output-type setting changes the representation presented to consumers; it should be an explicit interface choice rather than inherited notebook state.
Begin with the next consumer’s requirements
A clustering pipeline feeds its labels into a GPU feature calculation in one environment and a pandas report in another. Both routes may use the same trained estimator while needing different output representations. The cuML output-configuration reference lists array and dataframe output choices. Determine which representation the next consumer actually accepts before relying on whatever type happens to appear in an interactive notebook.
Make the configuration scope visible
The global setting affects function and estimator outputs, including fitted attributes. The context configuration reference provides a scoped alternative. Use a scope that matches the intended interface and verify the installed behavior when combining settings. A utility that changes a global preference can affect later consumers that did not request the change. Preserve the surrounding configuration rather than assuming a notebook is always started from a clean state.
Inspect the estimator’s own contract
The KMeans reference documents an estimator-level output_type parameter and the use of module configuration when that value is not specified. Check the relevant estimator and method rather than generalizing from a different object. Include fitted attributes in the review: a consumer may read them after training under a different context. Successful fitting does not establish the representation later returned through every attribute access or prediction method.
Account for representation changes deliberately
The output-configuration notes distinguish device-array choices from NumPy or pandas choices that require host-device transfer. Select CPU output when its consumer needs it, and keep a GPU-compatible route on a compatible device representation when appropriate. Do not use output type as evidence that the underlying learning algorithm changed. It describes the interface and may introduce conversion work, but model quality and numerical correctness still require their own validation.
Check type and meaning at the handoff
A pilot should verify output type, shape, ordering and association with the original examples. Repeat the check with the actual scoped and estimator settings used by the service. The guides on CPU-GPU pipeline splitting and logical feature contracts explain related boundaries. A reliable handoff makes representation an intentional choice while preserving which prediction or fitted quantity each value represents.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.