cancel
Showing results for 
Search instead for 
Did you mean: 
Generative AI
Explore discussions on generative artificial intelligence techniques and applications within the Databricks Community. Share ideas, challenges, and breakthroughs in this cutting-edge field.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to add dependencies to mlflow.langchain.log_model

yashshingvi
New Contributor

Hello,

I'm doing this-

with mlflow.start_run(run_name="run1"):
  logged_chain_info = mlflow.langchain.log_model(
        #   lc_model=os.path.join(os.getcwd(), 'full_chain'), this doesnt work too  
          lc_model='/Workspace/Users/{user_name}/exp/deploy_chain.py',
          model_config="/Workspace/Users/{user_name}/exp/chain_config.yaml", 
          artifact_path="exp_1_artifact",
    
          input_example=input_example,
          example_no_conversion=True,
          code_paths=["/Workspace/Users/{user_name}/exp/example_docs.py"]

      )

But when I do import example_docs in deploy_chain.py it says module not found when I run the above code.

Similarly,

If I try to add a pdf/image file in code_paths and try to access it using relative path it fails on the mlflow run step, If I give absolute path, it fails while serving the endpoint (file not found).

 

How should I add dependent files to this?

 

0 REPLIES 0

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group