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

Deployment error: module 'mlflow.langchain' has no attribute 'output_parsers' #22

Open
daniel-hain opened this issue Aug 15, 2024 · 3 comments

Comments

@daniel-hain
Copy link

daniel-hain commented Aug 15, 2024

Hello,

I'm running into a model deployment error in the following notebook:
genai_cookbook/10-min-demo/Mosaic-AI-Agents-10-Minute-Demo.ipynb
Everything works fine until the following line:
with mlflow.start_run(run_name="databricks-docs-bot"): logged_chain_info = mlflow.langchain.log_model( lc_model=os.path.join( os.getcwd(), f"{QUICK_START_REPO_SAVE_FOLDER}/quick_start_demo/sample_rag_chain", ), # Chain code file from the quick start repo model_config=chain_config, # Chain configuration set above artifact_path="chain", # Required by MLflow input_example=input_example, # Save the chain's input schema. MLflow will execute the chain before logging and capturing its output schema. )

I always get the error message:
MlflowException: Failed to run user code from /tmp/tmp_2mpqvqb/model.py. Error: module 'mlflow.langchain' has no attribute 'output_parsers'

Setup:

  • Everything run within my databricks workspace
  • MLflow version '2.15.1'

Anyone can help with that? Thanks a lot!

@daniel-hain daniel-hain changed the title Deployment eror Deployment error: module 'mlflow.langchain' has no attribute 'output_parsers' Aug 15, 2024
@fgraichen
Copy link

I ran into this as well. What version of the mlflow libraries are you using. When I upgraded to 2.15.1 (latest) this message went away, unfortunately I received a different error - log_model() got an unexpected keyword argument 'model_config' after upgrading the library. Curious if you experience the same

@daniel-hain
Copy link
Author

Hi! I tried the same, and updated to MLflow version '2.15.1', but get the same error message.

@bbqiu
Copy link

bbqiu commented Aug 19, 2024

hey all, please try pulling from latest master again -- we will be fixing this and some other small bugs with ChatCompletionOutputParser w/ the next release of mlflow.

specifically, make sure you have 8e120e4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants