Skip to content

Commit 811bfb4

Browse files
committed
Reset cached feature names when loading model
1 parent edaa61a commit 811bfb4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/lightgbm/booster.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ def feature_name
9999
def model_from_string(model_str)
100100
out_num_iterations = ::FFI::MemoryPointer.new(:int)
101101
check_result FFI.LGBM_BoosterLoadModelFromString(model_str, out_num_iterations, @handle)
102+
@cached_feature_names = nil
102103
self
103104
end
104105

0 commit comments

Comments
 (0)