在计算得分的时候报错
您好,请问一下,
results = self._model.compute_score(sentence_pairs, cutoff_layers=[28]) # Adjusting 'cutoff_layers' to pick which layers are used for computing the score.
2024-03-29 09:03:26 | ERROR | stderr | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-29 09:03:26 | ERROR | stderr | File "/usr/local/python3.11.6/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
2024-03-29 09:03:26 | ERROR | stderr | return func(*args, **kwargs)
2024-03-29 09:03:26 | ERROR | stderr | ^^^^^^^^^^^^^^^^^^^^^
2024-03-29 09:03:26 | ERROR | stderr | File "/usr/local/python3.11.6/lib/python3.11/site-packages/FlagEmbedding-1.2.8-py3.11.egg/FlagEmbedding/flag_reranker.py", line 368, in compute_score
2024-03-29 09:03:26 | ERROR | stderr | for inputs in tqdm(dataloader):
2024-03-29 09:03:26 | ERROR | stderr | File "/usr/local/python3.11.6/lib/python3.11/site-packages/tqdm/std.py", line 1182, in iter
2024-03-29 09:03:26 | ERROR | stderr | for obj in iterable:
2024-03-29 09:03:26 | ERROR | stderr | File "/usr/local/python3.11.6/lib/python3.11/site-packages/torch/utils/data/dataloader.py", line 438, in iter
2024-03-29 09:03:26 | ERROR | stderr | return self._get_iterator()
2024-03-29 09:03:26 | ERROR | stderr | ^^^^^^^^^^^^^^^^^^^^
2024-03-29 09:03:26 | ERROR | stderr | File "/usr/local/python3.11.6/lib/python3.11/site-packages/torch/utils/data/dataloader.py", line 386, in _get_iterator
2024-03-29 09:03:26 | ERROR | stderr | return _MultiProcessingDataLoaderIter(self)
2024-03-29 09:03:26 | ERROR | stderr | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-29 09:03:26 | ERROR | stderr | File "/usr/local/python3.11.6/lib/python3.11/site-packages/torch/utils/data/dataloader.py", line 1039, in init
2024-03-29 09:03:26 | ERROR | stderr | w.start()
2024-03-29 09:03:26 | ERROR | stderr | File "/usr/local/python3.11.6/lib/python3.11/multiprocessing/process.py", line 118, in start
2024-03-29 09:03:26 | ERROR | stderr | assert not _current_process._config.get('daemon'),
2024-03-29 09:03:26 | ERROR | stderr | AssertionError: daemonic processes are not allowed to have children
这个报错,是什么原因?打印了数据集,对比了是正确的。
您可能使用到了与hypercorn相关的代码,而reranker与hypercorn不太兼容。
现在代码已经更新,在compute_score的时候可以传参use_dataloader=False,应该可以解决这个问题
现在代码已经更新,在compute_score的时候可以传参use_dataloader=False,应该可以解决这个问题
您好,请问是更新的什么代码啊,在哪里获取到。
可以在github上git clone获取代码,然后pip install .