Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS sagemaker : Make 'endpoint_url' argument default to None instead of empty string #3374

Merged
merged 1 commit into from
Apr 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/aws/sagemaker/batch_transform/component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ outputs:
- {name: output_location, description: 'S3 URI of the transform job results.'}
implementation:
container:
image: redbackthomson/aws-kubeflow-sagemaker:20191003
image: redbackthomson/aws-kubeflow-sagemaker:20200402
command: ['python']
args: [
batch_transform.py,
Expand Down
9 changes: 8 additions & 1 deletion components/aws/sagemaker/common/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,16 @@
# Get current directory to open templates
__cwd__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))


def nullable_string_argument(value):
value = value.strip()
if not value:
return None
return value

def add_default_client_arguments(parser):
parser.add_argument('--region', type=str.strip, required=True, help='The region where the training job launches.')
parser.add_argument('--endpoint_url', type=str.strip, required=False, help='The URL to use when communicating with the Sagemaker service.')
parser.add_argument('--endpoint_url', type=nullable_string_argument, required=False, help='The URL to use when communicating with the Sagemaker service.')

def get_sagemaker_client(region, endpoint_url=None):
"""Builds a client to the AWS SageMaker API."""
Expand Down
2 changes: 1 addition & 1 deletion components/aws/sagemaker/deploy/component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ outputs:
- {name: endpoint_name, description: 'Endpoint name'}
implementation:
container:
image: redbackthomson/aws-kubeflow-sagemaker:20191003
image: redbackthomson/aws-kubeflow-sagemaker:20200402
command: ['python']
args: [
deploy.py,
Expand Down
2 changes: 1 addition & 1 deletion components/aws/sagemaker/ground_truth/component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ outputs:
- {name: active_learning_model_arn, description: 'The ARN for the most recent Amazon SageMaker model trained as part of automated data labeling.'}
implementation:
container:
image: redbackthomson/aws-kubeflow-sagemaker:20191003
image: redbackthomson/aws-kubeflow-sagemaker:20200402
command: ['python']
args: [
ground_truth.py,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ outputs:
description: 'The registry path of the Docker image that contains the training algorithm'
implementation:
container:
image: redbackthomson/aws-kubeflow-sagemaker:20191003
image: redbackthomson/aws-kubeflow-sagemaker:20200402
command: ['python']
args: [
hyperparameter_tuning.py,
Expand Down
2 changes: 1 addition & 1 deletion components/aws/sagemaker/model/component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ outputs:
- {name: model_name, description: 'The model name Sagemaker created'}
implementation:
container:
image: redbackthomson/aws-kubeflow-sagemaker:20191003
image: redbackthomson/aws-kubeflow-sagemaker:20200402
command: ['python']
args: [
create_model.py,
Expand Down
2 changes: 1 addition & 1 deletion components/aws/sagemaker/train/component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ outputs:
- {name: training_image, description: 'The registry path of the Docker image that contains the training algorithm'}
implementation:
container:
image: redbackthomson/aws-kubeflow-sagemaker:20191003
image: redbackthomson/aws-kubeflow-sagemaker:20200402
command: ['python']
args: [
train.py,
Expand Down
2 changes: 1 addition & 1 deletion components/aws/sagemaker/workteam/component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ outputs:
- {name: workteam_arn, description: 'The ARN of the workteam.'}
implementation:
container:
image: redbackthomson/aws-kubeflow-sagemaker:20191003
image: redbackthomson/aws-kubeflow-sagemaker:20200402
command: ['python']
args: [
workteam.py,
Expand Down