[Python] fitting and predicting model with mlflow

Discussão em 'Python' iniciado por Stack, Março 10, 2025.

  1. Stack

    Stack Membro Participativo

    I'm very new to understanding the use of MLFlow but need assistance, I'm trying to understand on how to try and fit and predict my model once again. I'm able to call my model by:

    PLS_model = mlflow.pyfunc.load_model("runs:/FFFFF!@#!@#@!#!/logged_model", suppress_warnings = True)


    and get:

    mlflow.pyfunc.loaded_model:
    artifact_path: logged_model
    flavor: mlflow.sklearn
    run_id: FFFFF!@#!@#@!#!


    But when I try to call any methods as:

    1).fit or .predict. I get the following error

    AttributeError: 'PyFuncModel' object has no attribute 'fit'

    AttributeError: 'PyFuncModel' object has no attribute 'predict'


    Here I encountered on how to actually call these functions but not sure if I'm doing this correctly. In summary, how can I predict, fit to my new data.

    Thanks

    Continue reading...

Compartilhe esta Página