VincyZhang / intel-extension-for-transformers

Extending Hugging Face transformers APIs for Transformer-based models and improve the productivity of inference deployment. With extremely compressed models, the toolkit can greatly improve the inference efficiency on Intel platforms.
Apache License 2.0
0 stars 0 forks source link

plugin init failed #26

Open VincyZhang opened 4 months ago

VincyZhang commented 4 months ago

from intel_extension_for_transformers.neural_chat import PipelineConfig from intel_extension_for_transformers.neural_chat import build_chatbot from intel_extension_for_transformers.neural_chat import plugins plugins.retrieval.enable=True plugins.retrieval.args["input_path"]="./docs/" config = PipelineConfig(plugins=plugins) chatbot = build_chatbot(config)

When I run this code every time I add some documents to the docs folder, it fails, giving this error below.

2024-03-13 10:54:19 [ERROR] neuralchat error: Generic error ERROR:root:build_chatbot: plugin init failed

I'm yet to figure out how to fix this sometimes I restart my notebook session or re-edit my documents ( they are xlsx files). Please tell me the method so that when I have to build a chatbot it doesn't keep crashing.

NeuralChatBot commented 4 months ago

It seems that the issue might be related to the way you are handling the documents in the "docs" folder. To avoid crashes, you can try the following steps:

  1. Ensure that you have properly initialized the plugins and configured the required settings before building the chatbot.

  2. Make sure that the documents in the "docs" folder are organized in a structured manner, preferably with a clear folder hierarchy.

  3. If you are adding or removing documents from the "docs" folder, consider using a version control system like Git to track changes and manage your files. This will help you to easily revert to a previous state if something goes wrong.

  4. If you are using xlsx files, make sure that they are properly formatted and follow the predefined structures for the retrieval plugin to work correctly.

  5. If the issue persists, you can try to isolate the problem by removing or commenting out parts of your code and adding them back in incrementally to identify the specific part causing the error.

  6. If you are still unable to resolve the issue, you can refer to the documentation and examples provided by the Intel Extension for Transformers team to ensure that you are following the correct procedures for building a chatbot. If you need help, please @NeuralChatBot