sentencepiece icon indicating copy to clipboard operation
sentencepiece copied to clipboard

Compatibility Issue when using v0.2.0 with transformers and tensorflow

Open aws-tianquaw opened this issue 1 year ago • 4 comments

I recently encountered some compatibility issue when using sentencepiece v0.2.0 together with latest transformers and tensorflow packages. When I ran some Python script that imports AutoProcessor class from transformers, the Python kernel was killed with the following error message:

ERROR: Flag 'minloglevel' was defined more than once (in files 'src/error.cc' and 'home/conda/feedstock_root/build_artifacts/abseil-split_1720857154496/work/absl/log/flags.cc').

I tried to downgrade sentencepiece to v0.1.99 and then the issue was solved.

Commands to reproduce the issue:

conda create -n "py311" python=3.11
source activate py311
conda install -c conda-forge transformers==4.45 tensorflow==2.17 sentencepiece==0.2
python -c "from transformers import AutoProcessor"

aws-tianquaw avatar Oct 02 '24 22:10 aws-tianquaw

Running into a similar issue, with the same temporary resolution of downgrading sentencepiece to 0.1.99.

Genjidegaulle avatar Oct 18 '24 21:10 Genjidegaulle

Hi team, any update on this issue?

aws-tianquaw avatar Jan 15 '25 00:01 aws-tianquaw

bumping this - it is impossible to use transformers and 0.2.0 together - e.g. mistral-common requires 0.2.0 but we need to run both together without downgrading to 0.1.99

odusseys avatar Jan 28 '25 08:01 odusseys

This project doesn't look maintained anymore, I doubt it will be fixed. AI dependencies are being released every day 🤷

reneleonhardt avatar Jun 11 '25 17:06 reneleonhardt

This occurs when sentencepiece is built with an external Abseil package (_USE_EXTERNAL_ABSL is enabled), and another library attempts to define minloglevel using the same Abseil library.

This is not a pip package that we distribute (_USE_EXTERNAL_ABSL is disabled), so it is essentially unsupported. We believe conda has created its own package, so please contact the author of that package. Since we know the cause, we conclude that this is an issue with the build environment.

Thank you.

taku910 avatar Aug 02 '25 11:08 taku910