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

Method test

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

Source from the content-addressed store, hash-verified

844 return res
845
846 def test(self, model, evaluator=None):
847 if evaluator is None:
848 evaluator = SemSegEvaluator(dataset_name=self.ginfo.task_name, distributed=True,
849 output_dir=self.ckpt_path, config=self.config)
850 results = OrderedDict()
851
852 results_i = self.inference_on_dataset(model, evaluator)
853 results[self.ginfo.task_name] = results_i
854 if self.C.rank == 0:
855 assert isinstance(
856 results_i, dict
857 ), "Evaluator must return a dict on the main process. Got {} instead.".format(
858 results_i
859 )
860 self.logger.info("Evaluation results for {} in csv format:".format(self.ginfo.task_name))
861 print_csv_format(results_i, self.logger)
862 if len(results) == 1:
863 results = list(results.values())[0]
864
865 return results
866
867 def run(self):
868 if self.config.dataset.type == 'COCOStuffSegDatasetDev':

Callers 2

test_with_TTAMethod · 0.95
runMethod · 0.95

Calls 4

inference_on_datasetMethod · 0.95
SemSegEvaluatorClass · 0.90
print_csv_formatFunction · 0.85
infoMethod · 0.45

Tested by 1

test_with_TTAMethod · 0.76