安装依赖库之后运行llamafactory-cli相关指令报错提示No Module named 'flatbuffers' 但是我的site-packages和conda list都显示有 #5048
Closed
1 task done
Labels
solved
This problem has been already solved
Reminder
System Info
python==3.11.9
Reproduction
2024-08-02 10:01:40.594531: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable
TF_ENABLE_ONEDNN_OPTS=0
.2024-08-02 10:01:41.957354: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-08-02 10:01:41.957496: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-08-02 10:01:42.143347: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-08-02 10:01:42.542183: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
File "/data1/home/purui/.local/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1586, in _get_module
return importlib.import_module("." + module_name, self.name)
File "/data1/home/wenxibing/anaconda3/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 992, in _find_and_load_unlocked
File "", line 241, in _call_with_frames_removed
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/data1/home/purui/.local/lib/python3.10/site-packages/transformers/data/init.py", line 27, in
from .processors import (
File "/data1/home/purui/.local/lib/python3.10/site-packages/transformers/data/processors/init.py", line 15, in
from .glue import glue_convert_examples_to_features, glue_output_modes, glue_processors, glue_tasks_num_labels
File "/data1/home/purui/.local/lib/python3.10/site-packages/transformers/data/processors/glue.py", line 30, in
import tensorflow as tf
File "/data1/home/wenxibing/anaconda3/lib/python3.10/site-packages/tensorflow/init.py", line 54, in
from tensorflow._api.v2 import compat
File "/data1/home/wenxibing/anaconda3/lib/python3.10/site-packages/tensorflow/_api/v2/compat/init.py", line 8, in
from tensorflow._api.v2.compat import v1
File "/data1/home/wenxibing/anaconda3/lib/python3.10/site-packages/tensorflow/_api/v2/compat/v1/init.py", line 32, in
from tensorflow._api.v2.compat.v1 import compat
File "/data1/home/wenxibing/anaconda3/lib/python3.10/site-packages/tensorflow/_api/v2/compat/v1/compat/init.py", line 8, in
from tensorflow._api.v2.compat.v1.compat import v1
File "/data1/home/wenxibing/anaconda3/lib/python3.10/site-packages/tensorflow/_api/v2/compat/v1/compat/v1/init.py", line 49, in
from tensorflow._api.v2.compat.v1 import lite
File "/data1/home/wenxibing/anaconda3/lib/python3.10/site-packages/tensorflow/_api/v2/compat/v1/lite/init.py", line 9, in
from tensorflow._api.v2.compat.v1.lite import experimental
File "/data1/home/wenxibing/anaconda3/lib/python3.10/site-packages/tensorflow/_api/v2/compat/v1/lite/experimental/init.py", line 8, in
from tensorflow._api.v2.compat.v1.lite.experimental import authoring
File "/data1/home/wenxibing/anaconda3/lib/python3.10/site-packages/tensorflow/_api/v2/compat/v1/lite/experimental/authoring/init.py", line 8, in
from tensorflow.lite.python.authoring.authoring import compatible # line: 265
File "/data1/home/wenxibing/anaconda3/lib/python3.10/site-packages/tensorflow/lite/python/authoring/authoring.py", line 43, in
from tensorflow.lite.python import convert
File "/data1/home/wenxibing/anaconda3/lib/python3.10/site-packages/tensorflow/lite/python/convert.py", line 29, in
from tensorflow.lite.python import util
File "/data1/home/wenxibing/anaconda3/lib/python3.10/site-packages/tensorflow/lite/python/util.py", line 22, in
import flatbuffers
ModuleNotFoundError: No module named 'flatbuffers'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/data1/home/purui/.local/bin/llamafactory-cli", line 5, in
from llamafactory.cli import main
File "/data1/home/purui/projects/LLaMA-Factory/src/llamafactory/init.py", line 38, in
from .cli import VERSION
File "/data1/home/purui/projects/LLaMA-Factory/src/llamafactory/cli.py", line 21, in
from . import launcher
File "/data1/home/purui/projects/LLaMA-Factory/src/llamafactory/launcher.py", line 15, in
from llamafactory.train.tuner import run_exp
File "/data1/home/purui/projects/LLaMA-Factory/src/llamafactory/train/tuner.py", line 22, in
from ..data import get_template_and_fix_tokenizer
File "/data1/home/purui/projects/LLaMA-Factory/src/llamafactory/data/init.py", line 15, in
from .collator import KTODataCollatorWithPadding, PairwiseDataCollatorWithPadding, SFTDataCollatorWith4DAttentionMask
File "/data1/home/purui/projects/LLaMA-Factory/src/llamafactory/data/collator.py", line 22, in
from transformers import DataCollatorForSeq2Seq
File "", line 1075, in _handle_fromlist
File "/data1/home/purui/.local/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1576, in getattr
module = self._get_module(self._class_to_module[name])
File "/data1/home/purui/.local/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1588, in _get_module
raise RuntimeError(
RuntimeError: Failed to import transformers.data.data_collator because of the following error (look up to see its traceback):
No module named 'flatbuffers'
Expected behavior
运行llamafactory-cli webui出现报错,运行其他llamafactory-cli指令都会报相同错误
Others
No response
The text was updated successfully, but these errors were encountered: