TensorCast.jl icon indicating copy to clipboard operation
TensorCast.jl copied to clipboard

Updated compat versions and Fast tweak for tests to all work

Open kool7d opened this issue 2 years ago • 5 comments

Updated versions and changed the TensorCast import in the Fast module so that the tests all work. I don't know if correct to do that. TransmuteDims is set to the current version 0.1.15 without the Strided v2 UnsafeStridedView changes in the PR Update Strided dep to v2 #41.

kool7d avatar Jun 27 '23 03:06 kool7d

Any movement on this @mcabbott ? As it currently stands, I cannot use TensorCast with some more modern packages I need.

andrewkhardy avatar Dec 18 '23 20:12 andrewkhardy

Can you say which packages?

I would prefer not to touch most of these bounds. But e.g. LazyArrays could probably allow 1.0? Haven't tested but would prefer to change exactly one thing at a time.

For Strided.jl, perhaps this package should have no bounds, but Strided v2 needs code changes to TransmuteDims.jl and I haven't got around to figuring them out, sorry. (On that, https://github.com/mcabbott/TransmuteDims.jl/pull/41 and https://github.com/Jutho/Strided.jl/issues/25 are the issues.)

mcabbott avatar Dec 18 '23 20:12 mcabbott

It is exactly the Strided v2 code changes I am referring to. It is required by ITensors.

andrewkhardy avatar Dec 19 '23 14:12 andrewkhardy

Forgot about this, sorry. Just pushed https://github.com/mcabbott/TensorCast.jl/commit/2c500cc76ca713baad58408dba4ec295762fb6cf to allow Strided@2, needs https://github.com/mcabbott/TransmuteDims.jl/pull/43

Locally, LazyArrays@1 led to an error, let's see what CI thinks.

Test Summary: | Pass  Total   Time
@reduce       |   18     18  12.1s
complex: Test Failed at /Users/me/.julia/dev/TensorCast/test/casting.jl:80
  Expression: A == R .+ C'
   Evaluated: ComplexF64[5.036186709527962 - 0.19500712187403701im 33.62434776231509 - 0.8901324414072603im 10.558992802162038 - 0.6451245256192494im; 19.346451723306124 - 0.30131488503625214im 13.434101724995458 - 0.48432369740022085im 4.044945718340731 - 0.8643411262635937im; 22.656896134071637 - 0.5282954635159289im 16.206193134666705 - 0.23834506667784028im 10.112277104045672 - 0.8818663128297509im] == ComplexF64[5.036186709527962 - 0.19500712187403701im 33.346451723306124 - 0.30131488503625214im 10.656896134071639 - 0.5282954635159289im; 19.62434776231509 - 0.8901324414072603im 13.434101724995458 - 0.48432369740022085im 4.206193134666703 - 0.23834506667784028im; 22.558992802162038 - 0.6451245256192494im 16.04494571834073 - 0.8643411262635937im 10.112277104045672 - 0.8818663128297509im]

Stacktrace:
 [1] macro expansion
   @ /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/Test/src/Test.jl:672 [inlined]
 [2] macro expansion
   @ ~/.julia/dev/TensorCast/test/casting.jl:80 [inlined]
 [3] macro expansion
   @ /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [4] top-level scope
   @ ~/.julia/dev/TensorCast/test/casting.jl:76
complex: Test Failed at /Users/me/.julia/dev/TensorCast/test/casting.jl:83
  Expression: A == (R' .+ conj.(C)) .+ 10im
   Evaluated: ComplexF64[5.036186709527962 + 9.804992878125963im 19.346451723306124 + 9.698685114963748im 22.656896134071637 + 9.47170453648407im; 33.62434776231509 + 9.10986755859274im 13.434101724995458 + 9.515676302599779im 16.206193134666705 + 9.76165493332216im; 10.558992802162038 + 9.354875474380751im 4.044945718340731 + 9.135658873736407im 10.112277104045672 + 9.11813368717025im] == ComplexF64[5.036186709527962 + 9.804992878125963im 19.62434776231509 + 9.10986755859274im 22.558992802162038 + 9.354875474380751im; 33.346451723306124 + 9.698685114963748im 13.434101724995458 + 9.515676302599779im 16.04494571834073 + 9.135658873736407im; 10.656896134071639 + 9.47170453648407im 4.206193134666703 + 9.76165493332216im 10.112277104045672 + 9.11813368717025im]

Stacktrace:
 [1] macro expansion
   @ /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/Test/src/Test.jl:672 [inlined]
 [2] macro expansion
   @ ~/.julia/dev/TensorCast/test/casting.jl:83 [inlined]
 [3] macro expansion
   @ /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [4] top-level scope
   @ ~/.julia/dev/TensorCast/test/casting.jl:76
Test Summary:         | Pass  Fail  Total   Time
@cast                 |   21     2     23  11.5s
  simple broadcasting |    7            7   3.7s
  broadcast reduction |    4            4   2.8s
  complex             |    1     2      3   1.4s
  diag                |    6            6   0.2s
  mapslices etc       |    3            3   3.1s
ERROR: LoadError: Some tests did not pass: 21 passed, 2 failed, 0 errored, 0 broken.

mcabbott avatar Mar 27 '24 14:03 mcabbott

This still does not solve the issue for packages that depend on TensorCast and require new versions of other packages. Are there any plans to merge https://github.com/mcabbott/TransmuteDims.jl/pull/43 soon?

lpawela avatar Apr 03 '24 18:04 lpawela