Skip to content

Issue with evaluating openai-based LLMs with mlflow.evaluate() API#1843

Merged
rabah-khalek merged 14 commits intomainfrom
GSK-3296
Mar 14, 2024
Merged

Issue with evaluating openai-based LLMs with mlflow.evaluate() API#1843
rabah-khalek merged 14 commits intomainfrom
GSK-3296

Conversation

@rabah-khalek
Copy link
Copy Markdown
Contributor

The issue is described here: mlflow/mlflow#11266, and links to his proposals here: langchain-ai/langchain#18420 (comment).

In a nutshell, upon passing a model uri to mlflow.evaluate(), mlflow tries to load the model, but since langchain don't yet support loading ChatOpenAI based models (the case of RetrievalQApowered by gpt-4 for instance), mlflow.evaluate() was failing.

The workaround, was to avoid serializing, deserializing the langchain model, and pass a function to mlflow.evaluate()

@rabah-khalek rabah-khalek requested a review from Hartorn March 13, 2024 12:31
@linear
Copy link
Copy Markdown

linear Bot commented Mar 13, 2024

"Please submit the traceback as a GitHub issue in the following "
"repository for further assistance: https://github.com/Giskard-AI/giskard."
)
return None, None
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we re raise an error ? as in perform scan ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I don't want to block the user from seing the scan results if an error occurred in the test-suite

@rabah-khalek rabah-khalek marked this pull request as draft March 13, 2024 15:18
Rabah Abdul Khalek added 3 commits March 13, 2024 16:50
@rabah-khalek rabah-khalek requested a review from Hartorn March 13, 2024 16:39
@rabah-khalek rabah-khalek marked this pull request as ready for review March 13, 2024 16:39
@rabah-khalek rabah-khalek enabled auto-merge (squash) March 14, 2024 16:12
@sonarqubecloud
Copy link
Copy Markdown

@rabah-khalek rabah-khalek merged commit 3b267b9 into main Mar 14, 2024
@rabah-khalek rabah-khalek deleted the GSK-3296 branch March 14, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants