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

TypeError: log_model() got an unexpected keyword argument 'model_config' #23

Open
fgraichen opened this issue Aug 15, 2024 · 0 comments

Comments

@fgraichen
Copy link

langchain 0.2.1
langchain-community 0.2.4
langchain-core 0.2.5
langchain-text-splitters 0.2.1
mlflow 2.15.1
mlflow-skinny 2.15.1

import mlflow
import os

Log the model to MLflow

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.
)

Test the chain locally to see the MLflow Trace

chain = mlflow.langchain.load_model(logged_chain_info.model_uri)
chain.invoke(input_example)

I assume this is a version issue but I can't find doc on the log_model parameters.

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

1 participant