1、错误信息:cannot import name 'notf' from 'tensorboard.compat'
(dl_base) [root@localhost WiNGPT2]# python test.py
[2023-10-08 02:18:35,071] [INFO] [real_accelerator.py:158:get_accelerator] Setting ds_accelerator to cuda (auto detect)
Traceback (most recent call last):File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/tensorboard/compat/__init__.py", line 42, in tffrom tensorboard.compat import notf # noqa: F401
ImportError: cannot import name 'notf' from 'tensorboard.compat' (/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/tensorboard/compat/__init__.py)During handling of the above exception, another exception occurred:Traceback (most recent call last):File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/transformers/utils/import_utils.py", line 1184, in _get_modulereturn importlib.import_module("." + module_name, self.__name__)File "/home/software/miniconda3/envs/dl_base/lib/python3.9/importlib/__init__.py", line 127, in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)
。。。。。。。。
解决方法:
pip uninstall protobuf
pip install protobuf==3.20.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
2、 待续