CornellNLP / ConvoKit

ConvoKit is a toolkit for extracting conversational features and analyzing social phenomena in conversations. It includes several large conversational datasets along with scripts exemplifying the use of the toolkit on these datasets.
https://convokit.cornell.edu/documentation/
MIT License
542 stars 120 forks source link

Small fixes for expected context transformer model #211

Closed vianxnguyen closed 4 months ago

vianxnguyen commented 6 months ago

Description

This PR includes small fixes to the Expected Context Transformer Model to account for changes in numpy and sklearn dependencies.

  1. Change use of sklearn normalize to ensure we are passing in numpy array and not numpy matrix since use of normalize and other linear algebra operations for matrices are being deprecated here.
  2. Set allow_pickle field to True when loading Expected Context saved files since they contain objects. This field is now default to False as of numpy version 1.16.3 here.

How has this been tested?

Manually.

Other information

Note the change in np.load may affect loading of other models if they save pickled data.

seanzhangkx8 commented 4 months ago

KC and I tested locally with notebook, worked with older version of scipy. Will file an issue later about newer version scipy related issue. Thank you Vivian! Will merge now.