kssteven418 / LTP

[KDD'22] Learned Token Pruning for Transformers
https://arxiv.org/abs/2107.00910
Apache License 2.0
93 stars 17 forks source link

Cannot run with or without installing transformer. #11

Open KevinHooah opened 1 year ago

KevinHooah commented 1 year ago

Hi, I found I cannot run the learned token pruning whether I install the transformers or not.

If I install transformer, it will raise the error of ValueError: Some specified arguments are not used by the HfArgumentParser: ['--masking_mode', 'soft', '--weight_decay_threshold', '0.0', '--lambda_threshold', '0.1', '--temperature', '0.0001']. I think it is because these arguments are customized in src/transformers.

If I go with an environment which doesn't install the transformer, it will have ModuleNotFoundError: No module named 'transformers'. It simply cannot import from /src .

If I force the code of run_glue_ltp with sys.path.insert(1, './src/'). It will have the error of pkg_resources.DistributionNotFound: The 'sacremoses' distribution was not found and is required by this application.

Can you tell me how to run the code properly? Thanks.

WPS852 commented 6 months ago

the same...