Moving token-classification pipeline to new testing. (#13286)
* Moving `token-classification` pipeline to new testing. * Fix tests.
This commit is contained in:
@@ -1329,7 +1329,7 @@ def nested_simplify(obj, decimals=3):
|
||||
return nested_simplify(obj.numpy().tolist())
|
||||
elif isinstance(obj, float):
|
||||
return round(obj, decimals)
|
||||
elif isinstance(obj, np.float32):
|
||||
elif isinstance(obj, (np.int32, np.float32)):
|
||||
return nested_simplify(obj.item(), decimals)
|
||||
else:
|
||||
raise Exception(f"Not supported: {type(obj)}")
|
||||
|
||||
Reference in New Issue
Block a user