Skip to content

Commit

Permalink
Fix remote calling of load_model() (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
chester-leung authored Mar 17, 2021
1 parent 82f2d1a commit aa7093d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions demo/python/remote-control/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ def run(channel_addr, sym_key_file, priv_key_file, cert_file):

booster.save_model(HOME_DIR + "demo/python/remote-control/client/modelfile.model")

booster = xgb.Booster()
booster.load_model(HOME_DIR + "demo/python/remote-control/client/modelfile.model")

# Get encrypted predictions
print("\nModel Predictions: ")
predictions, num_preds = booster.predict(dtest, decrypt=False)
Expand Down
2 changes: 1 addition & 1 deletion python-package/securexgboost/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3007,7 +3007,7 @@ def XGBoosterLoadModel(request, signers, signatures, sig_lengths):
ctypes.c_uint32(nonce_ctr),
ctypes.byref(out_sig),
ctypes.byref(out_sig_len),
signers,
from_pystr_to_cstr(signers),
c_signatures,
c_sig_lengths))
return out_sig, out_sig_len.value
Expand Down

0 comments on commit aa7093d

Please sign in to comment.