Closed SomewhereInTheVastUniverse closed 1 year ago
@SomewhereInTheVastUniverse
Can you modify your example like the following:
@labeling_function()
def something(x):
return 1
If you look at the documentation in https://github.com/snorkel-team/snorkel/blob/61c60e8496a057057c663912bafb0614ed2fc98a/snorkel/labeling/lf/core.py#L84, you can see that when defining the function, you only pass in 'x' as the argument and not self.
@SomewhereInTheVastUniverse
Can you modify your example like the following:
@labeling_function() def something(x): return 1
If you look at the documentation in
, you can see that when defining the function, you only pass in 'x' as the argument and not self.
okay then, i can use only function case. thank you.
Hi i want to know the method labeling function decorator with class tutorial and guide have only function based example
i want to use like following example.
class LabelingFunctions: @labeling_function() def something(self, x): return 1
but in this case, it occur a error like 'TypeError: LabelingFunctions.something() missing 1 required positional argument: 'x' because it has 'self' as a parameter on method. how can i use class based labeling
thank you