prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  allow output artifact store configuration (vs hard coded)
  it seems like the output artifacts are always stored in a specific minio service, port, namespace, bucket, secrets, etc (`minio-service.kubeflow:9000`). 
  
  see: https://github.com/kubeflow/pipelines/blob/f40a22a3f4a8e06d20cf3e3f425b5058d5c87e0b/sdk/python/kfp/compiler/_op_to_template.py#L148
  
  it would be great to make it flexible, e.g. allow using S3, or change namespace or bucket names.
  i suggest making it configurable, i can do such PR if we agree its needed. 
  flexible pipeline service (host) path in client SDK 
  when creating an SDK `Client()` the path to `ml-pipeline` API service is loaded from a hard coded value (`ml-pipeline.kubeflow.svc.cluster.local:8888`) which indicate a specific k8s namespace. it can be valuable to load that default value from an env variable, i.e. changing the line in `_client.py` from:
  
  `config.host = host if host else Client.IN_CLUSTER_DNS_NAME`
  
  to:
  
  `config.host = host or os.environ.get('ML_PIPELINE_DNS_NAME',Client.IN_CLUSTER_DNS_NAME)`
  
  also note that when a user provide the `host` parameter, the ipython output points to the API server and not to the UI service (see the logic in `_get_url_prefix()`), it seems like a potential bug
  
  if its acceptable i can submit a PR for the line change above
   
  
  </issue>
  <code>
  [start of samples/core/loop_parallelism/loop_parallelism.py]
  1 # Copyright 2020 Google LLC
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #      http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 
  15 import kfp.dsl as dsl
  16 import kfp
  17 
  18 
  19 @kfp.components.create_component_from_func
  20 def print_op(s: str):
  21     print(s)
  22 
  23 @dsl.pipeline(name='my-pipeline')
  24 def pipeline2(my_pipe_param=10):
  25     loop_args = [{'A_a': 1, 'B_b': 2}, {'A_a': 10, 'B_b': 20}]
  26     with dsl.ParallelFor(loop_args, parallelism=1) as item:
  27         print_op(item)
  28         print_op(item.A_a)
  29         print_op(item.B_b)
  30 
  31 
  32 if __name__ == '__main__':
  33     kfp.compiler.Compiler().compile(pipeline, __file__ + '.yaml')
  34
  [end of samples/core/loop_parallelism/loop_parallelism.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/samples/core/loop_parallelism/loop_parallelism.py b/samples/core/loop_parallelism/loop_parallelism.py
  --- a/samples/core/loop_parallelism/loop_parallelism.py
  +++ b/samples/core/loop_parallelism/loop_parallelism.py
  @@ -21,9 +21,9 @@
       print(s)
   
   @dsl.pipeline(name='my-pipeline')
  -def pipeline2(my_pipe_param=10):
  +def pipeline():
       loop_args = [{'A_a': 1, 'B_b': 2}, {'A_a': 10, 'B_b': 20}]
  -    with dsl.ParallelFor(loop_args, parallelism=1) as item:
  +    with dsl.ParallelFor(loop_args, parallelism=10) as item:
           print_op(item)
           print_op(item.A_a)
           print_op(item.B_b)
  
verification_info: {"golden_diff": "diff --git a/samples/core/loop_parallelism/loop_parallelism.py b/samples/core/loop_parallelism/loop_parallelism.py\n--- a/samples/core/loop_parallelism/loop_parallelism.py\n+++ b/samples/core/loop_parallelism/loop_parallelism.py\n@@ -21,9 +21,9 @@\n     print(s)\n \n @dsl.pipeline(name='my-pipeline')\n-def pipeline2(my_pipe_param=10):\n+def pipeline():\n     loop_args = [{'A_a': 1, 'B_b': 2}, {'A_a': 10, 'B_b': 20}]\n-    with dsl.ParallelFor(loop_args, parallelism=1) as item:\n+    with dsl.ParallelFor(loop_args, parallelism=10) as item:\n         print_op(item)\n         print_op(item.A_a)\n         print_op(item.B_b)\n", "issue": "allow output artifact store configuration (vs hard coded)\nit seems like the output artifacts are always stored in a specific minio service, port, namespace, bucket, secrets, etc (`minio-service.kubeflow:9000`). \r\n\r\nsee: https://github.com/kubeflow/pipelines/blob/f40a22a3f4a8e06d20cf3e3f425b5058d5c87e0b/sdk/python/kfp/compiler/_op_to_template.py#L148\r\n\r\nit would be great to make it flexible, e.g. allow using S3, or change namespace or bucket names.\r\ni suggest making it configurable, i can do such PR if we agree its needed. \nflexible pipeline service (host) path in client SDK \nwhen creating an SDK `Client()` the path to `ml-pipeline` API service is loaded from a hard coded value (`ml-pipeline.kubeflow.svc.cluster.local:8888`) which indicate a specific k8s namespace. it can be valuable to load that default value from an env variable, i.e. changing the line in `_client.py` from:\r\n\r\n`config.host = host if host else Client.IN_CLUSTER_DNS_NAME`\r\n\r\nto:\r\n\r\n`config.host = host or os.environ.get('ML_PIPELINE_DNS_NAME',Client.IN_CLUSTER_DNS_NAME)`\r\n\r\nalso note that when a user provide the `host` parameter, the ipython output points to the API server and not to the UI service (see the logic in `_get_url_prefix()`), it seems like a potential bug\r\n\r\nif its acceptable i can submit a PR for the line change above\r\n \n", "before_files": [{"content": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport kfp.dsl as dsl\nimport kfp\n\n\n@kfp.components.create_component_from_func\ndef print_op(s: str):\n    print(s)\n\n@dsl.pipeline(name='my-pipeline')\ndef pipeline2(my_pipe_param=10):\n    loop_args = [{'A_a': 1, 'B_b': 2}, {'A_a': 10, 'B_b': 20}]\n    with dsl.ParallelFor(loop_args, parallelism=1) as item:\n        print_op(item)\n        print_op(item.A_a)\n        print_op(item.B_b)\n\n\nif __name__ == '__main__':\n    kfp.compiler.Compiler().compile(pipeline, __file__ + '.yaml')\n", "path": "samples/core/loop_parallelism/loop_parallelism.py"}]}