Automationscribe.com
  • Home
  • AI Scribe
  • AI Tools
  • Artificial Intelligence
  • Contact Us
No Result
View All Result
Automation Scribe
  • Home
  • AI Scribe
  • AI Tools
  • Artificial Intelligence
  • Contact Us
No Result
View All Result
Automationscribe.com
No Result
View All Result

Manufacturing MLOps at GS Caltex with Amazon SageMaker Canvas, half 1

admin by admin
November 14, 2026
in Artificial Intelligence
0
Manufacturing MLOps at GS Caltex with Amazon SageMaker Canvas, half 1
399
SHARES
2.3k
VIEWS
Share on FacebookShare on Twitter


GS Caltex makes use of Amazon SageMaker Canvas and Amazon SageMaker Pipelines to attach course of engineers’ fashions to manufacturing workflows. The South Korean vitality and chemical firm divides mannequin growth and operations between engineers with complementary abilities.

Course of engineers construct and validate fashions in SageMaker Canvas with out writing code, drawing on their course of data. Machine studying (ML) engineers configure SageMaker Pipelines workflows for deployment and scheduled inference.

Shifting belongings from SageMaker Canvas into SageMaker Pipelines nonetheless required integration work. ML engineers needed to set information paths for manufacturing, provide the mannequin configuration, and join preprocessing and inference jobs. GS Caltex automated this handoff whereas reusing the belongings created in SageMaker Canvas.

GS Caltex stories that its ML engineers now deploy fashions inside just a few hours, in contrast with a few week earlier than. The corporate runs batch inference each half-hour, decreasing the necessity for constantly working endpoints. GS Caltex stories that this has meaningfully lowered its inference prices.

This put up explains how GS Caltex connects SageMaker Canvas to SageMaker Pipelines and reuses validated preprocessing flows and fashions in manufacturing.

Resolution overview

The machine studying operations (MLOps) workflow has two paths: getting ready a brand new mannequin model for deployment, and working batch inference with the deployed mannequin.

From a validated mannequin to a repeatable workflow

You should use SageMaker Canvas to arrange information visually, construct fashions, and generate batch predictions. It’s also possible to register validated fashions in Amazon SageMaker Mannequin Registry from SageMaker Canvas. GS Caltex constructed a separate handoff course of to show these belongings into executable SageMaker Pipelines steps.

Course of engineers perceive the variables and information behind a course of and assess whether or not a mannequin’s predictions are helpful. ML engineers flip the ensuing belongings into manufacturing jobs and handle mannequin variations and execution historical past.

Space What is ready in SageMaker Canvas What’s managed within the manufacturing workflow
Information preparation A preprocessing move constructed with Information Wrangler Preprocessing jobs in Amazon SageMaker Processing
Mannequin growth A skilled mannequin and analysis outcomes Mannequin variations and approval standing in Mannequin Registry
Prediction Validation of mannequin predictions Batch inference each half-hour utilizing an accredited mannequin
Operations Improvement and validation of particular person fashions Step execution historical past, saved outcomes, and failure dealing with

Reference structure

The next diagram reveals how course of engineers hand off SageMaker Canvas belongings to ML engineers for deployment and scheduled inference. ML engineers use Amazon Easy Storage Service (Amazon S3) for preprocessing flows and Mannequin Registry for mannequin variations, then schedule pipeline runs by way of Amazon EventBridge.

Process engineers build models in SageMaker Canvas. ML engineers connect preprocessing flows in S3 and models in Model Registry to SageMaker Pipelines, with Amazon EventBridge triggering batch inference.

Determine 1: SageMaker Canvas belongings linked to a SageMaker Pipelines workflow for scheduled batch inference

ML engineers obtain the preprocessing move and mannequin from SageMaker Canvas and evaluate the information codecs and prediction outcomes. After that evaluate, they approve the mannequin in Mannequin Registry and deploy it. This preparation takes place when a brand new mannequin model is deployed. Subsequent inference runs reuse the deployed mannequin.

Amazon EventBridge begins every scheduled run. SageMaker Pipelines prepares the enter information from Amazon Easy Storage Service (Amazon S3), runs preprocessing and SageMaker Batch Rework, and shops the ends in S3. ML engineers can examine step standing and Amazon CloudWatch logs to observe the workflow.

The manufacturing pipeline reuses the preprocessing logic and skilled mannequin created in SageMaker Canvas. ML engineers configure the enter and output paths, set the order of execution, and write the code that connects approval and scheduling to the workflow.

Conditions

Earlier than you start, put together the next:

The complete reference implementation is out there within the GitHub repository. The code examples on this put up concentrate on the connections between parts. The repository makes use of a pattern mortgage classification mannequin, so alter the configuration to match your mannequin’s enter and output codecs.

Technical implementation

The next steps cowl preprocessing reuse, mannequin approval and deployment, pipeline development, and scheduled inference.

1. Run the SageMaker Canvas preprocessing move with SageMaker Processing

A preprocessing move created with Information Wrangler in SageMaker Canvas data the information sources and transformation steps. To arrange the reference implementation, export information to Amazon S3 utilizing SageMaker Processing, then retrieve the job settings and the .move file utilized by that job.

Within the export settings, flip off Auto job configuration and choose SageMaker Processing. After the export begins, open the Processing job particulars on the Amazon SageMaker AI console. File the container picture URI, the S3 URI of the enter named move, the execution function, and the output settings. Use these values to configure the pipeline step that runs the .move file.

The SageMaker execution function should have permissions to learn the required S3 information, write the outcomes, and entry the container picture. Select the occasion sort and depend primarily based on the quantity of knowledge it’s good to course of.

Maintain the preprocessing logic validated by the method engineer, and alter the information sources, paths, and different settings for the manufacturing setting. Examine the container picture and output node in opposition to the unique job configuration.

Merchandise to test What to do
Enter location Examine the S3 URI referenced by the information supply within the .move file. Importing uncooked information to a different location doesn’t replace this reference.
Container picture Use the picture from the Processing job created through the S3 export, and pin a model that reproduces the validated transformations.
Output ID Use the output node and output identify from the exported configuration. If the required format is {node_id}.{output_name}, match it precisely.
Discovered transformation values Protect values discovered throughout coaching, resembling scaling and encoding parameters. Don’t refit them on every inference batch.
Validation Evaluate the columns, information sorts, and reworked values produced by SageMaker Canvas and Processing for a similar enter.

Some .move information include execution metadata resembling internal_metadata.dw_job.container_uri. Examine the precise Processing job settings moderately than assuming that each export accommodates this discipline. Should you transfer the workflow to a different AWS Area, confirm that the container picture is out there there.

The reference implementation separates intermediate and last outputs by execution underneath runs//. Its PrepareInput step writes information to a hard and fast S3 location referenced by the .move file. Forestall executions that share that enter path from overlapping.

To isolate enter information for every execution as effectively, add a preparation step that updates the supply URI in a replica of the .move file. Declaring a SageMaker Pipelines parameter doesn’t mechanically change a URI contained in the file.

2. Deal with variations between coaching and inference inputs

The goal column is one distinction between coaching and inference information. A move constructed with coaching information can include transformations that count on the goal column within the enter schema. Inference information doesn’t include that recognized consequence.

The reference implementation provides a PrepareInput step earlier than preprocessing. If the goal column is lacking, this step provides it with a placeholder worth. After preprocessing, DropTargetColumn removes the column. Match the placeholder’s information sort and column place to the coaching schema, and cross solely the anticipated options to the mannequin of their authentic order.

PrepareInput -> PreprocessNewData -> DropTargetColumn
             -> BatchPredict -> AssembleResults

Use this method solely when the placeholder goal doesn’t have an effect on function values. A move that filters rows by the goal, derives options from it, or applies goal encoding wants further therapy. In these instances, separate the transformations and discovered state required for inference.

Validation ought to cowl column order and depend, information sorts, missing-value dealing with, and row depend. After eradicating the goal, test that the remaining columns match the function order used throughout coaching.

3. Register, approve, and deploy the mannequin

Register the validated SageMaker Canvas mannequin model in Mannequin Registry. The registered model can embrace the mannequin information, inference configuration, and analysis outcomes. ML engineers evaluate this info earlier than altering the approval standing.

The mannequin file, resembling mannequin.tar.gz, should be used with the right inference container and setting settings. A mannequin bundle in Mannequin Registry teams this info collectively. On this batch structure, deployment creates a SageMaker mannequin useful resource from an accredited bundle for Batch Rework to reference.

The next instance checks a bundle that has already been accredited, then creates the mannequin useful resource. Provide model_package_arn, model_name, and sagemaker_role_arn throughout deployment. This instance makes use of a singular mannequin identify for every model.

import boto3

sm_client = boto3.shopper("sagemaker")
bundle = sm_client.describe_model_package(
    ModelPackageName=model_package_arn
)

if bundle["ModelPackageStatus"] != "Accomplished":
    elevate RuntimeError("Mannequin bundle isn't prepared")
if bundle["ModelApprovalStatus"] != "Permitted":
    elevate RuntimeError("Mannequin bundle isn't accredited")

sm_client.create_model(
    ModelName=model_name,
    ExecutionRoleArn=sagemaker_role_arn,
    PrimaryContainer={"ModelPackageName": model_package_arn},
)

Mannequin Registry data approval standing, but it surely doesn’t implement an approval test on each inference request. Examine that standing within the deployment code and retain the chosen bundle ARN and mannequin identify within the pipeline configuration. If approval is revoked, replace the schedules and execution configurations that use the mannequin.

Registration and deployment happen when a mannequin model is launched. The pipeline that runs each half-hour creates Batch Rework jobs utilizing that mannequin, so it doesn’t have to register the mannequin once more on every run.

4. Join preprocessing, inference, and outcome meeting

The inference pipeline has 5 steps.

Step Perform Enter and output
PrepareInput Add a placeholder goal column if wanted New inference information -> information with the goal column provided
PreprocessNewData Run the SageMaker Canvas preprocessing move Ready enter and .move -> reworked information
DropTargetColumn Take away the goal column and CSV header Reworked information -> function CSV with out a header
BatchPredict Run batch inference with the accredited mannequin Characteristic CSV -> prediction information
AssembleResults Mix the preprocessed information with predictions Preprocessed information and prediction information -> last outcome CSV

Configure every job earlier than connecting the steps. Within the following instance, prepare_args, preprocess_args, drop_target_args, and assemble_args maintain the step arguments returned by run() calls on processors that use a PipelineSession. The processors and transformer share the pipeline_session object. Configure the transformer with the beforehand deployed model_name.

from sagemaker.workflow.pipeline import Pipeline
from sagemaker.workflow.steps import ProcessingStep, TransformStep

put together = ProcessingStep(
    identify="PrepareInput", step_args=prepare_args
)
preprocess = ProcessingStep(
    identify="PreprocessNewData",
    step_args=preprocess_args,
    depends_on=[prepare],
)
drop_target = ProcessingStep(
    identify="DropTargetColumn",
    step_args=drop_target_args,
    depends_on=[preprocess],
)

# The DropTargetColumn job defines an output named "options".
features_uri = (
    drop_target.properties.ProcessingOutputConfig
    .Outputs["features"].S3Output.S3Uri
)
predict = TransformStep(
    identify="BatchPredict",
    step_args=transformer.rework(
        information=features_uri,
        content_type="textual content/csv",
        split_type="Line",
    ),
)
assemble = ProcessingStep(
    identify="AssembleResults",
    step_args=assemble_args,
    depends_on=[predict],
)

pipeline = Pipeline(
    identify="canvas-process-inference",
    steps=[prepare, preprocess, drop_target, predict, assemble],
    sagemaker_session=pipeline_session,
)
pipeline_arn = pipeline.upsert(role_arn=sagemaker_role_arn)["PipelineArn"]

The next execution graph reveals the 5 steps within the pattern mortgage mannequin’s inference workflow. They put together inputs, apply preprocessing, take away the goal column, run batch inference, and assemble outcomes. The execution was within the Executing state when this screenshot was taken.

Execution graph for the sample loan model showing PrepareInput, PreprocessNewData, DropTargetColumn, BatchPredict, and AssembleResults

Determine 2: SageMaker Pipelines execution graph for the pattern mortgage mannequin

Use depends_on to manage execution order, and cross information by way of step output properties. For instance, assemble_args should obtain the situation of the preprocessed information and predict.properties.TransformOutput.S3OutputPath. The output identify "options" belongs to DropTargetColumn. The Information Wrangler step makes use of the output ID outlined in its preprocessing move.

Within the reference implementation, AssembleResults combines the preprocessed information and predictions by row place. Earlier than utilizing it in manufacturing, add checks that file order and row counts match, and cease outcome technology if they don’t. If preprocessing kinds or removes rows, keep an express mapping between supply file IDs and predictions.

5. Schedule inference each half-hour

GS Caltex runs inference each half-hour. The next instance makes use of an Amazon EventBridge rule to schedule SageMaker Pipelines executions. Create the pipeline and confirm it with a handbook run earlier than attaching the schedule.

import boto3

events_client = boto3.shopper("occasions")
rule_name = "canvas-process-inference-every-30-minutes"

events_client.put_rule(
    Title=rule_name,
    ScheduleExpression="fee(half-hour)",
    State="ENABLED",
)

outcome = events_client.put_targets(
    Rule=rule_name,
    Targets=[{
        "Id": "canvas-process-inference",
        "Arn": pipeline_arn,
        "RoleArn": eventbridge_role_arn,
    }],
)
if outcome["FailedEntryCount"]:
    elevate RuntimeError(outcome["FailedEntries"])

Set eventbridge_role_arn to a task that trusts the Amazon EventBridge service principal, occasions.amazonaws.com, and has sagemaker:StartPipelineExecution permission for the goal pipeline. The pipeline_arn worth identifies the pipeline created within the earlier step.

The expression fee(half-hour) schedules runs at 30-minute intervals. To run on the hour and half hour, use cron(0/30 * * * ? *). Resolve which information window every run processes within the enter preparation step, and file it with the execution.

Operational concerns

Earlier than enabling scheduled runs, test the overall price, execution time, and dealing with of invalid or mismatched information.

Consider batch prices throughout the total workflow

Amazon SageMaker Pipelines is a serverless workflow orchestration service. It manages execution order and dependencies with out a workflow server so that you can provision or keep. Processing and Batch Rework jobs use separate compute assets and are billed in response to occasion sort and length.

A provisioned real-time endpoint is an efficient match for requests that want a persistently low-latency response. Batch Rework fits workloads that may course of a set of data collectively. It releases the job’s compute assets when the job finishes, so you’ll be able to run predictions with out preserving an inference endpoint working constantly for every mannequin.

Consideration Provisioned real-time endpoint SageMaker Pipelines with Batch Rework
Useful resource lifecycle Situations stay accessible to serve requests Sources are provisioned and launched for every job
Value drivers Endpoint uptime and capability Job length, frequency, occasion depend, and supporting companies
Appropriate workloads Rapid responses and ongoing on-line requests Processing amassed information at scheduled intervals
Including a mannequin Endpoint capability and ongoing internet hosting prices Extra processing, job length, and concurrency limits

A 30-minute schedule produces 48 scheduled runs per day. Embody preprocessing, occasion startup, inference, and postprocessing when estimating whole runtime. The associated fee comparability must also account for Processing, S3, CloudWatch, and different companies utilized by the workflow.

Assess the price of every workload utilizing its measured utilization, together with the supporting companies and the total runtime of each scheduled job.

Examine runtime and overlapping executions

A schedule that begins a run each half-hour doesn’t assure that every run finishes inside that interval. Measure the total pipeline runtime with consultant information, together with occasion startup and the time wanted to retry failed jobs.

Resolve methods to deal with a scheduled run that arrives earlier than the earlier execution has completed. Controlling parallel steps inside a pipeline doesn’t forestall separate pipeline executions from overlapping. Examine energetic executions, forestall duplicate processing of the identical enter window, and separate the output paths for every run.

File the enter information window, preprocessing move model, mannequin bundle ARN, pipeline execution ARN, and output location for every run. These particulars assist reproduce outcomes and examine errors.

Validate outputs and failure conduct

Full the next checks earlier than you allow the schedule:

  1. Run a validation dataset by way of SageMaker Canvas and Processing. Evaluate the output columns, information sorts, row counts, and key reworked values.
  2. Examine that including a placeholder goal doesn’t change function values, and that the goal is faraway from the mannequin enter.
  3. Run Batch Rework with the accredited mannequin model and confirm the affiliation between supply data and predictions.
  4. Verify that an invalid enter schema or preprocessing failure prevents downstream inference and outcome publication.
  5. Measure runtime and price, check overlapping executions and reprocessing of the identical enter window, after which allow the 30-minute schedule.

Add CloudWatch alerts for job failures and processing delays, along with information high quality or mannequin monitoring as wanted. Set preliminary thresholds from measured runtime and information traits, and evaluate them when the mannequin or information quantity adjustments.

Adoption method and outcomes

With a staged rollout, a workforce can confirm the handoff earlier than standardizing it throughout fashions. The next sections describe an adoption method and the outcomes GS Caltex reported.

Transfer from mannequin growth to common operation

Begin by validating the trail to manufacturing for one mannequin, then standardize the steps that repeat throughout deployments. The next sequence is a prompt adoption method primarily based on the GS Caltex expertise.

Stage Purpose Scope
Crawl Reproduce growth ends in manufacturing Validate the SageMaker Canvas mannequin, register it in Mannequin Registry, and run the pipeline manually
Stroll Set up dependable scheduled operation Examine approvals, schedule runs on the required interval, add failure alerts, and handle outputs by execution
Run Reuse the working course of throughout fashions Introduce widespread templates, steady integration and steady supply (CI/CD), change validation, and procedures for transferring operational duty

As automation expands, course of engineers proceed to evaluate whether or not the predictions are helpful for the method. ML engineers handle pipeline execution and adjustments.

Outcomes at GS Caltex

GS Caltex diminished the repeated work wanted to attach SageMaker Canvas fashions to manufacturing. ML engineers now deploy fashions inside just a few hours, in contrast with a few week beforehand. Additionally they reuse the belongings that course of engineers validated in SageMaker Canvas.

Course of engineers started proposing purposes in different processes after seeing their fashions utilized in manufacturing. ML engineers spent much less time repeating integration work and will concentrate on working and monitoring the pipelines.

Final result Reported outcome
Mannequin deployment time Beforehand a few week. Now inside just a few hours
Inference frequency Each half-hour
Value influence Significant price financial savings
Engineering work Course of engineers proposed new purposes; ML engineers targeted on pipeline operation and monitoring

Clear up check assets

For a check deployment, disable the Amazon EventBridge rule and take away its targets first. After energetic pipeline executions and jobs have completed, delete the check pipeline and its SageMaker mannequin assets.

Should you created a real-time endpoint for testing, delete it as effectively. Take away enter, intermediate, and prediction information from S3, and clear up CloudWatch logs in response to your retention coverage. Examine whether or not different executions or audit necessities nonetheless rely on mannequin information and Mannequin Registry variations earlier than deleting them.

Conclusion

At GS Caltex, course of engineers create and validate fashions in SageMaker Canvas, and ML engineers use these belongings to run manufacturing workflows in SageMaker Pipelines. This handoff diminished repeated integration work. GS Caltex stories that ML engineers now full mannequin deployments inside just a few hours, in contrast with a few week earlier than.

The handoff wants to incorporate the preprocessing move, enter schema, inference configuration, and approval course of alongside the mannequin information. Confirm that the workflow reproduces the anticipated outcomes and might run reliably on the required schedule.

To do that method, begin with one mannequin you might have validated in SageMaker Canvas and use the GitHub repository. See the SageMaker Pipelines developer information for particulars on defining and working workflows. Examine preprocessing and batch prediction outcomes with a handbook execution, then schedule runs on the interval your software wants.

Partly 2, we present how GS Caltex used Amazon Bedrock to automate shifting present fashions onto this pipeline.

 


In regards to the authors

WonGu Rho

WonGu Rho

WonGu is a Information Analyst at GS Caltex’s DAX Lab. He makes a speciality of information evaluation, machine studying mannequin growth and operations, mannequin efficiency optimization, and MLOps. As well as, he drives operational effectivity and data-informed decision-making for enterprise groups by designing and integrating enterprise AI brokers, workflows, and information pipelines.

Hyunsoo Kim, Ph.D.

Hyunsoo Kim, Ph.D.

Hyunsoo is a Senior APJ GTM Specialist Options Architect for GenAI at Amazon Internet Providers. Primarily based in Seoul, he helps clients throughout Asia Pacific design generative AI options, together with AI brokers, superior RAG, mannequin optimization, and MLOps.

Sang Hyun Kim

Sang Hyun Kim

Sang is a Senior Account Government at AWS Korea. He helps clients within the vitality and manufacturing industries undertake cloud applied sciences and put AI into follow. He works with AWS specialists and companions to assist clients from proof of idea by way of manufacturing deployment and broader adoption.

Joonhyung Kim

Joonhyung Kim

Joonhyung is a Senior Options Architect and a bodily AI and spatial computing specialist at AWS Korea. He helps clients construct and function digital twin, 3D, and AR/VR/XR purposes on AWS, with a concentrate on supply pace and price effectivity. His expertise spans generative AI, machine studying, information, and cloud structure.

Tags: AmazonCaltexCanvasMLOpsPartProductionSageMaker
Previous Post

How Natera designed an agentic AI system for lab ops with Amazon Bedrock AgentCore

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Popular News

  • The Journey from Jupyter to Programmer: A Fast-Begin Information

    The Journey from Jupyter to Programmer: A Fast-Begin Information

    407 shares
    Share 163 Tweet 102
  • Speed up edge AI improvement with SiMa.ai Edgematic with a seamless AWS integration

    407 shares
    Share 163 Tweet 102
  • Greatest practices for Amazon SageMaker HyperPod activity governance

    407 shares
    Share 163 Tweet 102
  • Context Engineering — A Complete Fingers-On Tutorial with DSPy

    406 shares
    Share 162 Tweet 102
  • Construct a serverless audio summarization resolution with Amazon Bedrock and Whisper

    406 shares
    Share 162 Tweet 102

About Us

Automation Scribe is your go-to site for easy-to-understand Artificial Intelligence (AI) articles. Discover insights on AI tools, AI Scribe, and more. Stay updated with the latest advancements in AI technology. Dive into the world of automation with simplified explanations and informative content. Visit us today!

Category

  • AI Scribe
  • AI Tools
  • Artificial Intelligence

Recent Posts

  • Manufacturing MLOps at GS Caltex with Amazon SageMaker Canvas, half 1
  • How Natera designed an agentic AI system for lab ops with Amazon Bedrock AgentCore
  • Deploy frontier AI fashions on AWS Trainium with SGLang-Neuron
  • Home
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms & Conditions

© 2024 automationscribe.com. All rights reserved.

No Result
View All Result
  • Home
  • AI Scribe
  • AI Tools
  • Artificial Intelligence
  • Contact Us

© 2024 automationscribe.com. All rights reserved.