You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, I've been using these functions to serialize and deserialize models:
functionserialize_model(model)
# using https://github.com/catboost/catboost/issues/1567#issuecomment-809007736return model._serialize_model()
# using official API:# bytes = mktempdir() do tmp# path = joinpath(tmp, "model.cbm")# model.save_model(path; format = "cbm")# return read(path)# end# return bytesendfunctiondeserialize_model(bytes)
return catboost.CatBoost().load_model(; blob=PyCall.pybytes(bytes), format="cbm")
end
I suspect there might be a way to add methods to the Serialization stdlib to do this. That would be useful since it would allow moving models between Julia workers transparently.
The text was updated successfully, but these errors were encountered:
Currently, I've been using these functions to serialize and deserialize models:
I suspect there might be a way to add methods to the Serialization stdlib to do this. That would be useful since it would allow moving models between Julia workers transparently.
The text was updated successfully, but these errors were encountered: