summac icon indicating copy to clipboard operation
summac copied to clipboard

Fix bugs in initializing `self.cnndm` in `benchmark.py`

Open forrestbao opened this issue 7 months ago • 1 comments

Critical change:

Below, lines 44 and 54 can cause an error due to CNNDM is undefined. And there is no need for the global variable CNNDM when self.cnndm presents.

This bug fix uses only self.cnndm which is initialized to None. And when it is none, self.get_cnndm_documents() or self.get_cnndm_references() will populate it with real data.

https://github.com/tingofurro/summac/blob/9e4f35722b635402c6fd5a1399d987bc80b45b43/summac/benchmark.py#L41-L56

Non-critical change: This fix also exposes cache_dir of Huggingface datasets.load_datasets().

forrestbao avatar Dec 03 '23 22:12 forrestbao