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

Unsatisfiable requirements detected for package Flux

Open JosePereiraUA opened this issue 2 years ago • 15 comments

Apparently, ONNX.jl is restricted to versions 0.1.0-0.1.1 of Flux.jl. Is this such a restrictive parameter? I keep having this error:

ERROR: Unsatisfiable requirements detected for package Flux [587475ba]:
 Flux [587475ba] log:
 ├─possible versions are: 0.4.1-0.13.3 or uninstalled
(...)
 ├─restricted by compatibility requirements with ONNX [d0dd6a25] to versions: 0.4.1-0.11.6, leaving only versions: [0.4.1-0.10.4, 0.11.2-0.11.6]
 │ └─ONNX [d0dd6a25] log:
 │   ├─possible versions are: 0.1.0-0.1.1 or uninstalled
 │   └─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.1.1
(...)

JosePereiraUA avatar Jun 16 '22 16:06 JosePereiraUA

The version of ONNX in this repo hasn't been registered yet. You're pulling in the long-dead 2019 version. I think cutting a v0.3.1 version now that matmul is in would be better than nothing, but we probably want some consensus around this before going ahead.

ToucheSir avatar Jun 16 '22 16:06 ToucheSir

Ah, ok. That may be it. Yhea, I think that would be a good idea: just register what we have for now, since matmul is quite "important" I would say.

JosePereiraUA avatar Jun 16 '22 16:06 JosePereiraUA

Ok so I installed the latest ONNX.jl from this repo, but I keep having this issues, here is the full error log:

(@v1.7) pkg> add https://github.com/sergio-santos-group/ProtoSyn.jl.git#dev
    Updating git-repo `https://github.com/sergio-santos-group/ProtoSyn.jl.git`
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Adapt [79e6a3ab]:
 Adapt [79e6a3ab] log:
 ├─possible versions are: 0.3.0-3.3.3 or uninstalled
 ├─restricted by compatibility requirements with CUDA [052768ef] to versions: 1.0.0-3.3.3
 │ └─CUDA [052768ef] log:
 │   ├─possible versions are: 0.1.0-3.11.0 or uninstalled
 │   ├─restricted to versions * by ProtoSyn [c9758760], leaving only versions 0.1.0-3.11.0
 │   │ └─ProtoSyn [c9758760] log:
 │   │   ├─possible versions are: 0.4.0 or uninstalled
 │   │   └─ProtoSyn [c9758760] is fixed to version 0.4.0
 │   ├─restricted by julia compatibility requirements to versions: [2.3.0, 2.5.0-3.11.0] or uninstalled, leaving only versions: [2.3.0, 2.5.0-3.11.0]
 │   └─restricted by compatibility requirements with LLVM [929cbde3] to versions: 3.3.3-3.11.0 or uninstalled, leaving only versions: 3.3.3-3.11.0
 │     └─LLVM [929cbde3] log:
 │       ├─possible versions are: 0.9.0-4.14.0 or uninstalled
 │       ├─restricted by compatibility requirements with CUDA [052768ef] to versions: 1.5.0-4.14.0
 │       │ └─CUDA [052768ef] log: see above
 │       └─restricted by julia compatibility requirements to versions: 4.0.0-4.14.0 or uninstalled, leaving only versions: 4.0.0-4.14.0
 ├─restricted by compatibility requirements with CUDA [052768ef] to versions: 3.3.0-3.3.3
 │ └─CUDA [052768ef] log: see above
 └─restricted by compatibility requirements with Flux [587475ba] to versions: 0.3.0-1.1.0 — no versions left
   └─Flux [587475ba] log:
     ├─possible versions are: 0.4.1-0.13.3 or uninstalled
     ├─restricted by compatibility requirements with ONNX [d0dd6a25] to versions: 0.4.1-0.11.6
     │ └─ONNX [d0dd6a25] log:
     │   ├─possible versions are: 0.1.0-0.1.1 or uninstalled
     │   └─restricted to versions * by ProtoSyn [c9758760], leaving only versions 0.1.0-0.1.1
     │     └─ProtoSyn [c9758760] log: see above
     ├─restricted by compatibility requirements with CUDAapi [3895d2a7] to versions: [0.4.1-0.8.3, 0.10.0-0.13.3] or uninstalled, leaving only versions: [0.4.1-0.8.3, 0.10.0-0.11.6]
     │ └─CUDAapi [3895d2a7] log:
     │   ├─possible versions are: 0.5.0-4.0.0 or uninstalled
     │   └─restricted by julia compatibility requirements to versions: uninstalled
     ├─restricted by compatibility requirements with Adapt [79e6a3ab] to versions: 0.8.3-0.13.3 or uninstalled, leaving only versions: [0.8.3, 0.10.0-0.11.6]
     │ └─Adapt [79e6a3ab] log: see above
     ├─restricted by compatibility requirements with CUDA [052768ef] to versions: [0.4.1-0.10.4, 0.12.2-0.13.3] or uninstalled, leaving only versions: [0.8.3, 0.10.0-0.10.4]
     │ └─CUDA [052768ef] log: see above
     └─restricted by compatibility requirements with CuArrays [3a865a2d] to versions: [0.4.1-0.8.3, 0.11.0-0.13.3] or uninstalled, leaving only versions: 0.8.3
       └─CuArrays [3a865a2d] log:
         ├─possible versions are: 0.2.1-2.2.2 or uninstalled
         └─restricted by julia compatibility requirements to versions: uninstalled

By removing ONNX.jl from my package (ProtoSyn.jl) dependencies, everything installs fine. I think there's some issue with the dependency graph on ONNX.jl, but I may be mistaken.

JosePereiraUA avatar Jun 17 '22 13:06 JosePereiraUA

Notice the version bounds on ONNX: you still appear to be pulling the out of date version from the registry and not the repo.

ToucheSir avatar Jun 17 '22 13:06 ToucheSir

I understand. How do I make sure I'm pulling from this repo? On my Manifest.toml I have:

[[deps.ONNX]]
deps = ["Ghost", "LinearAlgebra", "NNlib", "Pkg", "ProtoBuf", "Revise", "StaticArrays", "Statistics", "Test"]
git-tree-sha1 = "3b572cbedc3a917105d44a96b08e659428c50c69"
repo-rev = "master"
repo-url = "https://github.com/FluxML/ONNX.jl"
uuid = "d0dd6a25-fac6-55c0-abf7-829e0c774d20"
version = "0.3.0"

Shouldn't this be it?


Indeed, the registered package as Flux.jl as a dependency. https://github.com/JuliaRegistries/General/tree/master/O/ONNX

I found this: https://github.com/JuliaLang/Pkg.jl/issues/681 If I manually add this repo before adding my package, everything works fine. However, if I just try to add my package, the issue occurs. How can I tell the package manager to use this unregistered package?

JosePereiraUA avatar Jun 17 '22 13:06 JosePereiraUA

What does ] st -m show? I just tried installing ONNX in a fresh env and did not run into any conflicts (including with Adapt).

ToucheSir avatar Jun 17 '22 14:06 ToucheSir

Adding ONNX.jl from this repo is not an issue.

I can manually add ONNX.jl (from https://github.com/FluxML/ONNX.jl), and then add my package and it works fine. On my Manifest.toml I have the dependency marked as:

[[deps.ONNX]]
deps = ["Ghost", "LinearAlgebra", "NNlib", "Pkg", "ProtoBuf", "Revise", "StaticArrays", "Statistics", "Test"]
git-tree-sha1 = "3b572cbedc3a917105d44a96b08e659428c50c69"
pinned = true
repo-rev = "master"
repo-url = "https://github.com/FluxML/ONNX.jl"
uuid = "d0dd6a25-fac6-55c0-abf7-829e0c774d20"
version = "0.3.0"

If I were to add my package (also unregistered) from github directly (add https://github.com/sergio-santos-group/ProtoSyn.jl.git#dev) before manually adding the unregistered dependency ONNX.jl, Julia attempts to fetch the registered version of ONNX.jl (old and deprecated version), causing an ERROR: Unsatisfiable requirements issue.

So I want to be able to just say add https://github.com/sergio-santos-group/ProtoSyn.jl.git#dev and have Julia get this repo instead of the registered one, but I think that's not possible 😞

JosePereiraUA avatar Jun 17 '22 14:06 JosePereiraUA

I just cloned the ProtoSyn repo and was able to add ONNX without any issues. What if you put a compat bound of 0.3.0 in your Project.toml? (this should be done anyways for packages)

ToucheSir avatar Jun 17 '22 14:06 ToucheSir

How did you install ProtoSyn?

You cloned and did activate . + instantiate ?

JosePereiraUA avatar Jun 17 '22 14:06 JosePereiraUA

What if you put a compat bound of 0.3.0 in your Project.toml? (this should be done anyways for packages)

This, unfortunately, doesn't work, as Julia seems unable to find the repo, even though it is on my Manifest.toml.

(@v1.7) pkg> add https://github.com/sergio-santos-group/ProtoSyn.jl.git#dev
    Updating git-repo `https://github.com/sergio-santos-group/ProtoSyn.jl.git`
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package ONNX [d0dd6a25]:
 ONNX [d0dd6a25] log:
 ├─possible versions are: 0.1.0-0.1.1 or uninstalled
 └─restricted to versions 0.3 by ProtoSyn [c9758760] — no versions left
   └─ProtoSyn [c9758760] log:
     ├─possible versions are: 0.4.0 or uninstalled
     └─ProtoSyn [c9758760] is fixed to version 0.4.0

Well, I guess that my issue is fixed either by:

  1. Cloning the repo and doing activate . + instantiate
  2. Manually installing the unregistered ONNX.jl from this repo before adding my package

It still sucks that I can't install my package (with this ONNX.jl as a dependency in a one liner). Oh well.

JosePereiraUA avatar Jun 17 '22 14:06 JosePereiraUA

Is there any way to make the resolution process find github repos? AFAICT no, so if you're trying to use this as a dependency in another registered package (which was the context I missed) then there doesn't appear to be any way around registering a new version of ONNX. @dfdx would that work for you? If so, I can do it today.

ToucheSir avatar Jun 17 '22 15:06 ToucheSir

Yes. However, my package is also not registered. Not sure if that changes the outcome of this issue. If the current version of ONNX.jl would be registered, I think that would solve my current predicament, so thanks! ahah

JosePereiraUA avatar Jun 17 '22 15:06 JosePereiraUA

I'm definitely ok with registering a new version. I think I already set version 0.3.0 in Project.toml in one of tge PRs, so we don't need to bump it any more. Moreover, I'm not even sure version 0.2 is registered, but I can check it and register ince I get to my laptop.

dfdx avatar Jun 17 '22 20:06 dfdx

I reverted the version to 0.2 (the latest registered is 1.1), but JuliaHub doesn't let me register the package:

User dfdx is not a member of the org FluxML and not a collaborator on repo ONNX.jl

@ToucheSir Would you do us a favor and register it?

dfdx avatar Jun 17 '22 21:06 dfdx

https://github.com/JuliaRegistries/General/pull/62565

ToucheSir avatar Jun 17 '22 22:06 ToucheSir