Skip to content

Update xgboost to 2.0.3 or newer, and support Python 3.9 or laterΒ #1123

@sapatel2

Description

@sapatel2

Chaquopy version

15.0.1

Relevant parts of your build.gradle file

 python {
        pip {
            install "xgboost==2.0.3"
            install "numpy"
        }
    }

Relevant parts of your code

import pickle
import xgboost as xgb

def print_model_variables(model):
    model_vars = vars(model)
    for var_name, var_value in model_vars.items():
        print(f"{var_name}: {var_value}")

def test(input):
    with open('/data/user/0/com.chaquo.myapplication/files/pm_model.pkl','rb') as f:
         pickle_model = pickle.load(f)
         print("XGBoost version:", xgb.__version__)
         print(input)
         print_model_variables(pickle_model)
         data = pickle_model.predict(input)
         print(data)
         return data

Describe your issue

issue facing in pickle_model.predict(input)
Error:- AttributeError: 'super' object has no attribute 'get_params'.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions