Skip to content

Using HuggingFace Transformers pipeline? #236

Closed
@Dijkie85

Description

@Dijkie85

Hi! Trying to port a Python project into Julia. Julia's Transformers.jl library, however, doesn't seem to support HuggingFace pipelines, so I'm turning to PythonCall in order to use the Python package transformers. I can import it ok with transformers = pyimport("transformers"), but I get the following error when trying to actually call transformers.pipeline:

julia> pos = transformers.pipeline("token-classification", model="PlanTL-GOB-ES/roberta-large-bne-capitel-pos")
ERROR: Python: RuntimeError: Failed to import transformers.pipelines because of the following error (look up to see its traceback):
/home/dijkie/packages/julias/julia-1.8/bin/../lib/julia/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /home/dijkie/miniconda3/envs/ds/lib/python3.10/site-packages/scipy/optimize/_highs/_highs_wrapper.cpython-310-x86_64-linux-gnu.so)
Python stacktrace:
 [1] _get_module
   @ transformers.file_utils ~/miniconda3/envs/ds/lib/python3.10/site-packages/transformers/file_utils.py:2779
 [2] __getattr__
   @ transformers.file_utils ~/miniconda3/envs/ds/lib/python3.10/site-packages/transformers/file_utils.py:2767
Stacktrace:
 [1] pythrow()
   @ PythonCall ~/.julia/packages/PythonCall/eU0yr/src/err.jl:94
 [2] errcheck
   @ ~/.julia/packages/PythonCall/eU0yr/src/err.jl:10 [inlined]
 [3] pygetattr(x::Py, k::String)
   @ PythonCall ~/.julia/packages/PythonCall/eU0yr/src/abstract/object.jl:60
 [4] getproperty(x::Py, k::Symbol)
   @ PythonCall ~/.julia/packages/PythonCall/eU0yr/src/Py.jl:272
 [5] top-level scope
   @ REPL[7]:1

So, there seems to be a problem with GLIBCXX_3.4.30 which I cannot decipher, much less correct.
Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions