You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting this error while training BLIP2 for pretrain_stage1 :
2025-01-16 07:08:42.752475: I tensorflow/core/util/port.cc:153] 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`.
2025-01-16 07:08:42.770737: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:485] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2025-01-16 07:08:42.791438: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:8454] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2025-01-16 07:08:42.797970: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1452] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2025-01-16 07:08:42.814311: I tensorflow/core/platform/cpu_feature_guard.cc:210] 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.
2025-01-16 07:08:44.015072: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
error: XDG_RUNTIME_DIR not set in the environment.
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default
Traceback (most recent call last):
File "/content/LAVIS/train.py", line 16, in <module>
import lavis.tasks as tasks
File "/content/LAVIS/lavis/__init__.py", line 15, in <module>
from lavis.datasets.builders import *
File "/content/LAVIS/lavis/datasets/builders/__init__.py", line 8, in <module>
from lavis.datasets.builders.base_dataset_builder import load_dataset_config
File "/content/LAVIS/lavis/datasets/builders/base_dataset_builder.py", line 18, in <module>
from lavis.processors.base_processor import BaseProcessor
File "/content/LAVIS/lavis/processors/__init__.py", line 29, in <module>
from lavis.processors.audio_processors import BeatsAudioProcessor
File "/content/LAVIS/lavis/processors/audio_processors.py", line 17, in <module>
from lavis.models.beats.Tokenizers import TokenizersConfig, Tokenizers
File "/content/LAVIS/lavis/models/__init__.py", line 42, in <module>
from lavis.models.blip2_models.blip2_vicuna_xinstruct import Blip2VicunaXInstruct
File "/content/LAVIS/lavis/models/blip2_models/blip2_vicuna_xinstruct.py", line 22, in <module>
from peft import (
File "/usr/local/lib/python3.11/dist-packages/peft/__init__.py", line 22, in <module>
from .auto import (
File "/usr/local/lib/python3.11/dist-packages/peft/auto.py", line 32, in <module>
from .mapping import MODEL_TYPE_TO_PEFT_MODEL_MAPPING
File "/usr/local/lib/python3.11/dist-packages/peft/mapping.py", line 25, in <module>
from .mixed_model import PeftMixedModel
File "/usr/local/lib/python3.11/dist-packages/peft/mixed_model.py", line 29, in <module>
from .peft_model import PeftModel
File "/usr/local/lib/python3.11/dist-packages/peft/peft_model.py", line 37, in <module>
from transformers import Cache, DynamicCache, EncoderDecoderCache, PreTrainedModel
ImportError: cannot import name 'Cache' from 'transformers' (/usr/local/lib/python3.11/dist-packages/transformers/__init__.py)
as i am running it in colab with A100. All other parameters in yaml are same as default.
This is my updated pretrain_stage1.sh file : !python train.py --cfg-path lavis/projects/blip2/train/pretrain_stage1.yaml
Can anyone provide me the solution??
The text was updated successfully, but these errors were encountered:
parth1313
changed the title
Getting error :ImportError: cannot import name 'Cache' from 'transformers' (/usr/local/lib/python3.11/dist-packages/transformers/__init__.py)
Getting error while Stage-1 Pre-training of BLIP2
Jan 16, 2025
Hey all,
I am getting this error while training BLIP2 for pretrain_stage1 :
This is my pretrain_stage1.yaml file changes :
as i am running it in colab with A100. All other parameters in yaml are same as default.
This is my updated pretrain_stage1.sh file :
!python train.py --cfg-path lavis/projects/blip2/train/pretrain_stage1.yaml
Can anyone provide me the solution??
The text was updated successfully, but these errors were encountered: