FudanDISC / DISC-MedLLM

Repository of DISC-MedLLM, it is a comprehensive solution that leverages Large Language Models (LLMs) to provide accurate and truthful medical response in end-to-end conversational healthcare services.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

运行时报错,看不懂啥原因

renfeng3 opened this issue · comments

2023-09-28 16:14:51.050 Uncaught app exception
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/streamlit/runtime/caching/cache_utils.py", line 263, in _get_or_create_cached_value
cached_result = cache.read_result(value_key)
File "/usr/local/lib/python3.9/site-packages/streamlit/runtime/caching/cache_resource_api.py", line 500, in read_result
raise CacheKeyNotFoundError()
streamlit.runtime.caching.cache_errors.CacheKeyNotFoundError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/streamlit/runtime/caching/cache_utils.py", line 311, in _handle_cache_miss
cached_result = cache.read_result(value_key)
File "/usr/local/lib/python3.9/site-packages/streamlit/runtime/caching/cache_resource_api.py", line 500, in read_result
raise CacheKeyNotFoundError()
streamlit.runtime.caching.cache_errors.CacheKeyNotFoundError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 541, in _run_script
exec(code, module.dict)
File "/Users/renfeng/works/idea/workspace_zz/DISC-MedLLM-main/web_demo.py", line 72, in
main()
File "/Users/renfeng/works/idea/workspace_zz/DISC-MedLLM-main/web_demo.py", line 51, in main
model, tokenizer = init_model()
File "/usr/local/lib/python3.9/site-packages/streamlit/runtime/caching/cache_utils.py", line 211, in wrapper
return cached_func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/streamlit/runtime/caching/cache_utils.py", line 240, in call
return self._get_or_create_cached_value(args, kwargs)
File "/usr/local/lib/python3.9/site-packages/streamlit/runtime/caching/cache_utils.py", line 266, in _get_or_create_cached_value
return self._handle_cache_miss(cache, value_key, func_args, func_kwargs)
File "/usr/local/lib/python3.9/site-packages/streamlit/runtime/caching/cache_utils.py", line 320, in _handle_cache_miss
computed_value = self._info.func(*func_args, **func_kwargs)
File "/Users/renfeng/works/idea/workspace_zz/DISC-MedLLM-main/web_demo.py", line 14, in init_model
model = AutoModelForCausalLM.from_pretrained(
File "/usr/local/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 494, in from_pretrained
resolved_config_file = cached_file(
File "/usr/local/lib/python3.9/site-packages/transformers/utils/hub.py", line 429, in cached_file
resolved_file = hf_hub_download(
File "/usr/local/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 110, in _inner_fn
validate_repo_id(arg_value)
File "/usr/local/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 158, in validate_repo_id
raise HFValidationError(
huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/root/output/baichuan13b-sft-after300k-artificial-v2-add/final'. Use repo_type argument if needed.

commented

模型仓库路径不对,原文件里的路径是我们的本地路径没有更换,现在已经修复