Args: dataset_name (str): name of the dataset to be evaluated. distributed (bool): if True, will collect results from all ranks for evaluation. Otherwise, will evaluate the results in the current process. output_dir (str): an output direct
(
self,
dataset_name,
config,
distributed=True,
output_dir,
)
| 103 | """ |
| 104 | |
| 105 | def __init__( |
| 106 | self, |
| 107 | dataset_name, |
| 108 | config, |
| 109 | distributed=True, |
| 110 | output_dir, |
| 111 | ): |
| 112 | """ |
| 113 | Args: |
| 114 | dataset_name (str): name of the dataset to be evaluated. |
| 115 | distributed (bool): if True, will collect results from all ranks for evaluation. |
| 116 | Otherwise, will evaluate the results in the current process. |
| 117 | output_dir (str): an output directory to dump results. |
| 118 | """ |
| 119 | self._logger = logging.getLogger(__name__) |
| 120 | |
| 121 | self._dataset_name = dataset_name |
| 122 | self._distributed = distributed |
| 123 | self._output_dir = output_dir |
| 124 | |
| 125 | self._cpu_device = torch.device("cpu") |
| 126 | |
| 127 | def reset(self): |
| 128 | self.feats = [] |