Skip to content
This repository has been archived by the owner on Jul 27, 2020. It is now read-only.

Issue with negative leaf value #8

Open
nktaushanov opened this issue Jul 19, 2017 · 2 comments
Open

Issue with negative leaf value #8

nktaushanov opened this issue Jul 19, 2017 · 2 comments

Comments

@nktaushanov
Copy link

nktaushanov commented Jul 19, 2017

There is an issue having negative leaf value when using a Decision tree model (other than -1).

127.0.0.1:6379> ML.FOREST.ADD myforst 0 . NUMERIC 1 0.1 .l LEAF 1 .r LEAF -1
OK
127.0.0.1:6379> ML.FOREST.ADD myforst 1 . NUMERIC 1 0.1 .l LEAF 1 .r LEAF -2
Error: Connection reset by peer

https://github.com/RedisLabsModules/redis-ml/blob/master/src/forest.c#L76

It seems like this is the reason.

@nktaushanov
Copy link
Author

This should fix the issue IMO: #9

@tkrynski
Copy link

@shaynativ this is an important one-line fix... it also prevents a huge memory leak. Please approve? 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants