Skip to content

Version compatibility? #2228

@oshefter

Description

@oshefter

Environment info

Windows 10 (CPU)
Python 3.6.5 :: Anaconda custom (64-bit)

LightGBM version or commit hash:
version: 2.2.2

Issue:

Cannot open a model file previously produced by another version of lightgbm software (2.1.1) with python code and saved into a txt file.

Error message:

[LightGBM] [Fatal] Model format error, expect a tree here. met 44 59 37 30 48 47 51 41 45 30 45 181 41 267 135 739 531 203 43 45 19256 32 39 30 58 34 32 40 36 2244 34 30 644 32 251 31 243 325 63 147 94 45 86 204 1256 34 32 715 16219 137 55 1051 3418 176 918 38 51 45 30 13845 3

Is there a version incompatibility between 2.1.1 and 2.2.2?

Sample code:

import lgb
lgb.Booster(model_file=modelfile)

where modelfile is a model file on a disk which was produced by a lightgbm version 2.1.1


Experiments run:

  1. Lightgbm model file is produced by lgb 2.2.2 and saved to disk.
    Tried opening a file using lgb 2.2.2 with lgb.Booster(model_file=modelfile) -- successful
    Tried opening a file using lgb 2.1.1 with lgb.Booster(model_file=modelfile) -- successful

  2. Lightgbm model file is produced by lgb 2.1.1 and saved to disk.
    Tried opening a file using lgb 2.2.2 with lgb.Booster(model_file=modelfile) -- UNSUCCESSFUL
    Tried opening a file using lgb 2.1.1 with lgb.Booster(model_file=modelfile) -- successful

Please let us know whether you know what is the issue is here.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions