Error please help

#6
by kushal1506 - opened

TokenClassificationPipeline.postprocess() got an unexpected keyword argument 'model_outputs'
Its giving this error .. please help

Changing Parametername 'model_outputs' to 'all_outputs' worked for me.

Hi,

The name of the model outputs parameter seems to have changed in the postprocess function.
Now it is called all_outputs. Can you replace the postprocess function with this:

def postprocess(self, all_outputs):
results = super().postprocess(
all_outputs=all_outputs,
aggregation_strategy=AggregationStrategy.FIRST,
)
return np.unique([result.get("word").strip() for result in results])
I will also update the model documentation.

Thanks for noticing @bengelmann !
Thomas De Decker

DeDeckerThomas changed discussion status to closed

Sign up or log in to comment