GS Caltex Reduces MLOps Deployment Time from Weeks to Hours with SageMaker Canvas

GS Caltex has established a dual workflow where process engineers validate models in SageMaker Canvas without coding, and ML engineers deploy them using SageMaker Pipelines. By automating the asset handoff process, the time required for model deployment has been reduced from about 1 week to a few hours, and the dependency on always-on endpoints has been significantly lowered through 30-minute batch inference, resulting in meaningful cost savings. A reference architecture and implementation code linking preprocessing flows (.flow files), model registry, and EventBridge scheduling are publicly available on GitHub.

Division of Labor Between Process Knowledge and ML Engineering, Connected by Canvas

GS Caltex confirmed that the division of roles between domain experts (process engineers) and ML engineers is essential when applying machine learning to optimize refining and chemical processes. Process engineers understand process variables and data context and assess the practicality of model predictions, but coding or configuring deployment pipelines is outside their expertise. Conversely, ML engineers excel at automating deployment, version control, and execution history but find it difficult to deeply understand the significance of process data.

To bridge this gap, GS Caltex designed an MLOps workflow that connects Amazon SageMaker Canvas and SageMaker Pipelines. In Canvas, process engineers perform data preparation, model training, validation, and batch prediction without code and register the validated models in the SageMaker Model Registry. ML engineers convert the registered models and preprocessing flows (.flow files) into pipeline stages for deployment, scheduling, and monitoring.

"Process engineers understand the variables and data behind the process and evaluate whether model predictions are useful. ML engineers convert the resulting assets into production work and manage model versions and execution history." — AWS Machine Learning Blog

Reference Architecture: S3, Model Registry, and EventBridge Triad

The diagram below illustrates the flow from asset handoff to batch inference execution.

  1. Canvas preprocessing flow·model export
  2. Save .flow file to S3
  3. Register and approve model in registry
  4. Deploy pipeline
  5. EventBridge 30-minute cycle trigger
  6. Batch transformation inference
  7. Load results to S3

The core components are as follows.

ComponentRoleNotes
Amazon S3Store preprocessing flow (.flow), inference input/output dataIsolated by execution path `runs/<execution-id>/`
SageMaker Model RegistryModel version management, deployment gate based on approval statusCan be registered directly from Canvas
Amazon EventBridgePipeline execution scheduling (30-minute cycle)No need for always-on endpoints
SageMaker PipelinesOrchestration of preprocessing and batch transformation stagesMonitor stage status with CloudWatch logs
SageMaker ProcessingExecution container for Canvas Data Wrangler flow (.flow)Absorbs differences in training and inference schema

ML engineers review the preprocessing flows and models from Canvas, then process them for approval in the model registry, writing the input/output paths, execution order, approval, and scheduling linkage code in the pipeline definition. Subsequent inference execution reuses the deployed model.

Key Technical Implementation: Reusing Preprocessing and Resolving Schema Mismatches

1. Executing Canvas Preprocessing Flow in Production

The preprocessing flow created with Canvas Data Wrangler records data sources and transformation steps in a `.flow` file. To reuse this in production, it must be exported as a SageMaker Processing job. In the export settings, turn off automatic job configuration → select SageMaker Processing, and once the job starts, record the following values in the console.

These values are used to configure the pipeline step (ProcessingStep). Note: Some `.flow` files may contain execution metadata like `internal_metadata.dw_job.container_uri`, but not all exports will have this field, so the actual processing job settings should be the reference. Container image availability should also be checked during region migration.

The reference implementation separates intermediate and final outputs under `runs/<execution-id>/` for each execution. The `PrepareInput` step writes data to a fixed S3 location referenced by the `.flow` file, so input path conflicts must be avoided during concurrent executions. If complete isolation is needed, add a preparation step to update the source URI of the `.flow` file in copies per execution. Declaring pipeline parameters alone will not replace URIs within the file.

2. Handling Differences in Training and Inference Input Schema

Training data includes a target column (correct label), while inference data does not. If the Canvas flow includes transformations (filtering, derived features, target encoding, etc.) that assume the target column, errors will occur during inference. The reference implementation circumvents this by filling the target column with placeholder values in the `PrepareInput` step and removing it in the `DropTargetColumn` step after preprocessing.

Flows that include target-based filtering, derivation, or encoding must separate the transformation logic or create a separate flow for inference.

Operational Results: 80% Reduction in Deployment Lead Time, Cost Optimization through Batch Inference

GS Caltex has disclosed two key figures.

MetricBefore ImprovementAfter ImprovementNotes
Model Deployment TimeAbout 1 weekA few hoursEffect of automating asset handoff
Batch Inference CycleAlways-on endpoint operationExecuted every 30 minutesEventBridge scheduling
Inference CostBaselineSignificantly reducedEffect of reducing always-on endpoints

The reduction in deployment time is due to the automation of the process where process engineers manually converted validated preprocessing and model assets from Canvas into ML engineer pipeline code. The 30-minute batch inference cycle is a result of utilizing SageMaker Batch Transform tailored to the domain characteristics that do not require real-time endpoints (such as process monitoring and predictive maintenance). This has significantly reduced costs associated with idle computing resources.

Implications: Practical Patterns of No-Code Validation and Code Deployment Dualization

The patterns demonstrated by this case can be summarized in three points.

1. Maintaining Validation Authority of Domain Experts: Directly engaging with data and models in Canvas for business perspective validation 2. ML Engineers Dedicated to Operational Automation: Codifying asset handoff, version management, scheduling, and monitoring into pipelines 3. Principle of Asset Reuse: Reusing validated preprocessing logic (.flow) and model artifacts from Canvas as-is in production to prevent training-serving skew

The reference implementation is based on a sample loan classification model, so when applying it in practice, pipeline parameters and `PrepareInput`/`DropTargetColumn` logic should be adjusted according to the input/output schema and preprocessing flow structure. The complete code is available in the GitHub repository.

---

So What?

Verified figures

Our take

The GS Caltex case exemplifies how no-code tools can enhance the validation speed of domain experts while automatically transferring validated assets into code pipelines, showcasing a model of 'dualized MLOps'. The specific figures for reduced deployment lead time and batch inference cost savings make it easy to cite for business case development.

Open questions

Source

Back to catalog