|
37 | 37 | from sagemaker.model_monitor.model_monitoring import _MODEL_MONITOR_S3_PATH
|
38 | 38 | from sagemaker.processing import ProcessingInput, ProcessingOutput, ProcessingJob
|
39 | 39 | from sagemaker.utils import name_from_base
|
40 |
| -from sagemaker.workflow import PipelineNonPrimitiveInputTypes, ExecutionVariable, Parameter |
41 |
| -from sagemaker.workflow.entities import RequestType, Expression |
| 40 | +from sagemaker.workflow import PipelineNonPrimitiveInputTypes, is_pipeline_variable |
| 41 | +from sagemaker.workflow.entities import RequestType |
42 | 42 | from sagemaker.workflow.properties import Properties
|
43 | 43 | from sagemaker.workflow.steps import Step, StepTypeEnum, CacheConfig
|
44 | 44 | from sagemaker.workflow.check_job_config import CheckJobConfig
|
@@ -193,18 +193,15 @@ def __init__(
|
193 | 193 | + "DataBiasCheckConfig, ModelBiasCheckConfig or ModelExplainabilityCheckConfig"
|
194 | 194 | )
|
195 | 195 |
|
196 |
| - if isinstance( |
197 |
| - clarify_check_config.data_config.s3_analysis_config_output_path, |
198 |
| - (ExecutionVariable, Expression, Parameter, Properties), |
199 |
| - ): |
| 196 | + if is_pipeline_variable(clarify_check_config.data_config.s3_analysis_config_output_path): |
200 | 197 | raise RuntimeError(
|
201 | 198 | "s3_analysis_config_output_path cannot be of type "
|
202 | 199 | + "ExecutionVariable/Expression/Parameter/Properties"
|
203 | 200 | )
|
204 | 201 |
|
205 |
| - if not clarify_check_config.data_config.s3_analysis_config_output_path and isinstance( |
206 |
| - clarify_check_config.data_config.s3_output_path, |
207 |
| - (ExecutionVariable, Expression, Parameter, Properties), |
| 202 | + if ( |
| 203 | + not clarify_check_config.data_config.s3_analysis_config_output_path |
| 204 | + and is_pipeline_variable(clarify_check_config.data_config.s3_output_path) |
208 | 205 | ):
|
209 | 206 | raise RuntimeError(
|
210 | 207 | "`s3_output_path` cannot be of type ExecutionVariable/Expression/Parameter"
|
|
0 commit comments