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

Convokit 3.0 Mega Pull Request #197

Closed seanzhangkx8 closed 1 year ago

seanzhangkx8 commented 1 year ago

Description

This is the Mega PR for ConvoKit 3.0 Release Updates. let's do it in chronological order

  1. Fix coordination.py with use of mutability of metadata - bug fix
  2. Major immutability of metadata implementation, with a deepcopy of metadata field returned upon accesses of metadata fields. This prevent all potential modification to metadata fields from affecting the actual storage, same as making metadata fields immutable. The purpose of this is to align behavior between MEM mode to DB mode, as DB mode has the issue with mutation to metadata fields not able to be updated to database. - major update
  3. Documentation updates for version 3.0 - documentation update
  4. Pairer with pair_mode set to 'maximize' leads to error when pairing function returns integer (TypeError: unsupported operand type(s) for +: 'int' and 'str' ). We now implement to cast all returned value of pairing function to string when pair_mode is 'maximize', so that fix the bug, and as the case when it will not work is very rare (casting custom type to string etc, handled explicitly), this method would generally work - bug fix

Motivation and Context

The major update for ConvoKit 3.0 is to introduce DB mode, with the support of MongoDB backend. Thus, we are able to work with large scale corpus in a more RAM friendly and stable fashion. To support the new version, immutability of metadata is introduced to align the behavior of two modes. For more detail, view the updated documentation.

How has this been tested?

Run through all tests, example notebooks with no error found.

cristiandnm commented 1 year ago

Accepting pull request, to switch to 3.0.