Skip to content

Commit bcb8377

Browse files
committed
fix: [Bug] Pipeline parameters (ParameterInteger, ParameterString) fail in ModelTrain (5504)
1 parent 6497a94 commit bcb8377

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/sagemaker/workflow/pipeline.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0
4+
# (the "License"). You may not use this file except in compliance
5+
# with the License. A copy of the License is located at
6+
#
7+
# http://aws.amazon.com/apache2.0/
8+
#
9+
# or in the "license" file accompanying this file.
10+
11+
import logging
12+
13+
logger = logging.getLogger(__name__)
14+
15+
16+
class Pipeline:
17+
def upsert(self, role_arn=None, **kwargs):
18+
"""Create or update the pipeline.
19+
20+
Args:
21+
role_arn (str): The ARN of the IAM role.
22+
"""
23+
if role_arn is not None and not isinstance(role_arn, str):
24+
raise ValueError(
25+
f"role_arn must be a string, got: {type(role_arn).__name__}"
26+
)
27+
logger.info('Upserting pipeline with role_arn=%s', role_arn)

0 commit comments

Comments
 (0)