Skip to content

Commit

Permalink
fix: pipeline filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Nov 2, 2024
1 parent bdafaba commit 79bb02c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ovos_core/intent_services/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,13 @@ def get_pipeline(self, skips=None, session=None, skip_stage_matchers=False) -> L
matchers = OVOSPipelineFactory.create(pipeline, use_cache=True, bus=self.bus,
skip_stage_matchers=skip_stage_matchers)

if any(k[0] not in pipeline for k in matchers):
final_pipeline = [k[0] for k in matchers]

if any(k not in pipeline for k in final_pipeline):
LOG.warning(f"Requested some invalid pipeline components! "
f"filtered {[k for k in pipeline if k not in matchers]}")
pipeline = [k for k in pipeline if k in matchers]
LOG.debug(f"Session pipeline: {pipeline}")
f"filtered: {[k for k in pipeline if k not in final_pipeline]}")

LOG.debug(f"Session final pipeline: {final_pipeline}")
return matchers

@staticmethod
Expand Down

0 comments on commit 79bb02c

Please sign in to comment.