lightgbm 0.4.2 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 64101c493236ac58ca8b8f97ecf1c70ba43015b5b887acdd5cfbed81b774150c
4
- data.tar.gz: 431e9dcb0195569c789cab6a7d0965d376e7f8a0cb9180b91ef15bffc01687da
3
+ metadata.gz: 2c960e555e0f94299dab5152fec56a02d9e150c51dc39fbebb72d717edfb3608
4
+ data.tar.gz: dc1a7552b171ba46202c2d64c0d97301cb7d5f761804269314e0db531c70ae2a
5
5
  SHA512:
6
- metadata.gz: f5dee99b1867e74d6fd8fce92cde1edb91e933a9cc1aee909dba1c1e42b6c52f1627142c861660b0110b9fb72de3b55efe3d58ba3fc49fa9a87ed06efe4ccc91
7
- data.tar.gz: 14863d6bd6f46b5df05c073c25a16c6358941fd1a480c43548257dc46124424e1280dfd5d9d431bd96b267003b0bd02d2e9d12fa1359bd3d9fa029a99ae68388
6
+ metadata.gz: d802c67cf77bc1cfce27f6555dbd1b8618d795af7c391671ba19e9185e26a88847fb08080419d4b0446054d34cf8dd0d51dcb45ca22232103e9573633bd6cbe2
7
+ data.tar.gz: 95b30329226473297c9f01b81d35ec72aa00c416ddde447cae447d3e86d22ef5020167915b429bee7cb02ffa24b1495c95a28279b6469eaffb5f76df7d34196c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.4.4 (2026-02-27)
2
+
3
+ - Fixed memory leak with `cv` method
4
+
5
+ ## 0.4.3 (2025-06-26)
6
+
7
+ - Added ARM shared library for Linux
8
+
1
9
  ## 0.4.2 (2025-06-23)
2
10
 
3
11
  - Improved performance of `predict` method for `pandas_categorical`
@@ -5,6 +5,8 @@ module LightGBM
5
5
  attr_accessor :best_iteration, :train_data_name, :params
6
6
 
7
7
  def initialize(params: nil, train_set: nil, model_file: nil, model_str: nil)
8
+ @refs = []
9
+
8
10
  if model_str
9
11
  model_from_string(model_str)
10
12
  elsif model_file
@@ -23,6 +25,7 @@ module LightGBM
23
25
  create_handle do |handle|
24
26
  safe_call FFI.LGBM_BoosterCreate(train_set.handle, params_str(params), handle)
25
27
  end
28
+ @refs << train_set
26
29
  end
27
30
 
28
31
  self.best_iteration = -1
@@ -33,6 +36,7 @@ module LightGBM
33
36
 
34
37
  def add_valid(data, name)
35
38
  safe_call FFI.LGBM_BoosterAddValidData(@handle, data.handle)
39
+ @refs << data
36
40
  @name_valid_sets << name
37
41
  self # consistent with Python API
38
42
  end
@@ -183,11 +183,7 @@ module LightGBM
183
183
 
184
184
  safe_call FFI.LGBM_DatasetCreateFromMat(c_data, FFI::C_API_DTYPE_FLOAT64, nrow, ncol, 1, parameters, reference, handle)
185
185
  end
186
- if used_indices
187
- @handle = handle.read_pointer
188
- else
189
- @handle = ::FFI::AutoPointer.new(handle.read_pointer, FFI.method(:LGBM_DatasetFree))
190
- end
186
+ @handle = ::FFI::AutoPointer.new(handle.read_pointer, FFI.method(:LGBM_DatasetFree))
191
187
 
192
188
  self.label = @label if @label
193
189
  self.weight = @weight if @weight
@@ -1,3 +1,3 @@
1
1
  module LightGBM
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.4"
3
3
  end
data/lib/lightgbm.rb CHANGED
@@ -24,7 +24,7 @@ module LightGBM
24
24
  attr_accessor :ffi_lib
25
25
  end
26
26
  lib_name =
27
- if RbConfig::CONFIG["host_os"] =~ /darwin/i && RbConfig::CONFIG["host_cpu"] =~ /arm|aarch64/i
27
+ if !::FFI::Platform.windows? && RbConfig::CONFIG["host_cpu"] =~ /arm|aarch64/i
28
28
  "lib_lightgbm.arm64.#{::FFI::Platform::LIBSUFFIX}"
29
29
  else
30
30
  "lib_lightgbm.#{::FFI::Platform::LIBSUFFIX}"
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lightgbm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
@@ -45,6 +45,7 @@ files:
45
45
  - vendor/LICENSE
46
46
  - vendor/LICENSE-THIRD-PARTY
47
47
  - vendor/lib_lightgbm.arm64.dylib
48
+ - vendor/lib_lightgbm.arm64.so
48
49
  - vendor/lib_lightgbm.dll
49
50
  - vendor/lib_lightgbm.dylib
50
51
  - vendor/lib_lightgbm.so
@@ -66,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
67
  - !ruby/object:Gem::Version
67
68
  version: '0'
68
69
  requirements: []
69
- rubygems_version: 3.6.7
70
+ rubygems_version: 4.0.3
70
71
  specification_version: 4
71
72
  summary: High performance gradient boosting for Ruby
72
73
  test_files: []