Unverified Commit 9169899b authored by Baber Abbasi's avatar Baber Abbasi Committed by GitHub
Browse files

skip casting if predict_only (#2524)

parent 5680a2e6
......@@ -1503,7 +1503,10 @@ class ConfigurableTask(Task):
# we expect multiple_targets to be a list.
elif self.multiple_target:
gold = list(gold)
elif type(gold) is not type(result):
elif (
type(gold) is not type(result)
and "bypass" not in self._metric_fn_list.keys()
):
# cast gold to the same type as result
gold = type(result)(gold)
......
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