dmitryikh/leaves

only version=v2 is supported

Opened this issue · 1 comments

code:

import (
    "fmt"
    "github.com/dmitryikh/leaves"
)

func main() {
    // 1. Read model
    useTransformation := true
    model, err := leaves.LGEnsembleFromFile("lightgbm_model.txt", useTransformation)
    if err != nil {
        fmt.Println(err)
        panic(err)
    }
}

go build lgbuse.go, and then report an error:

only version=v2 is supported
panic: only version=v2 is supported
goroutine 1 [running]:
main.main()
lgbuse.go:14 +0x246
exit status 2

The line of code that cause probles:
model, err := leaves.LGEnsembleFromFile("lightgbm_model.txt", useTransformation)

How can I solve this problem?

I'm using the latest version as for now github.com/dmitryikh/leaves v0.0.0-20200503205002-939b6fa631dd
and it works with v3 LightGBM model fine.