When finetuning Bert on classification task raised TypeError(f'Object of type {o.__class__.__name__} ' TypeError: Object of type ndarray is not JSON serializable

It looks like your compute_metric function is returning NumPy arrays, which is not supported.

2 Likes