morenoj11
New Contributor III

I saw that you can compile the model without checkpointer, register it in MLflow, and then, after loading, assign it after compilation.

```

import mlflow

 

mlflow.models.set_model(build_graph())
with mlflow.start_run() as run_id:
model_info = mlflow.langchain.log_model(
lc_model="build_graph.py", # Path to our model Python file
artifact_path="langgraph",
)
model_uri = model_info.model_uri
[...]
 
loaded_model = mlflow.langchain.load_model(model_uri)
loaded_model.checkpointer = checkpointer
 
loaded_model.invoke(input_state, config)  ## config has the thread_id

```

It's not elegant or future-proof, but it might do the trick while we wait for a better solution.

View solution in original post