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:
@@ -362,7 +362,7 @@ def convert_to_localized_md(model_list, localized_model_list, format_str):
|
||||
model_keys = [re.search(r"\*\*\[([^\]]*)", line).groups()[0] for line in model_list.strip().split("\n")]
|
||||
|
||||
# We exclude keys in localized README not in the main one.
|
||||
readmes_match = not any([k not in model_keys for k in localized_model_index])
|
||||
readmes_match = not any(k not in model_keys for k in localized_model_index)
|
||||
localized_model_index = {k: v for k, v in localized_model_index.items() if k in model_keys}
|
||||
|
||||
for model in model_list.strip().split("\n"):
|
||||
|
||||
Reference in New Issue
Block a user