trankit
trankit copied to clipboard
trankit fails on import
trankit fails on import:
from trankit import Pipeline
Python 3.12:
ValueError: mutable default <class 'trankit.adapter_transformers.adapter_config.InvertibleAdapterConfig'> for field invertible_adapter is not allowed: use default_factory
Python 3.10 as suggested in closed issues from 2023 with above error:
RuntimeError: Failed to import transformers.models.xlm_roberta.modeling_xlm_roberta because of the following error (look up to see its traceback):
module 'torch' has no attribute 'compiler'
what to try next?
Hi @saveli, here it worked when I used Python 3.9.13 and:
trankit==1.1.2
numpy==1.26.4
transformers==4.48.3
adapters==1.1.1