4949 RESOURCE_NOT_FOUND_EXCEPTION ,
5050 EXECUTION_TIME_PIPELINE_PARAMETER_FORMAT ,
5151)
52+ from sagemaker .mlops .workflow ._utils import EUREKA_GA_REGIONS
5253from sagemaker .mlops .workflow .lambda_step import LambdaOutput , LambdaStep
5354from sagemaker .core .shapes .shapes import MlflowConfig
5455from sagemaker .core .helper .pipeline_variable import (
@@ -99,7 +100,7 @@ def __init__(
99100 self ,
100101 name : str = "" ,
101102 parameters : Optional [Sequence [Parameter ]] = None ,
102- pipeline_experiment_config : Optional [PipelineExperimentConfig ] = _DEFAULT_EXPERIMENT_CFG ,
103+ pipeline_experiment_config : Optional [PipelineExperimentConfig ] = None ,
103104 mlflow_config : Optional [MlflowConfig ] = None ,
104105 steps : Optional [Sequence [Union [Step , StepOutput ]]] = None ,
105106 sagemaker_session : Optional [Session ] = None ,
@@ -116,6 +117,9 @@ def __init__(
116117 the same name already exists. By default, pipeline name is used as
117118 experiment name and execution id is used as the trial name.
118119 If set to None, no experiment or trial will be created automatically.
120+ Note: The default experiment config is only applied in regions where
121+ Experiments (Eureka) is Generally Available. In other regions (e.g.,
122+ GovCloud), this defaults to None.
119123 mlflow_config (Optional[MlflowConfig]): If set, the pipeline will be configured
120124 with MLflow tracking for experiment tracking and model versioning.
121125 steps (Sequence[Union[Step, StepOutput]]): The list of the
@@ -133,7 +137,6 @@ def __init__(
133137 """
134138 self .name = name
135139 self .parameters = parameters if parameters else []
136- self .pipeline_experiment_config = pipeline_experiment_config
137140 self .mlflow_config = mlflow_config
138141 self .steps = steps if steps else []
139142 self .sagemaker_session = sagemaker_session if sagemaker_session else Session ()
@@ -146,6 +149,13 @@ def __init__(
146149 self ._event_bridge_scheduler_helper = EventBridgeSchedulerHelper (
147150 self .sagemaker_session .boto_session .client ("scheduler" ),
148151 )
152+ self .pipeline_experiment_config = pipeline_experiment_config
153+
154+ # Apply default experiment config only in Eureka GA regions
155+ if pipeline_experiment_config is None :
156+ region = self .sagemaker_session .boto_region_name
157+ if region in EUREKA_GA_REGIONS :
158+ self .pipeline_experiment_config = _DEFAULT_EXPERIMENT_CFG
149159
150160 @property
151161 def latest_pipeline_version_id (self ):
0 commit comments