Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
I’M Wondering If Someone Has An Example Of How To Use The

I’m wondering if someone has an example of how to use the base_task_factory option for adding a step to a PipelineController ? It’s not clear to me how we should structure the factory function. Thank you.

  
  
Posted one year ago
Votes Newest

Answers 3


Hi @<1533620191232004096:profile|NuttyLobster9>
base_task_factory is a function that gets the node definition and returns a Task to be enqueued ,
pseudo code looks like:

def my_node_task_factory(node: PipelineController.Node) -> Task:
  task = Task.create(...)
  return task

Make sense ?

  
  
Posted one year ago

Hi @<1523701205467926528:profile|AgitatedDove14> , thanks so the code to be executed by the task needs to be provided to the Task.create() method as script=some/path.py or does it work to have something like

def my_node_task_factory(node: PipelineController.Node) -> Task:
  task = Task.create(...)
  my_function()
  return task 
  
  
Posted one year ago

code to be executed by the task needs to be provided to the

Task.create()

method as

script=some/path.py

Correct.

If you have a function that you want to use as a pipeline component, you should check pipeline from decorators or pipeline from functions:
None
None

  
  
Posted one year ago