File size: 492 Bytes
6f20934
1
2
import mlflow.pyfuncdef deploy_model(model, model_path):    """    Deploy the model using MLflow.    """    # Save the model    mlflow.pyfunc.save_model(model_path=model_path, python_model=model)        # Deploy the model to a serving endpoint    mlflow.pyfunc.log_model(artifact_path=model_path, python_model=model)    print(f"Model deployed at {model_path}")# Example usagetrained_model = train_full_finetune_model(train_data, val_data)deploy_model(trained_model, 'models/deployed_model')