-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make models and model parsers plugins too #3771
Comments
TLDR: machine-readable binary format specification compiled into parsing code in variety of languages. See #3170 and especially the links for more info. |
Yes, I mean them. I mean I'd like serialization/deserialization be separated from learning stuff in the way allowing to swap serialization/deserialization engines in run-time rather than in compile-time. |
Closing for now. After the JSON input format is adopted, we will add plug-ins to accept various binary encodings of JSON. |
I don't mean binary encodings of JSON, I mean a binary format. IMHO parsing JSON repr in order to generate a binary format is overkill. I mean that JSON and its binary encodings are essentially key-value pairs. So your interface to JSON-like serializers should probably look like as passing already constructed JSON representation back and forth. But for a binary format it is unsuitable, for a binary format we need not JSON internal representation, but something more close to XGBoost internal representation. |
I’m not sure if we want to establish plugin system that allows access to internals. If anything, the trend is greater encapsulation. See #3972. You are of course free to make your fork of XGBoost and modify it at will, but I’m afraid we cannot have a plugin system touching internals in the main repository. cc @RAMitchell |
is not necessarily internal representation. It is something, not requiring me to do perversions like parsing json-like repr. For example a framework of methods. Core defines an abstract class with virtual methods. Plugin inherits the class. Plugin passes the object of the class back to core. Core does serialization by calling its methods, passing the data to be serialized into the methods. The methods are called for each entity, like an ensemble, regression model, tree model, non-leaf node, leaf node. It would be nice to have an exporter plugin passing itself into python, so it can be possible to write an exporter in python. |
This sounds like accessing internal representation to me? Reopening to continue discussion |
We may pursue this idea in some future time, but for the time being, there are other priorities. |
I don't think this will be part of xgboost. |
I may wanna try to integrate ksy-generated model parsers in XGBoost. It would be nice to have model parsers somehow standoff from models evaluation. But xgboost already supports several kinds of models. It would be nice to modularize everything enough to allow to choose model parser implementation separately from a model and to allow adding custom models.
The text was updated successfully, but these errors were encountered: