linfa icon indicating copy to clipboard operation
linfa copied to clipboard

Upgrade to ndarray 0.16

Open relf opened this issue 10 months ago • 6 comments

  • [x] ndarray 0.16
  • [x] linfa-llinalg 0.2
  • [x] narray-linalg 0.17
  • [x] ndarray-stats 0.6
  • [x] ndarray-rand 0.15
  • [x] ndarray-csv 0.5
  • [x] sprs 0.11
  • [x] approx 0.5
  • [ ] argmin > 0.10.0
  • [ ] argmin-math > 0.4.0
  • [x] criterion 0.5
  • [x] statrs 0.18
  • [x] thiserror 2.0

relf avatar Jan 29 '25 20:01 relf

Codecov Report

:x: Patch coverage is 39.02439% with 25 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 35.95%. Comparing base (77457b2) to head (493732f). :warning: Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/composing/multi_target_model.rs 16.66% 5 Missing :warning:
src/dataset/impl_targets.rs 0.00% 5 Missing :warning:
src/dataset/mod.rs 0.00% 4 Missing :warning:
src/dataset/impl_dataset.rs 50.00% 3 Missing :warning:
algorithms/linfa-logistic/src/lib.rs 75.00% 2 Missing :warning:
algorithms/linfa-preprocessing/src/whitening.rs 0.00% 2 Missing :warning:
...rithms/linfa-trees/src/decision_trees/algorithm.rs 0.00% 2 Missing :warning:
algorithms/linfa-bayes/src/base_nb.rs 0.00% 1 Missing :warning:
algorithms/linfa-linear/src/isotonic.rs 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #371      +/-   ##
==========================================
- Coverage   36.36%   35.95%   -0.41%     
==========================================
  Files         101      100       -1     
  Lines        6553     6549       -4     
==========================================
- Hits         2383     2355      -28     
- Misses       4170     4194      +24     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Mar 10 '25 15:03 codecov[bot]

Is anything blocking this other than the release of a new version of argmin that supports ndarray 0.16?

amfaber avatar Apr 01 '25 05:04 amfaber

Is anything blocking this other than the release of a new version of argmin that supports ndarray 0.16?

No. The PR is currently tested against argmin master. AFAIK, argmin's maintainer will release a new version in a few weeks.

relf avatar Apr 01 '25 08:04 relf

Fantastic! Thanks for the quick response :)

amfaber avatar Apr 01 '25 08:04 amfaber

Any update on that PR ?

shigedangao avatar May 19 '25 09:05 shigedangao

Any update on that PR ?

Nope... Still waiting for argmin new release.

relf avatar May 19 '25 12:05 relf

So, when will it be released? Today is August 3.

xum001 avatar Aug 13 '25 14:08 xum001

  • argmin

Seems to still blocked by the fact that there are no new argmin release...

shigedangao avatar Aug 20 '25 07:08 shigedangao

Since this is a foundational library, it might make sense to use a range of versions such as version= ">=0.15, <=0.16" in order to provide better compatibility. For me, linfa is a secondary dependency via egobox and I would like to avoid any future clashes with other crates that use slightly different versions.

jonaspleyer avatar Sep 17 '25 12:09 jonaspleyer

@jonaspleyer, Beside the fact the code should then be compatible/tested with various versions of ndarray, I am not sure that such spec solves the problem. As stated here for PyO3/rust-numpy, I am afraid you will need to pin the version of ndarray anyway.

relf avatar Sep 20 '25 09:09 relf

@jonaspleyer, Beside the fact the code should then be compatible/tested with various versions of ndarray, I am not sure that such spec solves the problem. As stated here for PyO3/rust-numpy, I am afraid you will need to pin the version of ndarray anyway.

Well ... this problem should be solved by a 1.0 release of ndarray. This would mean that we can rely on new versions being compatible. For now, we are stuck in an uncomfortable intermediate state where we can not be sure that 0.17 will be compatible with 0.16 for instance. However, a 1.0 release is not close as far as I can tell.

Both ways which we have discussed have their advantages and challenges. I can understand that you are hesitant to simply allow arbitrary ranges of versions. For me, as a user who relies on many packages that either use ndarray or re-export it themselves, the flexibility would be a great relief. I do not mind pinning the version number but I would like to be able to combine multiple packages with as little ease as possible.

jonaspleyer avatar Sep 20 '25 09:09 jonaspleyer

  • argmin

Seems to still blocked by the fact that there are no new argmin release...

A new argmin release is out: https://github.com/argmin-rs/argmin/releases/tag/argmin-v0.11.0

Apologies for blocking this, I unfortunately wasn't able to release earlier.

stefan-k avatar Sep 28 '25 14:09 stefan-k