TensorBFS / TensorInference.jl

Probabilistic inference using contraction of tensor networks
https://tensorbfs.github.io/TensorInference.jl/
MIT License
18 stars 2 forks source link

Switch from Requires to extensions #81

Open GiggleLiu opened 1 year ago

GiggleLiu commented 1 year ago

Added two extensions

codecov[bot] commented 1 year ago

Codecov Report

Merging #81 (75a021f) into main (248bdb5) will decrease coverage by 0.41%. Report is 1 commits behind head on main. The diff coverage is 50.00%.

@@            Coverage Diff             @@
##             main      #81      +/-   ##
==========================================
- Coverage   84.70%   84.29%   -0.41%     
==========================================
  Files          10       10              
  Lines         536      535       -1     
==========================================
- Hits          454      451       -3     
- Misses         82       84       +2     
Files Coverage Δ
ext/TensorInferenceGTNExt.jl 90.90% <100.00%> (ø)
src/TensorInference.jl 100.00% <ø> (ø)
src/mar.jl 94.54% <100.00%> (ø)
ext/TensorInferenceCUDAExt.jl 0.00% <0.00%> (ø)
src/utils.jl 88.97% <0.00%> (-0.71%) :arrow_down:
mroavi commented 1 year ago

I had an issue trying to run the tests on my machine:

(TensorInference) pkg> test
julia> ERROR: Compat `CUDA` not listed in `deps` or `extras` section.
GiggleLiu commented 1 year ago

I had an issue trying to run the tests on my machine:

(TensorInference) pkg> test
julia> ERROR: Compat `CUDA` not listed in `deps` or `extras` section.

What is your Julia version? The extensions feature requires Julia > 1.9. CUDA is listed in weakdeps, however your Julia does not check this section.

mroavi commented 1 year ago

Hmm, I see. I have Julia 1.8.5 installed on my machine. Given the requirement for Julia > 1.9 for the extensions feature, should we consider dropping support for the 1.8.x versions? Or is there a workaround to make it compatible with Julia 1.8.x?

GiggleLiu commented 1 year ago

The backward compatibility is discussed here: https://pkgdocs.julialang.org/v1.9/creating-packages/#Backwards-compatibility

However, I am against using compatibility treatment. For some users who want to stick to older version Julia, they can use older version of TensorInference.

We can either merge this PR directly, or merge it after the next julia LTS release. The previous LTS version is 1.6.

mroavi commented 1 year ago

Since we are planning to drop support for older Julia versions, I propose that we merge this once the next LTS version is released. Is there any way we could improve the error message above? The current error message does not clearly indicate that TensorInference.jl does not support versions prior to 1.9, even though we have specified 'julia = "1.9"' in the Project file.

GiggleLiu commented 1 year ago

Since we are planning to drop support for older Julia versions, I propose that we merge this once the next LTS version is released. Is there any way we could improve the error message above? The current error message does not clearly indicate that TensorInference.jl does not support versions prior to 1.9, even though we have specified 'julia = "1.9"' in the Project file.

I think the package simply does not appear in the General registry in julia version < 1.9. If you are using Julia 1.8, it will fetch older versions for you. FYI: I have droped <1.9 version support in the latest OMEinsum.

But I agree we should at least wait for 1.10 (not nessesaryly LTS), which is another significant improvement comparing with 1.9. Then more people will switch to newer version.