Skip to content
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

Unify out results of LGBM_BoosterDumpModel and LGBM_BoosterSaveModel #2604

Closed
3 of 5 tasks
StrikerRUS opened this issue Dec 2, 2019 · 3 comments
Closed
3 of 5 tasks

Comments

@StrikerRUS
Copy link
Collaborator

StrikerRUS commented Dec 2, 2019

At present these two functions produce different output content. For example, text representation contains parameters and feature importance, while JSON format - not. These functions should produce the same content but in different formats. It will help many third-party libraries that work with LightGBM model's dumps.

import json

import numpy as np
import lightgbm as lgb

X = np.random.random((100, 2))
y = np.random.random(100)
lgb_data = lgb.Dataset(X, y)
bst = lgb.train({}, lgb_data, num_boost_round=3)
bst.save_model('save_model.txt')
with open('dump_model.json', 'w') as json_dump:
    json.dump(bst.dump_model(), json_dump, indent=2)

image

image

Unify:

@StrikerRUS
Copy link
Collaborator Author

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.

@github-actions

This comment was marked as off-topic.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2023
@jameslamb
Copy link
Collaborator

This was locked accidentally. I just unlocked it. We'd still welcome contributions related to this feature!

@microsoft microsoft unlocked this conversation Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants