-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[python-package] make Dataset
pickleable
#5098
Comments
Thanks for the excellent report! We'll look into it as soon as possible. Can you please clarify what specifically you mean by "This becomes an issue"?
|
hi @jameslamb , thanks for quick response, by "This becomes an issue" I mean the pickler used by RayTune is unable to serialize the dataset object and outputs a value error: |
Indeed, LightGBM/python-package/lightgbm/basic.py Lines 2671 to 2690 in c991b2b
|
Dataset
pickleable
Closed in favor of being in #2302. We decided to keep all feature requests in one place. Welcome to contribute this feature! Please re-open this issue (or post a comment if you are not a topic starter) if you are actively working on implementing this feature. |
Description
ctypes objects pointers are added to the training(and evaluation) dataset after it is used for training a LightGBM model in Python. This becomes an issue if I want to serialize the dataset using cloudpickle after I use it for model training.
cloudpickle is used by RayTune to serialize the objects during the distribution of the objects while running multiple trail runs. I did not expect any dataset attribute change after using it to train LightGBM model. As a workaround for now I create a copy of the dataset that I use for training as I could not use it otherwise in followup hyper parameter optimization steps that are done by RayTune.
Reproducible example
Environment info
LightGBM version or commit hash:
lightgbm = "3.3.2"
Command(s) you used to install LightGBM
python = "3.9.7"
cloudpickle = "2.0.0"
pandas = "1.4.1"
numpy = "1.22.3"
The text was updated successfully, but these errors were encountered: