Skip to content
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

[WIP] Update dependencies #2

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

StefanUlbrich
Copy link

@StefanUlbrich StefanUlbrich commented Apr 20, 2022

Open issues:

@StefanUlbrich
Copy link
Author

Temporary workaround by installing sprs and sprs_ldl directly from git

@StefanUlbrich
Copy link
Author

Resolved compile errors related to ndarray. Remainder related to sprs. A few question related to explicit casting

let two = T::from(2.0).unwrap();
let three = T::from(3.0).unwrap();
let six = T::from(6.0).unwrap();
let two = T::from::<f64>(2.0).unwrap();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This cast seems necessary

src/umv/make.rs Outdated
let yi = y.slice(s![.., 0]).insert_axis(Axis(1));
let coeffs = stack![Axis(1), dydx, yi];
let bla = s![.., 0 as usize];
let yi = y.slice(s![.., 0 as usize]).insert_axis(Axis(1));
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@espdev , do you have an idea why this explicit cast is necessary?


// cannot multiply `&CsMatBase<T, usize, Vec<usize>, Vec<usize>, Vec<T>>` by `T`
// the trait `Mul<T>` is not implemented for `&CsMatBase<T, usize, Vec<usize>, Vec<usize>, Vec<T>>`

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last issue blocking compilation: The Mul trait is not implemented for the CsMatBase I am not sure whether it can be implemented outside the sprs crate (I tried at the bottom of trait.rs -- commented out. @espdev , any ideas?

@StefanUlbrich
Copy link
Author

Fixed all but one issue connected to sprs

@espdev
Copy link
Owner

espdev commented Apr 23, 2022

Hi @StefanUlbrich,

Thank you for your work and participation in csaps-rs!

Do I understand correctly that sprs version 0.11 does not work with csaps (the last issue)?

@StefanUlbrich
Copy link
Author

  1. Until the linalg part is not published, we’ll need to install from GIT directly.
  2. We can’t use the scalar product at two places but that can be worked around easily.

is an external package mandatory? we only have band matrices so maybe this can be exploited?

@StefanUlbrich
Copy link
Author

Hi @StefanUlbrich,

Thank you for your work and participation in csaps-rs!

Do I understand correctly that sprs version 0.11 does not work with csaps (the last issue)?

This compiles at least

let a1 = qtwq.map(|el| s1 * *el );
let a2 = r.map(|el| *el * smooth);

@mulimoen
Copy link

@StefanUlbrich sprs-ldl has been released for the newest sprs

@StefanUlbrich
Copy link
Author

StefanUlbrich commented Jun 23, 2022

@StefanUlbrich sprs-ldl has been released for the newest sprs

Thanks! Yes, there is some movement in sprs. I still have an compiler error that I could not figure out on my own. I doubt that this is resolved. Could we have a look together, @espdev (my rust experience is still limited)?

@espdev
Copy link
Owner

espdev commented Jun 23, 2022

Sorry guys. Now there is not enough time for the project. I won't be able to participate for a couple of weeks.

@StefanUlbrich
Copy link
Author

No worries @espdev . It seems that upgrading to sprs is blocked by sparsemat/sprs#278 ... using generic floats is an unresolved issue. It would not be a problem if we were dealing withf32 or f64 directly

@StefanUlbrich
Copy link
Author

@espdev , I managed to find a way around the issue with generic floats without the need to fix anything sprs (see sparsemat/sprs#278 (comment)). The package builds (!) and the unit tests pass except for one (and this seems to be a dimension issue, see below). There is still tons of comments and cleanup left, but it seems the issue is close to be finished.

test test_evaluate_3d ... FAILED

failures:

---- test_evaluate_3d stdout ----
thread 'test_evaluate_3d' panicked at 'assertion failed: `(left == right)`
  left: `[[[1.0, 2.0, 3.0, 4.0],
  [1.0, 3.0, 5.0, 7.0]],

 [[2.0, 4.0, 6.0, 8.0],
  [3.0, 5.0, 7.0, 9.0]]], shape=[2, 2, 4], strides=[1, 2, 4], layout=Ff (0xa), const ndim=3`,
 right: `[[[1.0, 2.0, 3.0, 4.0],
  [2.0, 4.0, 6.0, 8.0]],

 [[1.0, 3.0, 5.0, 7.0],
  [3.0, 5.0, 7.0, 9.0]]], shape=[2, 2, 4], strides=[8, 4, 1], layout=Cc (0x5), const ndim=3`', tests/umv_evaluate.rs:64:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    test_evaluate_3d

test result: FAILED. 3 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

@espdev
Copy link
Owner

espdev commented Aug 3, 2022

but it seems the issue is close to be finished

@StefanUlbrich great news!

@StefanUlbrich
Copy link
Author

Any idea on why the one unit test might fail (i.e., did it run on main)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants