Breeze 2.0-SNAPSHOT builds for Scala 2.12/2.13/3.0.0-RC3

60 views
Skip to first unread message

David Hall

unread,
May 5, 2021, 1:54:54 PM5/5/21
to scala-...@googlegroups.com
Hi everyone,

I've finally got Breeze compiling and running against Scala 3. This is not the "Breeze 2" I muse about sometimes on this list--it's intended to be (mostly) source compatible--but the reorganization has thoroughly, thoroughly broken any semblance of binary compatibility, hence the major version bump.

It ended up being a pretty massive change to how implicits are organized, and I cleaned up some cruft while I was there. I still have more to do.

I would appreciate people trying this snapshot against their work, even if you're not using Scala 3, because I imagine it's entirely likely I broke Scala 2.12 / Scala 2.13 functionality, including probable performance regressions. It would be good to stamp that out / turn those issues into tests.

The builds are in sonatype snapshots:
resolvers +=
 
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"

Thanks!
-- David

rob.patro

unread,
May 5, 2021, 3:52:52 PM5/5/21
to scala-...@googlegroups.com




Sent via the Samsung Galaxy S8, an AT&T 5G Evolution capable smartphone
--
You received this message because you are subscribed to the Google Groups "Scala Breeze" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-breeze...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-breeze/CALW2ey0CLQ%2BsSNCLNDLovyw9q5UWdCb7t_WpLEqUdBwGPUhPoA%40mail.gmail.com.

Darren Wilkinson

unread,
May 8, 2021, 6:28:18 PM5/8/21
to Scala Breeze
This is great news! The snapshot seems to work for Scala 2.13 and Scala 3. But when I switch to the snapshot in one of my libraries, I get an error relating to broadcasting:

Could not find implicit value for parameter op: breeze.linalg.operators.OpMulMatrix.Impl2[breeze.linalg.BroadcastedColumns[breeze.linalg.DenseMatrix[Double],breeze.linalg.DenseVector[Double]],breeze.linalg.DenseVector[Double],That]
[error]     val Xs = X(::, *) * sW

X is a DenseMatrix[Double] and sW is a DenseVector[Double]. This syntax worked fine prior to the snapshot. Has broadcasting syntax changed?

Thanks,

David Hall

unread,
May 9, 2021, 2:16:09 AM5/9/21
to scala-...@googlegroups.com
That's exactly the kind of breakage I was looking for. I did my best to keep syntax the same for everything, but the changes to implicit search meant that things that worked before wouldn't work now.

That said, I don't know what you were trying to do before? Scalar multiplication? I think that should have been a compile error before, since you shouldn't be able to use `*` directly on two DenseVectors (but rather `*:*`)

-- David

--
You received this message because you are subscribed to the Google Groups "Scala Breeze" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-breeze...@googlegroups.com.

Darren Wilkinson

unread,
May 9, 2021, 6:38:20 AM5/9/21
to Scala Breeze
I was rescaling the rows of X using the weights specified in sW, but switching * to *:* seems to work fine, thanks.

Darren Wilkinson

unread,
May 13, 2021, 11:06:32 AM5/13/21
to Scala Breeze
Please could you do a snapshot release for 3.0.0 ?

Thanks,

David Hall

unread,
May 13, 2021, 4:58:44 PM5/13/21
to scala-...@googlegroups.com
I don't see maven artifacts yet, but I'll publish a release shortly if it's up by this weekend. I'll be away from my main computer next week though.

Marcel Luethi

unread,
May 23, 2021, 12:37:03 AM5/23/21
to scala-...@googlegroups.com
Hi David

I finally managed to port my own project, Scalismo, to Scala 3 and thereby to test also breeze 2.0-SNAPSHOT.
As you said, using breeze 1.x in compatibility mode did not work due to implicit resolutions, but switching to breeze 2.0-SNAPSHOT worked flawlessly. The project uses the standard linalg operations (Matrix/Vector multiplications, SVD, Cholesky, Matrix inverse, ...) but no sparse matrices.

The only issue I encountered on the way is the same that Darren already reported, namely that using * for broadcasting does not seem to work anymore.

What is your estimated timeline regarding a non-snapshot release targeting Scala 3.0.0?

Best regards,

Marcel



Reply all
Reply to author
Forward
0 new messages