Comments (3)
Thanks for using LightGBM.
We need more details than this to help you.
- what operating system?
- version of Python?
- can you provide a minimal, reproducible example that demonstrates this behavior?
And just to set the right expectation... segfaulting should never happen so that part is a bug, but you cannot use reset_parameter()
to track arbitrary custom data about a model. You'll have to do that some other way (for example, write out a JSON file next to wherever you store your model).
from lightgbm.
python --version
Python 3.8.10
uname -a
Linux cof-dev-l501 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
import lightgbm as lgb
m = lgb.Booster(model_file='m0.txt') # you'll need some model
type(m)
<class 'lightgbm.basic.Booster'>
m.reset_parameter({'kelp_var1': 123456789})
[LightGBM] [Warning] Unknown parameter: kelp_var1
Segmentation fault (core dumped)
I realize I'm asking for a feature there. Thanks for making it clear it doesn't exist. Yeah, we can work around. If I have a model that should only be used on Tuesdays, I can also add "tuesday" to the filename and try to encode that way. It would just be nice to have it internally in the file. I guess I can always make a feature request.
from lightgbm.
Thanks for that.
I personally would be -1 on the idea of LightGBM supporting storage of arbitrary extra data in model files. That'd add complexity and maintenance burden to this project for, in my opinion, not much value compared to just writing your own data alongside the model.
Write that data to another file and store it alongside the model. If you need to create a single artifact, write multiple files and zip them up in an archive with tar
or zip
or similar.
from lightgbm.
Related Issues (20)
- Error while using "LightGMB" on Fabric HOT 1
- [ci] enforce 'shellcheck' checks
- LightGBM\include\LightGBM/utils/common.h(33,10): fatal error C1083: Cannot open include file: 'fast_double_pa rser.h': No such file or directory HOT 6
- unclear how to prepare data for `lambdarank_position_bias_regularization` option HOT 3
- Integration of lightgbmmodeloptimizer package HOT 4
- [ci] aarch64 python-package job failing: "cannot allocate memory in static TLS block" HOT 15
- [python-package] [gpu] GPU install on Windows fails HOT 2
- [python-package] Training data partially available when loading exported lgb.Dataset HOT 9
- [CUDA] illegal memory access when using CUDA and large max_bin and large dataset HOT 1
- [python-package] using lgb.Booster(model_file='model.txt') hangs when loading gbdt regression model HOT 8
- [python-package] How to pass additional attributes to custom eval or loss functions in regression task? HOT 8
- [python-package] ValueError when using scikit-learn API for multiclass binary classification HOT 2
- [RFC] Sync supported CUDA versions with a new support policy for CUDA Container Images HOT 1
- [R-package] CRAN warnings on gcc-14
- [GPU] GPU trainer takes more time than CPU's HOT 5
- [GPU] [performance] LightGBM Running Significantly Slower Than XGBoost on GPU for Classification Task HOT 6
- Extremely slow data loading on high dimensional dataset.
- [R-package], [GPU], Windows10, install error
- `runtime error: member call on address 0x612000003ad8 which does not point to an object of type 'std::streambuf'` in macOS cpp_tests CI job
- `OSError: [WinError 122] The data area passed to a system call is too small` in Windows bdist CI job HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightgbm.