-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can classifier-reborn work with Numo::NArray / Numo::GSL ? Is that a better choice than nmatrix? #192
Comments
Bringing this issue back to life! I love Jekyll ❤️ and still use it for several personal projects. I also use this classifier-reborn gem, and it would be great to make sure it remains easy to use with more modern hardware & software. Here are some notes about why this matters:
All that is to say... it's increasingly important that this gem is easy to use with Ruby 3. However:
I would like to write some PRs to try to:
I've experimented a little bit (essentially a prototype/spike) and I think I can get a working SVD using def numo_build_reduced_matrix(matrix, cutoff = 0.75)
# OPTIMIZE ME: Consider other drivers/options like sdd.
s, u, vt = Numo::Linalg.svd(matrix, driver: 'svd', job: 'S')
# TODO: Better than 75% term, please. :\
s_cutoff = s.sort.reverse[(s.size * cutoff).round - 1]
s.size.times do |ord
s[ord] = 0.0 if s[ord] < s_cutoff
end
# Reconstruct the term document matrix, only with reduced rank
u.dot(::Numo::DFloat.eye(s.size) * s).dot(vt)
end To make this work and get it merged, I need the support of a maintainer on this project. Is there anyone in here who could review & merge PRs for the above? I realize this is an open source side project for most people (me too!) and I'm not looking for immediate response/turnaround. At the same time, I'm hesitant to invest in this work if my PRs will sit for months with no response. |
If you can make the PRs, I can review and merge them. |
This repo hasn't received much attention recently. As such, the TravisCI yaml file was referencing [EOL](https://www.ruby-lang.org/en/downloads/branches/) versions of ruby. Moreover, TravisCI itself isn't generally used for open source anymore. There are heavy restrictions on build minutes, as noted [here](jekyll/jekyll#8492) in the core Jekyll project. This PR does the following: * Removes `.travis.yml`. We won't run jobs on TravisCI anymore. * Replaces it with `.github/workflows/ci.yml`. We'll start running CI on GitHub Actions. * Updates Ruby versions to those currently supported. This matches the ones tested in the [core jekyll project](https://github.com/jekyll/jekyll/blob/796ae15c31147d1980662744ef0f19a15a27cdee/.github/workflows/ci.yml#L20-L28). This is making progress toward jekyll#192. I plan to work toward supporting Ruby 3 and Numo in classifier-reborn, but the first step is getting CI working with the existing code.
This repo hasn't received much attention recently. As such, the TravisCI yaml file was referencing [EOL](https://www.ruby-lang.org/en/downloads/branches/) versions of ruby. Moreover, TravisCI itself isn't generally used for open source anymore. There are heavy restrictions on build minutes, as noted [here](jekyll/jekyll#8492) in the core Jekyll project. This PR does the following: * Removes `.travis.yml`. We won't run jobs on TravisCI anymore. * Replaces it with `.github/workflows/ci.yml`. We'll start running CI on GitHub Actions. * Updates tested Ruby versions to 2.7 and 3.0. This is a subset of the ruby versions currently supported/tested by [Jekyll core](https://github.com/jekyll/jekyll/blob/796ae15c31147d1980662744ef0f19a15a27cdee/.github/workflows/ci.yml#L20-L28). I plan to add support for Ruby 3.1 and jruby 9.3.4 in subsequent PRs, but doing so will require additional code changes and I wanted to start be getting the existing code under test in CI. This is making progress toward jekyll#192. I plan to work toward supporting Ruby 3 with fast svd support and Numo in classifier-reborn, but the first step is getting CI working with the existing code.
This repo hasn't received much attention recently. As such, the TravisCI yaml file was referencing [EOL](https://www.ruby-lang.org/en/downloads/branches/) versions of ruby. Moreover, TravisCI itself isn't generally used for open source anymore. There are heavy restrictions on build minutes, as noted [here](jekyll/jekyll#8492) in the core Jekyll project. This PR does the following: * Removes `.travis.yml`. We won't run jobs on TravisCI anymore. * Replaces it with `.github/workflows/ci.yml`. We'll start running CI on GitHub Actions. * Updates tested Ruby versions to 2.7, 3.0, and jruby 9.3.4. This is a subset of the ruby versions currently supported/tested by [Jekyll core](https://github.com/jekyll/jekyll/blob/796ae15c31147d1980662744ef0f19a15a27cdee/.github/workflows/ci.yml#L20-L28). I plan to add support for Ruby 3.1 in a subsequent commit, but doing so will require additional code changes and I wanted to start be getting the existing code under test in CI. This makes progress toward jekyll#192. I plan to work toward supporting Ruby 3 with fast SVD support and Numo in classifier-reborn, but the first step is getting CI working with the existing code.
This repo hasn't received much attention recently. As such, the TravisCI yaml file was referencing [EOL](https://www.ruby-lang.org/en/downloads/branches/) versions of ruby. Moreover, TravisCI itself isn't generally used for open source anymore. There are heavy restrictions on build minutes, as noted [here](jekyll/jekyll#8492) in the core Jekyll project. This PR does the following: * Removes `.travis.yml`. We won't run jobs on TravisCI anymore. * Replaces it with `.github/workflows/ci.yml`. We'll start running CI on GitHub Actions. * Updates tested Ruby versions to 2.7, 3.0, and jruby 9.3.4. This is a subset of the ruby versions currently supported/tested by [Jekyll core](https://github.com/jekyll/jekyll/blob/796ae15c31147d1980662744ef0f19a15a27cdee/.github/workflows/ci.yml#L20-L28). I plan to add support for Ruby 3.1 in a subsequent commit, but doing so will require additional code changes and I wanted to start be getting the existing code under test in CI. This makes progress toward jekyll#192. I plan to work toward supporting Ruby 3 with fast SVD support and Numo in classifier-reborn, but the first step is getting CI working with the existing code.
@mkasberg will research and find out. It's likely similar to what we have in the maintainer instructions for the core jekyll gem. |
I've pushed a v2.3.0 tag and am waiting on permission changes to rubygems.org to push the new gem itself. There will be a new release soon™ |
Since v2.3.0 will support Numo, I'm going to go ahead and close this. |
@mattr- Any updates? I still don't see 2.3.0 at https://rubygems.org/gems/classifier-reborn |
Sorry, I was on vacation. I just pushed the gem up. |
Awesome! Apologies for pinging you on your vacation, hope you had a great time! |
I noticed that https://jekyll.github.io/classifier-reborn/#dependencies states we can use the
rb-gsl
gem to speed things up, and that in turn references usingnmatrix
ornarray
.The linked
narray
GitHub page states that it is in maintenance mode, and links to Numo::NArray, which lists Numo::GSL under related projects.Is it possible to use
Numo::GSL
withclassifier-reborn
?Since
rb-gsl
can only use one ofnmatrix
ornarray
, i'm also wondering which would be the better (aka: faster) choice to use for this functionality?I also noticed that
rb-gsl
hasn't been updated since 2017, and so is most likely unmaintained:The text was updated successfully, but these errors were encountered: