Skip to content

Commit

Permalink
Make endpoint_url None (kubeflow#3374)
Browse files Browse the repository at this point in the history
  • Loading branch information
akartsky authored and Jeffwan committed Dec 9, 2020
1 parent 91238c7 commit ff109e8
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 8 deletions.
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

0 comments on commit ff109e8

Please sign in to comment.