'How to save a non tf.Model model and load it with tf.saved_model.load()

I have a trained XGBoost model, and an API that uses tensor flow saved models to load it. Is it possible to save the XGBoost model in a way that will be compatible with saved_model.load().

E.g.

clf = xgb.XGBClassifier()
X_train, y_train = ...
clf.fit(X_train, y_train)
# save the model in some manner that it would work with the next row
model = tf.saved_model.load(model_path)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source