No chart function found for 'nn_losses'. Define def nn_losses(metrics, ctx): ... or use @chart().