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:
@@ -79,7 +79,7 @@ SMALL_TRAINING_CORPUS = [
|
||||
|
||||
def filter_non_english(_, pretrained_name: str):
|
||||
"""Filter all the model for non-english language"""
|
||||
return not any([lang in pretrained_name for lang in NON_ENGLISH_TAGS])
|
||||
return not any(lang in pretrained_name for lang in NON_ENGLISH_TAGS)
|
||||
|
||||
|
||||
def filter_roberta_detectors(_, pretrained_name: str):
|
||||
|
||||
Reference in New Issue
Block a user