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

[BUG] Import error using llama-index-core #2509

Closed
JohnCHarrington opened this issue Mar 8, 2024 · 3 comments · Fixed by #2516
Closed

[BUG] Import error using llama-index-core #2509

JohnCHarrington opened this issue Mar 8, 2024 · 3 comments · Fixed by #2516
Assignees
Labels
bug Something isn't working

Comments

@JohnCHarrington
Copy link

JohnCHarrington commented Mar 8, 2024

Describe the bug
Import error occurs when llama-index package is missing, even when llama-index-core and llama-index-callbacks-arize-phoenix are present.

It appears that phoenix.llama_index.callback._check_instrumentation_compatibility checks for version("llama-index"), which raises an import error if llama index was installed using the modular llama-index-core package only.

To Reproduce

  1. Install llama-index-core and llama-index-callbacks-arize-phoenix
  2. Run phoenix and use llama-index.core.set_global_handler("arize_phoenix")

Expected behavior
It should work as normal when llama-index is installed in this minimal modular way.

Screenshots
Screenshot_2024-03-08-09-46-10_2880x1800%0A3440x1440

Environment (please complete the following information):

  • OS: Docker, debian bullseye
  • Notebook Runtime [e.g. Jupyter, Colab]: In script
  • Browser [e.g. chrome, safari] N/A
  • Version [e.g. 0.0.1]: 3.9.0
@JohnCHarrington JohnCHarrington added bug Something isn't working triage issues that need triage labels Mar 8, 2024
Copy link

dosubot bot commented Mar 8, 2024

Thank you for providing the detailed steps to reproduce the error. It seems like the issue is arising due to the _check_instrumentation_compatibility function in the Arize Phoenix codebase. This function checks for the llama-index package and its version. If the package is not found, it raises a PackageNotFoundError.

In your case, you have installed llama-index-core and llama-index-callbacks-arize-phoenix, but not the llama-index package. This is likely causing the NoneType error, as the function is trying to access the version of a package that is not installed.

As a workaround, you could try installing the llama-index package along with the llama-index-core and llama-index-callbacks-arize-phoenix packages. This should resolve the import error.

However, I understand that you expect the Arize Phoenix to work normally when llama-index is installed in a minimal modular way. This seems like a valid use case that the Arize Phoenix codebase currently does not support. I recommend creating an issue in the Arize Phoenix repository detailing this use case and the error you're encountering. This will help the maintainers understand the issue and potentially update the _check_instrumentation_compatibility function to support this use case.

Please note that the function llama_index.core.set_global_handler("arize_phoenix") is used to automatically collect and display traces from LlamaIndex applications in Phoenix in real-time. This is part of the "One-Click" setup for integrating Phoenix with LlamaIndex to visualize execution traces without manually adding callback handlers to the LlamaIndex application code. This setup simplifies the process of tracing LlamaIndex applications by setting a global handler that automatically handles the collection and display of traces in the Phoenix UI.

I hope this helps! If you have any other questions or need further clarification, feel free to ask.

Source Code
Documentation

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@mikeldking
Copy link
Contributor

@JohnCHarrington thanks so much for the bug report. Makes sense! We will fix asap.

@axiomofjoy
Copy link
Contributor

@JohnCHarrington This issue is resolved in 3.10.0. Thanks!

@axiomofjoy axiomofjoy removed the triage issues that need triage label May 9, 2024
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
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants