Skip to content

Commit

Permalink
Reset cached feature names when loading model
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Nov 12, 2024
1 parent edaa61a commit 811bfb4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/lightgbm/booster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def feature_name
def model_from_string(model_str)
out_num_iterations = ::FFI::MemoryPointer.new(:int)
check_result FFI.LGBM_BoosterLoadModelFromString(model_str, out_num_iterations, @handle)
@cached_feature_names = nil
self
end

Expand Down

0 comments on commit 811bfb4

Please sign in to comment.