Convenience function to compute a metric for a single batch without accumulation. Returns the metric value directly.