thundersvm 0.1.3 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f4ae1f7161d5f82ad789ab06cfb5f22cb28402be656f3c9c3aa2e157b79d585e
4
- data.tar.gz: 387c268daa380a4d20b8a1fccc13cf8a354aff8cdd67faaf15a5f12d4baf3730
3
+ metadata.gz: 1175e937906ed249f4561bb60b3314c5f4b9320d9de3b5fd13c5106af36ff7a0
4
+ data.tar.gz: 8938ae2067eaac617b9f219a05347cad4caf938cf8af6509e5a6038ccfb8b7ef
5
5
  SHA512:
6
- metadata.gz: fa262ec05325a0361f7a33d16bf57a79d5d8144fbcb2d0b8562549141825ae2af0617d20961fa872128259c91a89afefccaf1fdf44ec2993c4d9e33b2d8261b4
7
- data.tar.gz: 7e1208de269cd0e30160f6892b9b0714b4649639c29381a01df7a0d2d6ed85b8b5e307cad0c86923e45e3c5dcc48cb8a5cc3bc38bdb00066cfd4183a7fb27a25
6
+ metadata.gz: e5e725aa97bc22c8a15e333c35207edfdc05a690f3f0c7b963c72de38c21251dc0033cb2a3e30424cca86faea51430b2ecd759183b35b3b283ce2e7e40d248a4
7
+ data.tar.gz: 0363aca1169923a2838373da19bc3c9eb334b33213bb489df42f4849fb1f7526d0b7ac898719349c38252ae509b45307178947f3af13095172d81263121fa52a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 0.2.0 (2023-04-16)
2
+
3
+ - Added shared library for Mac ARM
4
+ - Dropped support for Ruby < 3
5
+
6
+ ## 0.1.4 (2020-07-26)
7
+
8
+ - Improved error message when OpenMP not found on Mac
9
+
1
10
  ## 0.1.3 (2020-02-11)
2
11
 
3
12
  - Fixed `Could not find ThunderSVM` error on some Linux platforms
data/NOTICE.txt CHANGED
@@ -1,4 +1,5 @@
1
- Copyright 2019-2020 Andrew Kane
1
+ Copyright 2017 ThunderSVM Developers
2
+ Copyright 2019-2021 Andrew Kane
2
3
 
3
4
  Licensed under the Apache License, Version 2.0 (the "License");
4
5
  you may not use this file except in compliance with the License.
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # ThunderSVM
1
+ # ThunderSVM Ruby
2
2
 
3
3
  [ThunderSVM](https://github.com/Xtra-Computing/thundersvm) - high performance parallel SVMs - for Ruby
4
4
 
@@ -6,14 +6,20 @@
6
6
 
7
7
  For a great intro on support vector machines, check out [this video](https://www.youtube.com/watch?v=efR1C6CvhmE).
8
8
 
9
- [![Build Status](https://travis-ci.org/ankane/thundersvm.svg?branch=master)](https://travis-ci.org/ankane/thundersvm)
9
+ [![Build Status](https://github.com/ankane/thundersvm-ruby/workflows/build/badge.svg?branch=master)](https://github.com/ankane/thundersvm-ruby/actions)
10
10
 
11
11
  ## Installation
12
12
 
13
13
  Add this line to your application’s Gemfile:
14
14
 
15
15
  ```ruby
16
- gem 'thundersvm'
16
+ gem "thundersvm"
17
+ ```
18
+
19
+ On Mac, also install OpenMP:
20
+
21
+ ```sh
22
+ brew install libomp
17
23
  ```
18
24
 
19
25
  ## Getting Started
@@ -148,25 +154,26 @@ ThunderSVM.ffi_lib = "path/to/build/lib/libthundersvm.dll"
148
154
  ## Resources
149
155
 
150
156
  - [ThunderSVM: A Fast SVM Library on GPUs and CPUs](https://github.com/Xtra-Computing/thundersvm/blob/master/thundersvm-full.pdf)
157
+ - [A Practical Guide to Support Vector Classification](https://www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf)
151
158
 
152
159
  ## History
153
160
 
154
- View the [changelog](https://github.com/ankane/thundersvm/blob/master/CHANGELOG.md)
161
+ View the [changelog](https://github.com/ankane/thundersvm-ruby/blob/master/CHANGELOG.md)
155
162
 
156
163
  ## Contributing
157
164
 
158
165
  Everyone is encouraged to help improve this project. Here are a few ways you can help:
159
166
 
160
- - [Report bugs](https://github.com/ankane/thundersvm/issues)
161
- - Fix bugs and [submit pull requests](https://github.com/ankane/thundersvm/pulls)
167
+ - [Report bugs](https://github.com/ankane/thundersvm-ruby/issues)
168
+ - Fix bugs and [submit pull requests](https://github.com/ankane/thundersvm-ruby/pulls)
162
169
  - Write, clarify, or fix documentation
163
170
  - Suggest or add new features
164
171
 
165
172
  To get started with development:
166
173
 
167
174
  ```sh
168
- git clone https://github.com/ankane/thundersvm.git
169
- cd thundersvm
175
+ git clone https://github.com/ankane/thundersvm-ruby.git
176
+ cd thundersvm-ruby
170
177
  bundle install
171
178
  bundle exec rake test
172
179
  ```
@@ -7,7 +7,12 @@ module ThunderSVM
7
7
  dlload Fiddle.dlopen(libs.shift)
8
8
  rescue Fiddle::DLError => e
9
9
  retry if libs.any?
10
- raise e
10
+
11
+ if e.message.include?("Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib") && e.message.include?("Reason: image not found")
12
+ raise Fiddle::DLError, "OpenMP not found. Run `brew install libomp`"
13
+ else
14
+ raise e
15
+ end
11
16
  end
12
17
 
13
18
  extern "void thundersvm_train(int argc, char **argv)"
@@ -1,3 +1,3 @@
1
1
  module ThunderSVM
2
- VERSION = "0.1.3"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/thundersvm.rb CHANGED
@@ -19,7 +19,11 @@ module ThunderSVM
19
19
  if Gem.win_platform?
20
20
  "thundersvm.dll"
21
21
  elsif RbConfig::CONFIG["host_os"] =~ /darwin/i
22
- "libthundersvm.dylib"
22
+ if RbConfig::CONFIG["host_cpu"] =~ /arm|aarch64/i
23
+ "libthundersvm.arm64.dylib"
24
+ else
25
+ "libthundersvm.dylib"
26
+ end
23
27
  else
24
28
  "libthundersvm.so"
25
29
  end
Binary file
metadata CHANGED
@@ -1,73 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thundersvm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-12 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: minitest
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '5'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '5'
55
- - !ruby/object:Gem::Dependency
56
- name: numo-narray
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- description:
70
- email: andrew@chartkick.com
11
+ date: 2023-04-17 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email: andrew@ankane.org
71
15
  executables: []
72
16
  extensions: []
73
17
  extra_rdoc_files: []
@@ -83,14 +27,15 @@ files:
83
27
  - lib/thundersvm/regressor.rb
84
28
  - lib/thundersvm/version.rb
85
29
  - vendor/LICENSE
30
+ - vendor/libthundersvm.arm64.dylib
86
31
  - vendor/libthundersvm.dylib
87
32
  - vendor/libthundersvm.so
88
33
  - vendor/thundersvm.dll
89
- homepage: https://github.com/ankane/thundersvm
34
+ homepage: https://github.com/ankane/thundersvm-ruby
90
35
  licenses:
91
36
  - Apache-2.0
92
37
  metadata: {}
93
- post_install_message:
38
+ post_install_message:
94
39
  rdoc_options: []
95
40
  require_paths:
96
41
  - lib
@@ -98,15 +43,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
98
43
  requirements:
99
44
  - - ">="
100
45
  - !ruby/object:Gem::Version
101
- version: '2.4'
46
+ version: '3'
102
47
  required_rubygems_version: !ruby/object:Gem::Requirement
103
48
  requirements:
104
49
  - - ">="
105
50
  - !ruby/object:Gem::Version
106
51
  version: '0'
107
52
  requirements: []
108
- rubygems_version: 3.1.2
109
- signing_key:
53
+ rubygems_version: 3.4.10
54
+ signing_key:
110
55
  specification_version: 4
111
56
  summary: High performance parallel SVMs for Ruby
112
57
  test_files: []