# Error running tuner component in tfx pipeline

**URL:** <https://discuss.ai.google.dev/t/error-running-tuner-component-in-tfx-pipeline/27711>\
**Category:** General Discussion\
**Tags:** tfx, pipelines\
**Created:** [May 27, 2024, 4:25am UTC](https://discuss.ai.google.dev/t/error-running-tuner-component-in-tfx-pipeline/27711 "2024-05-27T04:25:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brempong\_Appiah\_Dank](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/brempong_appiah_dank/32/17878_2.png) [@Brempong\_Appiah\_Dank](https://discuss.ai.google.dev/u/Brempong_Appiah_Dank)\
**Post date:** [May 27, 2024, 4:25am UTC](https://discuss.ai.google.dev/t/error-running-tuner-component-in-tfx-pipeline/27711/1 "2024-05-27T04:25:09Z")

</div>

I’m trying to create a pipeline for ML project. But whenever I run the the Tuner component, I get this error

```auto
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/tmp/ipykernel_623970/2105798542.py in <cell line: 1>()
----> 1 context.run(tuner, enable_cache=False)

~/miniconda3/envs/pipe/lib/python3.9/site-packages/tfx/orchestration/experimental/interactive/notebook_utils.py in run_if_ipython(*args, **kwargs)
     29 # __IPYTHON__ variable is set by IPython, see
     30 # https://ipython.org/ipython-doc/rel-0.10.2/html/interactive/reference.html#embedding-ipython.
---> 31 return fn(*args, **kwargs)
     32 else:
     33 logging.warning(

~/miniconda3/envs/pipe/lib/python3.9/site-packages/tfx/orchestration/experimental/interactive/interactive_context.py in run(self, component, enable_cache, beam_pipeline_args)
    162 telemetry_utils.LABEL_TFX_RUNNER: runner_label,
    163 }):
--> 164 execution_id = launcher.launch().execution_id
    165 
    166 return execution_result.ExecutionResult(

~/miniconda3/envs/pipe/lib/python3.9/site-packages/tfx/orchestration/launcher/base_component_launcher.py in launch(self)
    204 # be immutable in this context.
    205 # output_dict can still be changed, specifically properties.
--> 206 self._run_executor(execution_decision.execution_id,
    207 copy.deepcopy(execution_decision.input_dict),
    208 execution_decision.output_dict,
...
--> 677 if len(sorted_trials) < num_trials:
    678 sorted_trials = sorted_trials + [
    679 t

TypeError: '<' not supported between instances of 'int' and 'NoneType'

```

Any help…?

---

<div class="post-metadata">

**Author:** ![Divya\_Sree\_Kayyuri](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/divya_sree_kayyuri/32/29791_2.png) [@Divya\_Sree\_Kayyuri](https://discuss.ai.google.dev/u/Divya_Sree_Kayyuri)\
**Post date:** [April 2, 2026, 8:24am UTC](https://discuss.ai.google.dev/t/error-running-tuner-component-in-tfx-pipeline/27711/3 "2026-04-02T08:24:07Z")

</div>

Hi @Brempong_Appiah_Dank, It Looks like the Tuner is receiving a `None` value. Explicitly set `max_trials` in your tuner\_fn. To better investigate this issue, please share the reproducible code.  
Thanks!
