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
Is There Any Known Issue In Pipeline Decorator Where Lambda Function Call Another Function(Say

Is there any known issue in pipeline decorator where lambda function call another function(say xyz ) and during pipeline execution, error is thrown that xyz is not defined? though it is very well defined in python file on the top.

  
  
Posted 2 months ago
Votes Newest

Answers 3


Hi @<1523701205467926528:profile|AgitatedDove14>
first of all many thanks to you for always replying promptly 🙂

Initially I thought function is defined outside that is why I was getting that error. However I am using this way and that also gives error:

@PipelineDecorator.component(return_values=["op"])
def step1():
op = "I am in step-1"
return op

@PipelineDecorator.component(return_values=["op"])
def step2(op):
return ( lambda op:step1(op))

While executing step2, I get error that step1 is not defined.

Hope this example is helpful.

  
  
Posted 2 months ago

Hi @<1720249421582569472:profile|NonchalantSeaanemone34>

pipeline decorator where lambda function call another function(say

xyz

) and during pipeline execution, error is thrown that

xyz

is not defined?

Each pipeline function becomes a standalone "script", which I assume if the lambda function is defined outside of the decorated pipeline component function, would throw an undefined error.
My suggestion would be to define the lambda function as a nested function inside the decorated pipeline function.
wdyt?

  
  
Posted 2 months ago

Hi @<1720249421582569472:profile|NonchalantSeaanemone34>
Sorry I missed this message. Yeah the reason it's not working is because the way the returned value is stored and passed is by using 'pickle' , unfortunately python pickle does not support storing lambda functions...
https://docs.python.org/3/library/pickle.html#id8

  
  
Posted one month ago
244 Views
3 Answers
2 months ago
one month ago
Tags