Fix TypeError: Object of type int64 is not JSON serializable (#24340)
* Fix TypeError: Object of type int64 is not JSON serializable * Convert numpy.float64 and numpy.int64 to float and int for json serialization * Black reformatted examples/pytorch/token-classification/run_ner_no_trainer.py * * make style
This commit is contained in:
@@ -1566,7 +1566,7 @@ class TFModelTesterMixin:
|
||||
return_labels=True if "labels" in inspect.signature(model_class.call).parameters.keys() else False,
|
||||
)
|
||||
if not any(
|
||||
[tensor.dtype.is_integer for tensor in prepared_for_class.values() if isinstance(tensor, tf.Tensor)]
|
||||
tensor.dtype.is_integer for tensor in prepared_for_class.values() if isinstance(tensor, tf.Tensor)
|
||||
):
|
||||
return # No integer inputs means no need for this test
|
||||
|
||||
|
||||
Reference in New Issue
Block a user