thuiar / TEXTOIR

TEXTOIR is the first opensource toolkit for text open intent recognition. (ACL 2021)
https://github.com/thuiar/TEXTOIR
MIT License
195 stars 30 forks source link

intent detection: methods/ADB/pretrain.py cannot import name 'sigmoid_rampup', 'linear_rampup' #38

Closed Ancrilin closed 1 year ago

Ancrilin commented 1 year ago

Hi~ Thank you so much for your open-source platform. I want to run MSP method in intent detection. I run this commonds sh examples/run_ADB.sh and sh examples/run_MAP.sh. The platform would first run methods/__init__.py, but in methods/ADB/pretrain.py that cannot import name 'sigmoid_rampup' and 'linear_rampup'. I found that 'sigmoid_rampup' and 'linear_rampup' not in utils/functions.py. What should I do to run the method (MSP, ADB, etc.) in the examples ?

Ancrilin commented 1 year ago

And I can not install all the dependencies by running pip install -r requirements.txt. The differences are:

  1. mkl_random==1.2.2
  2. torch==1.7.1+cu110
  3. Pillow==8.4.0
  4. transformers==4.23.1 In order to be more user-friendly, please clean and update the reqiurements.txt
HanleiZhang commented 1 year ago

Hi~ Thank you so much for your open-source platform. I want to run MSP method in intent detection. I run this commonds sh examples/run_ADB.sh and sh examples/run_MAP.sh. The platform would first run methods/init.py, but in methods/ADB/pretrain.py that cannot import name 'sigmoid_rampup' and 'linear_rampup'. I found that 'sigmoid_rampup' and 'linear_rampup' not in utils/functions.py. What should I do to run the method (MSP, ADB, etc.) in the examples ?

We don't use the two functions and have deleted them in methods/ADB/pretrain.py. It should work now. Thanks for your mentioning.

HanleiZhang commented 1 year ago

And I can not install all the dependencies by running pip install -r requirements.txt. The differences are:

  1. mkl_random==1.2.2
  2. torch==1.7.1+cu110
  3. Pillow==8.4.0
  4. transformers==4.23.1 In order to be more user-friendly, please clean and update the reqiurements.txt

We have updated the requirements.txt and you can download the newest version and try again.