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

IndexError: list index out of range??? #571

Open
0xNullLight opened this issue Jan 9, 2024 · 4 comments
Open

IndexError: list index out of range??? #571

0xNullLight opened this issue Jan 9, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@0xNullLight
Copy link

0xNullLight commented Jan 9, 2024

Description

I'm trying to use a huggingface api with jupyter_ai

I keep getting this

Task exception was never retrieved
future: <Task finished name='Task-181143' coro=<RootChatHandler._route() done, defined at /home/user1/anaconda3/lib/python3.11/site-packages/jupyter_ai/handlers.py:215> exception=IndexError('list index out of range')>
Traceback (most recent call last):
  File "/home/user1/anaconda3/lib/python3.11/site-packages/jupyter_ai/handlers.py", line 219, in _route
    maybe_command = message.body.split(None, 1)[0]
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

I already retried re-installing jupyter_ai multiple times with
pip install jupyter-ai

I even tried..
pip3 install jupyter_ai --upgrade --force-reinstall
not sure why I keep getting that error..

Reproduce

After installing jupyter-ai, I attempt to use the Jupyter AI Chat.
Added WizardLM/WizardCoder-Python-34B-V1.0 on Local model ID
added my api on hugging face (write)

Type in
hello
on the chat..

Expected behavior

I expected the chatbot to respond back to me. But it didn't.
Instead on the terminal I used to open up jupyter-labs it says..

Switching chat language model from None to huggingface_hub:WizardLM/WizardCoder-Python-34B-V1.0.
/home/user1/anaconda3/lib/python3.11/site-packages/huggingface_hub/utils/_deprecation.py:127: FutureWarning: '__init__' (from 'huggingface_hub.inference_api') is deprecated and will be removed from version '0.19.0'. `InferenceApi` client is deprecated in favor of the more feature-complete `InferenceClient`. Check out this guide to learn how to convert your script to use it: https://huggingface.co/docs/huggingface_hub/guides/inference#legacy-inferenceapi-client.
  warnings.warn(warning_message, FutureWarning)


> Entering new ConversationChain chain...
Prompt after formatting:
You are Jupyternaut, a conversational assistant living in JupyterLab to help users.
You are not a language model, but rather an application built on a foundation model from Hugging Face Hub called codellama/CodeLlama-13b-Python-hf.
You are talkative and you provide lots of specific details from the foundation model's context.
You may use Markdown to format your response.
Code blocks must be formatted in Markdown.
Math should be rendered with inline TeX markup, surrounded by $.
If you do not know the answer to a question, answer truthfully by responding that you do not know.
The following is a friendly conversation between you and a human.


Current conversation:

Human: hello
AI:

I went back to the browser, click entered and the IndexError mention above popped up

Context

  • Operating System and version:
  • Linux Mint 21.2 Cinnamon (5.8.4)
  • Browser and version:
  • Version 120.0.6099.129 (Official Build) (64-bit)
  • JupyterLab version:
  • Jupyter Lab Version 4.0.10
Troubleshoot Output
	jupyter_ai                    2.9.0
	jupyter_ai_magics             2.9.0
@0xNullLight 0xNullLight added the bug Something isn't working label Jan 9, 2024
Copy link

welcome bot commented Jan 9, 2024

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@JasonWeill
Copy link
Collaborator

Hi @Hcrypt! Thanks so much for filing this issue. Do you see this with all models under Hugging Face Hub? I tried to use the same model, and while I didn't see the error you saw with the prompt hello, I got a timeout:

[E 2024-01-11 17:04:42.622 AiExtension] Error raised by inference API: Model WizardLM/WizardCoder-Python-34B-V1.0 time out
[I 2024-01-11 17:04:42.628 ServerApp] Default chat handler resolved in 334501 ms.

Do you see the same error with other model providers?

@0xNullLight
Copy link
Author

Yea, I get the same error with all the models. How did set yours up to get it working? Just curious so I can follow through exactly what you went through just to double check what's happening here.

@JasonWeill
Copy link
Collaborator

I typically build and run Jupyter AI from source, using the ./scripts/install.sh script from my local jupyter-ai repository. If you still see this bug with the newest published version of Jupyter AI (2.9.1), could you please try with the tip of the main branch? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants