MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / test

Method test

PATH/core/solvers/solver_multitask_dev.py:1181–1201  ·  view source on GitHub ↗
(self, model, evaluator=None)

Source from the content-addressed store, hash-verified

1179 return res
1180
1181 def test(self, model, evaluator=None):
1182 if evaluator is None:
1183 evaluator = SemSegEvaluator(dataset_name=self.ginfo.task_name, distributed=True,
1184 output_dir=self.ckpt_path, config=self.config)
1185 results = OrderedDict()
1186
1187 results_i = self.inference_on_dataset(model, evaluator)
1188
1189 # results[self.ginfo.task_name] = results_i
1190 # if self.C.rank == 0:
1191 # assert isinstance(
1192 # results_i, dict
1193 # ), "Evaluator must return a dict on the main process. Got {} instead.".format(
1194 # results_i
1195 # )
1196 # self.logger.info("Evaluation results for {} in csv format:".format(self.ginfo.task_name))
1197 # print_csv_format(results_i, self.logger)
1198 # if len(results) == 1:
1199 # results = list(results.values())[0]
1200
1201 return 'Final generating pseudo labels.'
1202
1203 def run(self):
1204 if self.config.dataset.type == 'COCOStuffSegDatasetDev':

Callers 2

test_with_TTAMethod · 0.95
runMethod · 0.95

Calls 2

inference_on_datasetMethod · 0.95
SemSegEvaluatorClass · 0.90

Tested by 1

test_with_TTAMethod · 0.76