-
Notifications
You must be signed in to change notification settings - Fork 27.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert numpy arrays to lists before saving the evaluation metrics as json #23268
Conversation
per_category_iou and per_category_accuracy are ndarray in the eval_metrics
convert numpy array to list before writing to json
@sgugger Can you please review this small update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Can you just run make style
on your branch to fix the styling issue?
The documentation is not available anymore as the PR was closed or merged. |
yes, the styling issue is now fixed. |
… json (huggingface#23268) * convert numpy array to list before writing to json per_category_iou and per_category_accuracy are ndarray in the eval_metrics * code reformatted with make style
… json (huggingface#23268) * convert numpy array to list before writing to json per_category_iou and per_category_accuracy are ndarray in the eval_metrics * code reformatted with make style
… json (huggingface#23268) * convert numpy array to list before writing to json per_category_iou and per_category_accuracy are ndarray in the eval_metrics * code reformatted with make style
eval_metrics contains:
- mean_iou: float
- mean_accuracy: float
- overall_accuracy: float
- per_category_iou: ndarray of shape (num_labels,)
- per_category_accuracy: ndarray of shape (num_labels,)
ndarrays are to be converted to lists for json serialization.