Is .disableLearning working?

Hey all,

So I’m trying to ensure that I’m using .disableLearning() right.

I have a script which learns a number of models up to a certain point, where I want to stop learning on them all while maintaining inference – so they can keep yielding Anomaly Score on new data but not keep learning.

Here’s where I’m baffled:

After calling .disableLearning() on my mod object, .isLearningEnabled() is False but ._HTMPredictionModel__tpLearningEnabled is still True! This shouldn’t be the case right??

I’ve also tried .finishLearning(), but I keep getting this error:

Thanks again!!

I would not trust the private members of the model. Trust the function.

1 Like

Ok great, so don’t worry about the ._HTMPredictionModel__tpLearningEnabled = True as long as .isLearningEnabled() = False – right?

Thanks again Matt! Great to have you back :smile:

1 Like

Yes, the function is a part of the API, the protected vars are not. Always trust the public API over any protected or private parts that unfortunately were exposed. Those vars are a bug :bug: , not a feature. :wink:

1 Like