Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

omegaconf.errors.ConfigAttributeError: Missing key run full_key: run object_type=dict #55

Open
ArbreyyLiu opened this issue Oct 13, 2024 · 0 comments

Comments

@ArbreyyLiu
Copy link

Hello, when running the examples/playground.py demo, I encountered such a problem, asking to add the run configuration file to minigpt4.yaml, how should I solve it?

Seed set to 42
Traceback (most recent call last):
  File "E:\code\MiniGPT-5-main\MiniGPT-5-main\examples\playground.py", line 61, in <module>
    minigpt5 = MiniGPT5_Model.load_from_checkpoint(stage1_ckpt, strict=False, map_location="cpu", encoder_model_config=model_args, **vars(training_args))
  File "C:\Users\win\.conda\envs\minigpt5\lib\site-packages\lightning\pytorch\utilities\model_helpers.py", line 125, in wrapper
    return self.method(cls, *args, **kwargs)
  File "C:\Users\win\.conda\envs\minigpt5\lib\site-packages\lightning\pytorch\core\module.py", line 1582, in load_from_checkpoint
    loaded = _load_from_checkpoint(
  File "C:\Users\win\.conda\envs\minigpt5\lib\site-packages\lightning\pytorch\core\saving.py", line 91, in _load_from_checkpoint
    model = _load_state(cls, checkpoint, strict=strict, **kwargs)
  File "C:\Users\win\.conda\envs\minigpt5\lib\site-packages\lightning\pytorch\core\saving.py", line 165, in _load_state
    obj = instantiator(cls, _cls_kwargs) if instantiator else cls(**_cls_kwargs)
  File "E:\code\MiniGPT-5-main\MiniGPT-5-main\model.py", line 76, in __init__
    minigpt4_config = Config(MiniGPT4Args)
  File "E:\code\MiniGPT-5-main\MiniGPT-5-main\minigpt4\common\config.py", line 29, in __init__
    runner_config = self.build_runner_config(config)
  File "E:\code\MiniGPT-5-main\MiniGPT-5-main\minigpt4\common\config.py", line 85, in build_runner_config
    return {"run": config.run}
  File "C:\Users\win\.conda\envs\minigpt5\lib\site-packages\omegaconf\dictconfig.py", line 355, in __getattr__
    self._format_and_raise(
  File "C:\Users\win\.conda\envs\minigpt5\lib\site-packages\omegaconf\base.py", line 231, in _format_and_raise
    format_and_raise(
  File "C:\Users\win\.conda\envs\minigpt5\lib\site-packages\omegaconf\_utils.py", line 899, in format_and_raise
    _raise(ex, cause)
  File "C:\Users\win\.conda\envs\minigpt5\lib\site-packages\omegaconf\_utils.py", line 797, in _raise
    raise ex.with_traceback(sys.exc_info()[2])  # set env var OC_CAUSE=1 for full trace
  File "C:\Users\win\.conda\envs\minigpt5\lib\site-packages\omegaconf\dictconfig.py", line 351, in __getattr__
    return self._get_impl(
  File "C:\Users\win\.conda\envs\minigpt5\lib\site-packages\omegaconf\dictconfig.py", line 442, in _get_impl
    node = self._get_child(
  File "C:\Users\win\.conda\envs\minigpt5\lib\site-packages\omegaconf\basecontainer.py", line 73, in _get_child
    child = self._get_node(
  File "C:\Users\win\.conda\envs\minigpt5\lib\site-packages\omegaconf\dictconfig.py", line 480, in _get_node
    raise ConfigKeyError(f"Missing key {key!s}")
omegaconf.errors.ConfigAttributeError: Missing key run
    full_key: run
    object_type=dict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant