You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a user tries to create a QuestionAnswerer without installing the extra [bert], the error message raised is ValueError: Invalid model configuration: Unknown embedder type 'bert'. This message is misleading as the user's input config might be correct but the bert requirements are not installed. Following is the example snippet that produces the error even when inputs are correct but the requirements are not satisfied:
One way: Create a dict that identifies what extras are required for each key in EMBEDDER_MAP in helpers.py file. Check for those installs in create_embedder_model method.
Another way: Create a EmbedderModelFactory that holds such kind of validation checks before assigning the appropriate class-name to use. For backwards compatibility, keep supporting the method create_embedder_model but going forward, use something like EmbedderModelFactory.create_model(config=...)
The text was updated successfully, but these errors were encountered:
Yeah. I'll add a solution like you suggested in the create_embedder_model method in componenets/helpers.py by caching the ImportError from the embedder_models.py classes. Will reflect this modification in PR #341
When a user tries to create a QuestionAnswerer without installing the extra [bert], the error message raised is
ValueError: Invalid model configuration: Unknown embedder type 'bert'
. This message is misleading as the user's input config might be correct but the bert requirements are not installed. Following is the example snippet that produces the error even when inputs are correct but the requirements are not satisfied:Possible solution(s):
EMBEDDER_MAP
in helpers.py file. Check for those installs increate_embedder_model
method.create_embedder_model
but going forward, use something likeEmbedderModelFactory.create_model(config=...)
The text was updated successfully, but these errors were encountered: