← AWS Machine Learning Engineer: prepare and operate models
06 / 8 · 40 MIN

Pipelines, versions, and agent state

Automate promotion and recovery without losing evidence of what ran.

Concept and mechanism

A pipeline should make dependencies explicit between preparation, training, evaluation, registration, and deployment. SageMaker Pipelines orchestrates ML steps and tracks executions and versions; underlying jobs and resources still cost money. Technical workflow success does not mean the model met acceptance criteria. Use promotion conditions linked to evaluation and retain identifiable artifacts. Model Registry gathers versions, metadata, lineage, and approval state. Do not rely only on a mutable label such as latest when recovering a release. Also identify the transform, image, dependencies, prompt, evaluation data, and retrieval configuration belonging to the promoted version. CI/CD should check code and contracts as well as model and application behavior.

Guided application

In a fictional case, an agent opened an external request but lost the response through a timeout. Blind retry can create a second request. The workflow should retain state and correlate the operation, querying its outcome or using idempotency where the API supports it. Retry policy must distinguish failure before an effect, unknown outcome, and definitive failure. These rules belong to the application and tools, rather than only the prompt. For a Knowledge Base refresh, the pipeline should track ingestion, document versions, and retrieval evaluation before promoting dependencies. Define interruption ownership, read-only diagnostic tools, and resumption criteria. In multi-step agents, a textual completion statement does not prove every required action was confirmed.

IN PRACTICE

A timeout after creating a request requires checking the effect before retrying.

Common pitfalls

latest treated as version evidence; registration treated as approval; stateless retry; document updates without evaluation.

Related topics: Ingestion, storage, and quality · Features, splits, and leakage · Training, tuning, and reproducible experiments

Take this idea with you

Promote traceable versions and recover actions using actual-state knowledge.

Create account

Reference: SageMaker Pipelines · MLA-C02