Exceptional explainability (huggingchat helping you to solve your exceptions)

#209
by ruescog - opened

Introduction

For beginners (and for what they are not so much), the need to solve errors is part of everyday life.

There are forums, like stack overflow, where other people can help you. Probably, the error that you are facing has been faced by others in the past. Therefore, with some luck, you will be able to learn from others experience. However, there may be no published solutions to your issue, or such published solutions may not solve your problem at all.

As an alternative, we want to present to you the HuggingChat integration we have developed in Python to Jupyter users.

Explainable Exceptions

Called explainable-exceptions (because "exceptional-explanation" would be quite egocentric), we have defined a single magic cell %%explain which is able to send to the HuggingChat account of the user the information of the exception raised and print the answer of the chat to the standard output.

The first time, the user will need to log into its HuggingChat account using an username and a password, this information will be saved in a json file to be requested only once. After reading a response, the user is able to request another if the posted one is not useful enough.

Usage

The usage is pretty simple:

  1. Download and import the explainable-exceptions package from pypi.
  2. Import the magic cell from the .core of the package.
  3. Label a problematic cell with the magic cell command.

Usage example

image.png

Since the response is processed as Markdown, it can have highlights or functional links.

Conclusion

We present this project in order to facilitate the day to day life of every programmer, and we expect that you can find this tool usefull.

The source code is on this github repository, feel free to visit it and post your issues or needs using the tool. You can also find the documentation and usage instructions in this github page.

Hugging Chat org

Wow that's really cool! Thanks for sharing this with us! I really like the idea.

Sign up or log in to comment