Skip to content

Commit

Permalink
Add Version
Browse files Browse the repository at this point in the history
  • Loading branch information
mirecl committed Aug 19, 2024
1 parent 9f58838 commit eda70b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions catboost/catboost.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ var (

var catboostSharedLibraryPath = ""

func Version() string {
return fmt.Sprintf("v%d.%d.%d", C.CATBOOST_APPLIER_MAJOR, C.CATBOOST_APPLIER_MINOR, C.CATBOOST_APPLIER_FIX)
}

func SetSharedLibraryPath(path string) {
catboostSharedLibraryPath = path
}
Expand Down
4 changes: 4 additions & 0 deletions catboost/catboost_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ const (
testModelPathMetadata = "../example/metadata/metadata.cbm"
)

func TestVersion(t *testing.T) {
require.Equal(t, "v1.2.5", cb.Version())
}

func TestLoadFullModel(t *testing.T) {
modelRegressor, err := cb.LoadFullModelFromFile(testModelPathRegressor)
require.NoError(t, err)
Expand Down

0 comments on commit eda70b3

Please sign in to comment.