    def get_eval_dataloader(self) -> Optional[DataLoader]:
        """
        Get the eval dataloader.

        Returns:
            (`Optional[DataLoader]`)
                The dataloader to fit data to eval the model.
        """
        if self.eval_dataloader is not None:
            return self.eval_dataloader
        if self.eval_dataset is None:
            trainer_log.warning("Trainer: eval requires a train_dataset.")
            return None
        if isinstance(self.eval_dataset, TorchDataSet):
            self.eval_dataset = self.eval_dataset.dataset
        num_workers = self._get_num_workers()
        return DataLoader(
            self.eval_dataset,
            batch_size=self.configs.eval_batch_size,
            num_workers=num_workers,  # self.configs.dataloader_num_workers,
            pin_memory=self.configs.dataloader_pin_memory,
            drop_last=self.configs.dataloader_drop_last
        )
Get the eval dataloader.

Returns:
(`Optional[DataLoader]`)
The dataloader to fit data to eval the model.
towhee/trainer/trainer.py