xgb 0.5.1 → 0.5.2

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: 73bd02bae172bccd30215402bc58a761f2f39c46002c6fee42d429e052470861
4
- data.tar.gz: 2773ef6f7e0cb2cd2e71cf5c9329beb08aaca79806e1e359b448b78b684273c0
3
+ metadata.gz: d2cea39eebbe29b40f1d4248bb9b4e3f4f112f2fcfcb2554bdf87c1fae0b5f3f
4
+ data.tar.gz: 197dcfb49e37fc72a3f5ab5bb593f0faa7912fbc60219c1b49dd235b869e57eb
5
5
  SHA512:
6
- metadata.gz: 04e3534c0a6cb921016a39b9331fea803ff8a54c5b9c16ea982f7f9cbde8503f51b088e2a77148ca516c215c505e7081b89e026cc7d230a607bbc03fc8a6873d
7
- data.tar.gz: 38252580d26db1407d7e843b8c88210d3f65641bc9b0359d3318d22fc94fef8be834fba69f30e7cb35c24d8c364fb3ab18a0dc67f0141c73b30593c3a0154dd4
6
+ metadata.gz: 6c58598a08cf976a2bf7b013ae3218f96ea6c96c0e345d2fe4d3e488ad8f409f905cf060e925b3307077cf844ae27babd9581bc3ff03c8c693cf812d08593808
7
+ data.tar.gz: 424a5542cb90830a017f976f706d85989f64d497dc2fd4351f95fb944ab8a48b51ad62f2b3fb7d4f1215428fdf49f913eb7b7c6beb82f0edebe35076c8f18ab3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.5.2 (2021-03-09)
2
+
3
+ - Added ARM shared library for Mac
4
+
1
5
  ## 0.5.1 (2021-02-08)
2
6
 
3
7
  - Fixed error with validation sets without early stopping
data/lib/xgboost.rb CHANGED
@@ -19,7 +19,12 @@ module XGBoost
19
19
  class << self
20
20
  attr_accessor :ffi_lib
21
21
  end
22
- lib_name = FFI.map_library_name("xgboost")
22
+ lib_name =
23
+ if RbConfig::CONFIG["host_os"] =~ /darwin/i && RbConfig::CONFIG["host_cpu"] =~ /arm/i
24
+ FFI.map_library_name("xgboost.arm64")
25
+ else
26
+ FFI.map_library_name("xgboost")
27
+ end
23
28
  vendor_lib = File.expand_path("../vendor/#{lib_name}", __dir__)
24
29
  self.ffi_lib = [vendor_lib]
25
30
 
data/lib/xgboost/ffi.rb CHANGED
@@ -5,7 +5,7 @@ module XGBoost
5
5
  begin
6
6
  ffi_lib XGBoost.ffi_lib
7
7
  rescue LoadError => e
8
- if e.message.include?("Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib") && e.message.include?("Reason: image not found")
8
+ if ["/usr/local", "/opt/homebrew"].any? { |v| e.message.include?("Library not loaded: #{v}/opt/libomp/lib/libomp.dylib") } && e.message.include?("Reason: image not found")
9
9
  raise LoadError, "OpenMP not found. Run `brew install libomp`"
10
10
  else
11
11
  raise e
@@ -1,3 +1,3 @@
1
1
  module XGBoost
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xgb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-09 00:00:00.000000000 Z
11
+ date: 2021-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -46,6 +46,7 @@ files:
46
46
  - lib/xgboost/utils.rb
47
47
  - lib/xgboost/version.rb
48
48
  - vendor/LICENSE
49
+ - vendor/libxgboost.arm64.dylib
49
50
  - vendor/libxgboost.dylib
50
51
  - vendor/libxgboost.so
51
52
  - vendor/xgboost.dll