Closed odashi closed 1 year ago
@neubig This change generates a bunch of errors due to unclear ndarray operations in inherited classes. I couldn't fully realize the correct fix of each implementation. Could you take a look at and fix them if possible?
Thanks @odashi ! I fixed most.
@pfliu-nlp : it seems that the remaining ones are APE and NLG meta-evaluation, where you're more familiar than I am. Would you be able to take a look? My commit here might be a good reference: https://github.com/neulab/ExplainaBoard/pull/499/commits/de3dac48b5cffcadf99d1980af4cddad44bc22d0
Sure. I'm working on this.
According to the internal discussion, we will introduce use_customized_aggregate()
flag function that informs the assertion to skip to check the size of the last dimension.
I'll take a quick look at this.
@odashi and @pfliu-nlp : tests seem to be passing. you could take a look at my commits and see if you have comments.
This change introduces strict shape checking of return values of
Metric.aggregate_stats
andMetric.calc_metric_from_aggregate
. These functions are now defined as a wrapper of inner functions (that may be overridden), and checks if the return values have expected shape.May fix #497.