title: In Kubeflow Pipelines, how to send a list of elements to a lightweight python component?
body: <p>I am trying to send a list of elements as a PipelineParameter to a lightweight component.<br>
  Here is a sample that reproduces the problem.   Here is the function:</p>
  
  <pre><code>def my_func(my_list: list) -&gt; bool:
      print(f'my_list is {my_list}')
      print(f'my_list is of type {type(my_list)}')
      print(f'elem 0 is {my_list[0]}')
      print(f'elem 1 is {my_list[1]}')
      return True
  </code></pre>
  
  <p>And if I execute it with this:</p>
  
  <pre><code>test_data = ['abc', 'def']
  my_func(test_data)
  </code></pre>
  
  <p>It behaves as expected:</p>
  
  <pre><code>my_list is ['abc', 'def']
  my_list is of type &lt;class 'list'&gt;
  elem 0 is abc
  elem 1 is def
  </code></pre>
  
  <p>but if I wrap it in an op and and set up a pipeline:</p>
  
  <pre><code>import kfp
  
  my_op = kfp.components.func_to_container_op(my_func)
  
  @kfp.dsl.pipeline()
  def my_pipeline(my_list: kfp.dsl.PipelineParam = kfp.dsl.PipelineParam('my_list', param_type=kfp.dsl.types.List())):
      my_op(my_list)
  
  kfp.compiler.Compiler().compile(my_pipeline, 'my_pipeline.zip')
  </code></pre>
  
  <p>And then run a pipeline:</p>
  
  <pre><code>client = kfp.Client()
  experiment = client.create_experiment('Default')
  client.run_pipeline(experiment.id, 'my job', 'my_pipeline.zip', params={'my_list': test_data})
  </code></pre>
  
  <p>Then it seems at some point my list was converted to a string!</p>
  
  <pre><code>my_list is ['abc', 'def']
  my_list is of type &lt;class 'str'&gt;
  elem 0 is [
  elem 1 is '
  </code></pre>