def compute_metrics(self, results: List):
        """Compute the metrics from processed results.

        Args:
            results (dict): The processed results of each batch.
        """
        mmengine.mkdir_or_exist(self.save_dir)
        save_result(
            result=results,
            result_dir=self.save_dir,
            filename='nocap_pred',
            remove_duplicate='image_id',
        )

        return dict()
Compute the metrics from processed results.

        Args:
            results (dict): The processed results of each batch.
        
mmpretrain/evaluation/metrics/nocaps.py