Skip to content

Conversation

@igorborgest
Copy link
Contributor

Fixing sagemaker get_model() for xgboost

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@igorborgest igorborgest added the bug Something isn't working label Jan 3, 2020
@igorborgest igorborgest requested a review from a team January 3, 2020 01:28
@igorborgest igorborgest self-assigned this Jan 3, 2020
Copy link
Contributor

@tuliocasagrande tuliocasagrande left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's nice to remove pickle and leave the deserialization to the user as we have several ways to do it, depending on the model.

I tested a few ones and I'll leave it here for future reference:

  1. XGBoost [1]:

    • model.tar.gz contains xgboost-model, which can be loaded with pickle (xgboost.core.Booster)
  2. k-Means [2][3]:

    • model.tar.gz contains model_algo-1, which can be loaded with mx.ndarray.load or mx.ndarray.load_frombuffer
  3. PCA [4]:

    • model.tar.gz contains model_algo-1, which can be loaded with pickle (dict with keys s, v, mean)
  4. SDD [5]:

    • model.tar.gz contains several files (hyperparams.json, model_algo_1-0000.params, model_algo_1-symbol.json)

@igorborgest igorborgest merged commit a998a98 into master Jan 4, 2020
@igorborgest igorborgest deleted the sagemaker branch January 4, 2020 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants