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:
@@ -56,8 +56,8 @@ class Seq2seqTrainerTester(TestCasePlus):
|
||||
]
|
||||
batch["decoder_attention_mask"] = outputs.attention_mask
|
||||
|
||||
assert all([len(x) == 512 for x in inputs.input_ids])
|
||||
assert all([len(x) == 128 for x in outputs.input_ids])
|
||||
assert all(len(x) == 512 for x in inputs.input_ids)
|
||||
assert all(len(x) == 128 for x in outputs.input_ids)
|
||||
|
||||
return batch
|
||||
|
||||
|
||||
Reference in New Issue
Block a user