ZhangYuanhan-AI / NOAH

[TPAMI] Searching prompt modules for parameter-efficient transfer learning.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error in lib/config.py

JornyWan opened this issue · comments

hi, i followed your instructions and then i met an error shown below:

File "NOAH/lib/config.py", line 36, in update_config_from_file
exp_config = edict(yaml.safe_load(f))
File "/.conda/envs/NOAH/lib/python3.8/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf9 in position 15: invalid start byte

Then i add " encoding='ISO-8859-1' " to the config.py:

def update_config_from_file(filename):
exp_config = None
with open(filename , 'ISO-8859-1') as f:
exp_config = edict(yaml.safe_load(f))
_update_config(cfg, exp_config)

but there is a new error making me hard to move to next step:

File "/.conda/envs/NOAH/lib/python3.8/site-packages/yaml/reader.py", line 144, in check_printable
raise ReaderError(self.name, position, ord(character),
yaml.reader.ReaderError: unacceptable character #x0003: special characters are not allowed
in "vit_model/ViT-B_16.npz", position 2

could you please solve this problem? and if there are any other problems that you did not post? i just want to reproduce this work. thx!

Hi Jorny,

Thank you for expressing your interest. Kindly provide information regarding the environments in which you have executed this code.

I just create a new env and pip install -r requirements like you do,
and i just finish this issue and i can move into the "Start training" stage,
but it returns:
RuntimeError: cuDNN error: CUDNN_STATUS_NOT_INITIALIZED

thx, i just fixed them all!