A handful of training jobs are easy to keep straight by name. A few dozen tuning trials, retrained weekly, across a team, are not - without structure you end up guessing which run used which data and which hyperparameters produced which result.
SageMaker Experiments gives training runs a hierarchy - Experiment > Trial > Trial Component - and a metadata store so you can compare runs later without re-deriving what each one did from job names alone.
The trial component created automatically by ExperimentConfig already carries the training job's hyperparameters and any metrics defined via MetricDefinitions.
Iterating ListTrialComponents across a trial (or an experiment) is how you build a comparison table without hand-tracking job names.
No separate logging call was needed for these basics - associating the job at creation time was enough.
Custom containers can log additional metrics into the same trial component with CreateTrialComponent/UpdateTrialComponent, covered below.
An Experiment is the top-level container for a problem you're iterating on ("churn-model"). A Trial is one attempt within it - typically one full run of your workflow, which might be a single training job or a short pipeline of steps. A Trial Component is the individual step: a training job, a processing job, or a manually logged step, each carrying its own parameters, metrics, and input/output artifact references.
A tuning job's trials map naturally onto this: each training job launched by CreateHyperParameterTuningJob can be associated with its own trial component, letting you compare an entire search inside one experiment.
The simplest path, shown in the recipe, is passing ExperimentConfig directly on CreateTrainingJob (and similarly on processing or transform jobs). SageMaker creates a trial component for that job automatically, populates it with the job's hyperparameters, and associates it with the named trial and experiment - no separate CreateTrialComponent call required for the training job itself.
For metadata that doesn't come from a training job directly - a data-preprocessing step, a manual evaluation note, or a metric computed after the fact - use CreateTrialComponent directly, then AssociateTrialComponent to attach it to a trial. UpdateTrialComponent lets you add parameters or metrics to an existing component as they become available, such as after an offline evaluation finishes.
Once components exist, ListTrialComponents (scoped by TrialName or ExperimentName) and DescribeTrialComponent give you the raw data to build a comparison. For larger-scale filtering - "find every trial component with validation:auc above some threshold" - the SageMaker Search API accepts a filter expression against experiment/trial/trial-component metadata and returns matches without listing everything yourself.
The separate SageMaker Python SDK (the sagemaker package, distinct from boto3) ships a higher-level Run/experiments convenience layer that wraps these same Create*/Describe* calls with a more ergonomic context-manager style API. Its exact method names and behavior have shifted across SDK versions, so this page sticks to the underlying boto3/SDK v3 calls, which are stable across that layer's changes. If you use that convenience SDK, check its current documentation for the exact API rather than assuming it matches boto3's method names one-to-one.
Expecting ExperimentConfig to create the Experiment or Trial. It only associates a job with names that must already exist. Fix: call CreateExperiment and CreateTrial first.
Logging metrics but forgetting MetricDefinitions. Without a matching regex in AlgorithmSpecification.MetricDefinitions, no metric ever reaches the trial component. Fix: define metrics the same way you would for a tuning job's objective.
Assuming trial components store the data itself. They store metadata and references; the actual datasets and model artifacts still live in S3 where the job wrote them. Fix: treat the trial component as an index, not a data store.
Re-using a TrialComponentDisplayName across unrelated jobs. It becomes hard to tell components apart when comparing later. Fix: name components so they're identifiable without opening each one.
Confusing this SDK-level Experiments API with the higher-level Python SDK's Run helper. They cover the same underlying resources but not always the same method names. Fix: pick one layer for a given project and check its current docs rather than mixing assumptions.
Do I need to call a separate logging API for basic training-job tracking?
No. Passing ExperimentConfig on CreateTrainingJob is enough - SageMaker creates and associates a trial component automatically, capturing the job's hyperparameters and any defined metrics.
What's the difference between an Experiment, a Trial, and a Trial Component?
An Experiment groups everything related to one problem. A Trial is one attempt at it. A Trial Component is one step of that attempt - most often a single training job, but it can be any logged step.
Can I log a custom metric that isn't produced by a training job?
Yes. Use CreateTrialComponent to create a component directly, then UpdateTrialComponent to add parameters or metrics, and AssociateTrialComponent to attach it to a trial.
How do I compare many trials at once?
ListTrialComponents scoped to a trial or experiment returns the summaries to iterate and describe. For filtering by metric value across many components, the Search API accepts a filter expression instead of listing and checking each one yourself.
Does SageMaker Experiments store my training data or model files?
No. It stores metadata - parameters, metrics, and references to where artifacts live. The actual data and model artifacts remain in S3 exactly where the training job wrote them.
Is there a simpler API than these boto3 calls?
The separate, higher-level SageMaker Python SDK offers a convenience experiments/Run API on top of these same resources. Its exact surface has changed across versions, so check that SDK's current documentation if you plan to use it instead of boto3 directly.
Stack versions: This page was written for boto3 1.43.x (Python 3.10+) and the AWS SDK for JavaScript v3 (Node.js 18+). 383k393a3c3q3e393a3o1r3e3k3x383c3e3k1u1u1y213x1v1t1v1z1t20
Reviewed by Chris St. John·Last updated Jul 24, 2026