"...git@developer.sourcefind.cn:OpenDAS/megatron-lm.git" did not exist on "06fc51cef50fded88e0142f32b40dc615e39672a"
Unverified Commit 037e2b17 authored by srihari-humbarwadi's avatar srihari-humbarwadi
Browse files

avoid redundant numpy conversion

parent 8f6fc266
...@@ -154,8 +154,6 @@ class PanopticQualityEvaluator: ...@@ -154,8 +154,6 @@ class PanopticQualityEvaluator:
ValueError: if the required prediction or groundtruth fields are not ValueError: if the required prediction or groundtruth fields are not
present in the incoming `predictions` or `groundtruths`. present in the incoming `predictions` or `groundtruths`.
""" """
groundtruths, predictions = self._convert_to_numpy(groundtruths,
predictions)
for k in self._required_prediction_fields: for k in self._required_prediction_fields:
if k not in predictions: if k not in predictions:
raise ValueError( raise ValueError(
...@@ -191,4 +189,6 @@ class PanopticQualityEvaluator: ...@@ -191,4 +189,6 @@ class PanopticQualityEvaluator:
self._pq_metric_module.compare_and_accumulate( self._pq_metric_module.compare_and_accumulate(
_groundtruths, _predictions) _groundtruths, _predictions)
else: else:
groundtruths, predictions = self._convert_to_numpy(
groundtruths, predictions)
self._pq_metric_module.compare_and_accumulate(groundtruths, predictions) self._pq_metric_module.compare_and_accumulate(groundtruths, predictions)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment