Skip to content
cloudemu
Services

§ Documentation

Machine Learning

SageMaker, Vertex AI, and Azure ML control planes plus a deterministic inference runtime, driven by the real cloud SDKs

aws SageMakerazr Azure MLgcp Vertex AI

Emulates the managed ML platforms — the models, endpoints, training/tuning jobs, feature stores, and pipelines of AWS SageMaker, GCP Vertex AI, and Azure Machine Learning (Microsoft.MachineLearningServices). Each ships a control plane you provision against and a deterministic runtime that answers InvokeEndpoint / Predict calls, so there are no GPUs, accounts, or per-hour costs involved.

Reach for it when your code registers a model, stands up an endpoint, kicks off a training/tuning job, or writes to a feature store — so you can exercise that wiring without a live cluster. Asynchronous jobs complete synchronously to a terminal state, so Describe/List are deterministic and there are no polling loops to wait on. For the generative side — Bedrock and Azure OpenAI — see Generative AI.

ProviderServiceSDK-compatDriver
AWSSageMaker (control plane + sagemaker-runtime)✓ Liveaws.SageMaker
AzureAzure ML (Microsoft.MachineLearningServices)✓ Liveazure.AI
GCPVertex AI (aiplatform)✓ Livegcp.VertexAI

Drive it with the real SDK#

Run cloudemu as a server and point the real client at it — the same client, with only the endpoint redirected. Start it with cloudemu serve (or docker run --rm -p 4566:4566 ghcr.io/stackshy/cloudemu), which serves the AWS API on http://localhost:4566:

cloudemu serve   # AWS API on http://localhost:4566

Then point the stock sagemaker and sagemakerruntime clients at that endpoint — this stands up a model, an endpoint config, and an endpoint exactly as the real client would, then invokes it:

import (
    "github.com/aws/aws-sdk-go-v2/service/sagemaker"
    "github.com/aws/aws-sdk-go-v2/service/sagemakerruntime"
)

cp := sagemaker.NewFromConfig(cfg, func(o *sagemaker.Options) { o.BaseEndpoint = aws.String("http://localhost:4566") })
cp.CreateModel(ctx, &sagemaker.CreateModelInput{ModelName: aws.String("m")})
cp.CreateEndpointConfig(ctx, &sagemaker.CreateEndpointConfigInput{EndpointConfigName: aws.String("cfg")})
cp.CreateEndpoint(ctx, &sagemaker.CreateEndpointInput{EndpointName: aws.String("ep"), EndpointConfigName: aws.String("cfg")})

rt := sagemakerruntime.NewFromConfig(cfg, func(o *sagemakerruntime.Options) { o.BaseEndpoint = aws.String("http://localhost:4566") })
rt.InvokeEndpoint(ctx, &sagemakerruntime.InvokeEndpointInput{EndpointName: aws.String("ep"), Body: []byte("{}")})

Vertex AI speaks the aiplatform REST API (generateContent, predict, the job families) rooted at /v1/projects/{p}/locations/{l}/...; register VertexAI: cloud.VertexAI on gcpserver.Drivers. Azure ML speaks armmachinelearning (ARM) plus an *.inference.ml.azure.com/score data plane; register the mock as MachineLearning (and AzureAIDataPlane for scoring). See the SDK-Compat Server page.

In-process (Go unit tests)#

For Go unit tests written inside cloudemu-aware code, stand the same wire server up in-process with httptest.NewServer and point the client at ts.URL. The Drivers you pass name exactly the drivers this service needs:

import (
    "github.com/stackshy/cloudemu/v2"
    awsserver "github.com/stackshy/cloudemu/v2/server/aws"
)

cloud := cloudemu.NewAWS()
ts := httptest.NewServer(awsserver.New(awsserver.Drivers{SageMaker: cloud.SageMaker}))
defer ts.Close()
// point the same sagemaker + sagemakerruntime clients at ts.URL instead of the running endpoint

Call the driver directly#

When you don't need the SDK round-trip, call the driver. The same model → endpoint → invoke flow, minus the client boilerplate:

import smdriver "github.com/stackshy/cloudemu/v2/services/sagemaker/driver"

aws.SageMaker.CreateModel(ctx, smdriver.ModelConfig{ModelName: "m", RoleARN: "arn:..."})
aws.SageMaker.CreateEndpointConfig(ctx, /* EndpointConfigSpec */)
aws.SageMaker.CreateEndpoint(ctx, /* EndpointSpec */)
aws.SageMaker.InvokeEndpoint(ctx, /* InvokeEndpointInput */)

// Vertex AI: upload a model, deploy it, predict.
gcp.VertexAI.UploadModel(ctx, /* ... */)
gcp.VertexAI.DeployModel(ctx, /* ... */)
gcp.VertexAI.Predict(ctx, /* ... */)

// Azure ML: workspace → compute → job.
azure.AI.CreateMLWorkspace(ctx, /* ... */)   // Default / Hub / Project / FeatureStore
azure.AI.CreateCompute(ctx, /* ... */)        // Start/Stop/Restart state machine
azure.AI.CreateJob(ctx, /* ... */)

Behavior & fidelity#

BehaviorWhat happens
Jobs complete synchronouslyJob families are driven straight to a terminal state, so Describe and List are deterministic with no polling loops; Vertex long-running operations return done: true with the result inlined.
Endpoints validate before servingAn inference call checks that the endpoint exists and is in service before answering.
Online feature storesSageMaker and Vertex both serve online record read/write, and Vertex adds Vector Search nearest-neighbor lookups.
Automatic metricsSageMaker pushes to CloudWatch, Vertex AI to Cloud Monitoring, and Azure ML to Azure Monitor via SetMonitoring.

SDK-compat — Live#

Real sagemaker, aiplatform, and armmachinelearning clients drive the control plane end-to-end:

ProviderCoverage
AWS SageMakerJobs, inference, model registry, Studio, notebooks, HyperPod, Feature Store, pipelines
GCP Vertex AIDatasets, model registry, endpoints, job families, Feature Store, Vector Search, ML metadata
Azure MLWorkspaces, compute, endpoints, jobs, versioned assets, datastores, connections, schedules, registries

See SDK-Compat for the full per-operation list.

On this page

On this page