Open Jeffwan opened 1 year ago
It looks like you are implementing your own training loop. This goes beyond what xgboost-ray provides out of the box.
You'd most likely need to subclass the internal RayXGBoostActor
(xgboost_ray/main.py
) and replace the logic inside the predict
method, which is ran on every worker using normal xgboost (which is configured to communicate with other workers through the rabit tracker). We do not provide an API to pass your own Actor class, so you'll have to most likely monkey-patch it.
I would be happy to look into making this process smoother by providing developer APIs.
This goes beyond what xgboost-ray provides out of the box.
Thanks. I know this is beyong the scope right now. Does xgboost_ray have a plan to support it later?
We do not provide an API to pass your own Actor class, so you'll have to most likely monkey-patch it.
Seems I need to replicate some functions similar like train()
or predict()
but using custom RayXGBoostActor
? This requires me fully understand the codes in xgboost_ray and do you think there's a easier way to support my use case?
I think the train()
and predict()
methods of RayXGBoostActor
are relatively straightforward and do not require knowledge of the entire xgboost-ray codebase. I do not believe there's an easier way.
We can add some extra developer APIs to make modifying the training/prediction behavior easier.
I'd be happy to schedule a chat to talk about this, if you think that'll be helpful! Please email me at antoni [at] anyscale.com
I am trying to adopt xgboost_ray for a xgboost project. Currently I meet a problem. The original code is doing some fine grain control on the training process. for every iteration
code source: https://github.com/NVIDIA/NVFlare/blob/dev/nvflare/app_opt/xgboost/tree_based/executor.py#L153-L174
There're two blockers, they are
bst.eval_set()
andbst.update()
since bst is from xgboost library, it won't accept RDMatrix which throws an error here.I look at the documentation and can not find the replacement like
predict
. How can I make it?/cc @Yard1