[Python] How to load Sagemaker XGBoost model which was trained using (version = 'latest')...

Discussão em 'Python' iniciado por Stack, Dezembro 20, 2024.

  1. Stack

    Stack Membro Participativo

    There is an existing xgboost model in the pipeline that was created using this container

    sagemaker.image_uris.retrieve('xgboost', sagemaker.Session().boto_region_name, version='latest')


    output:

    '{accountid}.dkr.ecr.us-east-1.amazonaws.com/xgboost:latest'


    I extracted the model.tar.gz from the model artifact and loaded the xgboost-model file
    but it gave this error

    XGBoostError: basic_string::resize


    I ran a shell script that loads the model using all the versions of XGBoost available but nothing worked.
    I just want to check the feature importance using model.get_score.

    Continue reading...

Compartilhe esta Página