Resolving SQLAlchemy Version Conflicts with Phoenix for LLM App
Hi Phoenix team! I am trying to get Phx up and running for my OpenAI-driven LLM application. I am using the latest Docker image of Phoenix and running it on my local env. I also installed the latest version of the Phx package. I am running into a dependency issue where the sqlalchemy package versions are not aligned with my application and what Phoenix requires as a minimum. When I install phoenix, it uninstalls sqlalchemy -1.4.46 and installs 2.0.35. The issue is, when I run my application with Phoenix tracing, because of the version upgrade, I get the following error:
sqlalchemy.exc.ArgumentError: Type annotation for "<table_column>" can't be correctly interpreted for Annotated Declarative Table form. ORM annotations should normally make use of the ``Mapped[]`` generic type, or other ORM-compatible generic type, as a container for the actual type, which indicates the intent that the attribute is mapped. Class variables that are not intended to be mapped by the ORM should use ClassVar[]. To allow Annotated Declarative to disregard legacy annotations which don't use Mapped[] to pass, set "__allow_unmapped__ = True" on the class or a superclass this class. (Background on this error at: https://sqlalche.me/e/20/zlpr)
Or when I force to use the sqlalchemy package to be 1.4.46, then Phoenix package complains. Is there any workaround to this issue where I do not have to upgrade my sqlalchemy package? I was wondering if I can use a previous version of arize-phoenix but was not sure if it would solve the problem. Let me know if you have any thoughts!
