-
Notifications
You must be signed in to change notification settings - Fork 478
Feat/issue 335 visible import errors #550
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When starting the ABC bot now, there are a bunch of errors which show up:
$ nemoguardrails chat --config=examples/bots/abc
Failed to register __init__.py in action dispatcher due to exception No module named '__init__'
Failed to register __init__.py in action dispatcher due to exception No module named '__init__'
Failed to register base.py in action dispatcher due to exception No module named 'base'
Failed to register actions.py in action dispatcher due to exception No module named 'spacy'
ERROR:nemoguardrails.actions.action_dispatcher:Failed to register __init__.py in action dispatcher due to exception No module named '__init__'
ERROR:nemoguardrails.actions.action_dispatcher:Failed to register __init__.py in action dispatcher due to exception No module named '__init__'
ERROR:nemoguardrails.actions.action_dispatcher:Failed to register base.py in action dispatcher due to exception No module named 'base'
ERROR:nemoguardrails.actions.action_dispatcher:Failed to register actions.py in action dispatcher due to exception No module named 'spacy'
Fetching 7 files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:00<00:00, 110792.94it/s]
Starting the chat (Press Ctrl + C twice to quit) ...
ERROR:nemoguardrails.actions.action_dispatcher:Failed to register __init__.py in action dispatcher due to exception No module named '__init__'
ERROR:nemoguardrails.actions.action_dispatcher:Failed to register __init__.py in action dispatcher due to exception No module named '__init__'
ERROR:nemoguardrails.actions.action_dispatcher:Failed to register base.py in action dispatcher due to exception No module named 'base'
ERROR:nemoguardrails.actions.action_dispatcher:Failed to register actions.py in action dispatcher due to exception No module named 'spacy'
>
I think this is related to some of the default actions we're registering from nemoguardrails.actions.langchain
. We should disable the default loading for them, as they're not used and enable them with a flag --load-demo-actions
for the CLI (which should translate to a load_demo_actions
for the LLMRails
). Default False
.
@drazvan, after enriching the log Failed to register
|
@drazvan, I added a temporary fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Pouyanpi : I've made a few additional changes. I think it's good to merge, have a look.
@drazvan, Nice! It looks good to me. |
Summary
This PR refines the
action_dispatcher.py
module by enhancing the visibility of errors during action imports and discovery. It resoves #335 .