ConvLab-2 icon indicating copy to clipboard operation
ConvLab-2 copied to clipboard

[Maintenance] update setup.py

Open aaa123git opened this issue 3 years ago • 1 comments

I suggest updating setup.py

  • In setup.py, python_requires is set '>=3.5'. https://github.com/thu-coai/ConvLab-2/blob/f822c20f5b5d703019c4bd0048b9e84d96038887/setup.py#L90 However, python 3.5 is out-of-date. What's more, some codes rely on python 3.6 features. https://github.com/thu-coai/ConvLab-2/blob/f822c20f5b5d703019c4bd0048b9e84d96038887/convlab2/util/analysis_tool/analyzer.py#L53 Issue #202 suggests that python version should be >= 3.7, but I suggest >=3.6 currently and >=3.7 in the future.
  • ConvLab2 should support the latest transformers instead of '<3.0.0' https://github.com/thu-coai/ConvLab-2/blob/f822c20f5b5d703019c4bd0048b9e84d96038887/setup.py#L46 I know, error will be raise in BERTNLU with transformers>=3.0.0 , because the model_config['pretrained_weights'] is trained with transformers<3.0.0. The parameters of BertModel in the two versions are different, but the only difference is the position embeddings. This problem can be solved easily. https://github.com/thu-coai/ConvLab-2/blob/f822c20f5b5d703019c4bd0048b9e84d96038887/convlab2/nlu/jointBERT/multiwoz/nlu.py#L52 https://github.com/thu-coai/ConvLab-2/blob/f822c20f5b5d703019c4bd0048b9e84d96038887/convlab2/nlu/jointBERT/jointBERT.py#L15

aaa123git avatar Jul 30 '21 06:07 aaa123git

Need to check if other models require transformers<3.0.0

zqwerty avatar Aug 07 '21 01:08 zqwerty