Guzpenha / query_variation_generators

Code for the ECIR'22 paper "Evaluating the Robustness of Retrieval Pipelines with Query Variation Generators"
15 stars 4 forks source link

Error running generate_weak_supervision #2

Closed magnolini closed 1 year ago

magnolini commented 1 year ago

Hello, I'm trying to run your code. Using the command in your tutorial I have this Error. I've tried to run "pip install ." to see if it helps, but I still have this problem

Traceback (most recent call last): File "examples/generate_weak_supervision.py", line 1, in from disentangled_information_needs.transformations.synonym import SynonymActions ModuleNotFoundError: No module named 'disentangled_information_needs'

magnolini commented 1 year ago

On the other hand, if I run it using pycharm (on Windows) I have this other error

2023-06-12 16:19:52,183 [INFO] Generating weak supervision for task antique/test and saving results in antique. Traceback (most recent call last): File "C:\Users\simon\PycharmProjects\query_variation_generators\examples\generate_weak_supervision.py", line 80, in main() File "C:\Users\simon\PycharmProjects\query_variation_generators\examples\generate_weak_supervision.py", line 46, in main pa = ParaphraseActions(queries, q_ids, args.output_dir) File "C:\Users\simon\PycharmProjects\query_variation_generators\disentangled_information_needs\transformations\paraphrase.py", line 16, in init ('ramsrigouthamg/t5_paraphraser', pipeline("text2text-generation", model = "ramsrigouthamg/t5_paraphraser", device=CUDA_DEVICE)), File "C:\Users\simon.conda\envs\query_variation_generators\lib\site-packages\transformers\pipelines__init.py", line 988, in pipeline return pipeline_class(model=model, framework=framework, task=task, **kwargs) File "C:\Users\simon.conda\envs\query_variation_generators\lib\site-packages\transformers\pipelines\text2text_generation.py", line 65, in init super().init(*args, **kwargs) File "C:\Users\simon.conda\envs\query_variation_generators\lib\site-packages\transformers\pipelines\base.py", line 780, in init self.model.to(device) File "C:\Users\simon.conda\envs\query_variation_generators\lib\site-packages\transformers\modeling_utils.py", line 1902, in to return super().to(*args, **kwargs) File "C:\Users\simon.conda\envs\query_variation_generators\lib\site-packages\torch\nn\modules\module.py", line 1145, in to return self._apply(convert) File "C:\Users\simon.conda\envs\query_variation_generators\lib\site-packages\torch\nn\modules\module.py", line 797, in _apply module._apply(fn) File "C:\Users\simon.conda\envs\query_variation_generators\lib\site-packages\torch\nn\modules\module.py", line 820, in _apply param_applied = fn(param) File "C:\Users\simon.conda\envs\query_variation_generators\lib\site-packages\torch\nn\modules\module.py", line 1143, in convert return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking) File "C:\Users\simon.conda\envs\query_variation_generators\lib\site-packages\torch\cuda\init__.py", line 239, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled

Which version of CUDA did you use? Or maybe it's not needed?

magnolini commented 1 year ago

I manualy installed tensorflow-text and it's working