Skip to content

Commit

Permalink
Sanitize inputs from SDK when submitting run. (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
qimingj authored and k8s-ci-robot committed Dec 5, 2018
1 parent 401f738 commit 1f8846c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdk/python/kfp/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import yaml
from datetime import datetime

from .compiler import compiler

class Client(object):
""" API Client for KubeFlow Pipeline.
Expand Down Expand Up @@ -138,7 +139,8 @@ def run_pipeline(self, experiment_id, job_name, pipeline_package_path, params={}

pipeline_obj = self._extract_pipeline_yaml(pipeline_package_path)
pipeline_json_string = json.dumps(pipeline_obj)
api_params = [kfp_run.ApiParameter(name=k, value=str(v)) for k,v in params.items()]
api_params = [kfp_run.ApiParameter(name=compiler.Compiler()._sanitize_name(k), value=str(v))
for k,v in params.items()]
key = kfp_run.models.ApiResourceKey(id=experiment_id,
type=kfp_run.models.ApiResourceType.EXPERIMENT)
reference = kfp_run.models.ApiResourceReference(key, kfp_run.models.ApiRelationship.OWNER)
Expand Down

0 comments on commit 1f8846c

Please sign in to comment.