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

ERROR: KeyError: key :Gather not found #52

Closed
logankilpatrick opened this issue Oct 13, 2021 · 1 comment
Closed

ERROR: KeyError: key :Gather not found #52

logankilpatrick opened this issue Oct 13, 2021 · 1 comment

Comments

@logankilpatrick
Copy link
Member

Hey folks, I am trying to do the following and get an error loading a ONNX model file:

julia> huggingface_hub.snapshot_download(repo_id="lysandre/onnx-bart", revision="main")
Downloading: 100%|██████████████████████████████| 737/737 [00:00<00:00, 146kB/s]
Downloading: 100%|█████████████████████████| 1.63G/1.63G [01:12<00:00, 22.5MB/s]
"/Users/logankilpatrick/.cache/huggingface/hub/lysandre__onnx-bart.b2d274851069c9d976ae621f012f046389423c18"

shell> cd "/Users/logankilpatrick/.cache/huggingface/hub/lysandre__onnx-bart.b2d274851069c9d976ae621f012f046389423c18"
/Users/logankilpatrick/.cache/huggingface/hub/lysandre__onnx-bart.b2d274851069c9d976ae621f012f046389423c18

julia> ONNX.load_model("model.onnx")
ERROR: KeyError: key :Gather not found
Stacktrace:
 [1] getindex(h::Dict{Symbol, Any}, key::Symbol)
   @ Base ./dict.jl:482
 [2] _graph(g::ONNX.Types.Graph)
   @ ONNX ~/.julia/packages/ONNX/iz0dL/src/graph/graph.jl:0
 [3] graph(g::ONNX.Types.Graph)
   @ ONNX ~/.julia/packages/ONNX/iz0dL/src/graph/graph.jl:92
 [4] code(g::ONNX.Types.Graph)
   @ ONNX ~/.julia/packages/ONNX/iz0dL/src/graph/graph.jl:100
 [5] write_julia_file(model_file::String)
   @ ONNX ~/.julia/packages/ONNX/iz0dL/src/convert.jl:235
 [6] load_model(model::String)
   @ ONNX ~/.julia/packages/ONNX/iz0dL/src/convert.jl:250
 [7] top-level scope
   @ REPL[18]:1

shell> ls -l
total 3180640
-rw-------  1 logankilpatrick  staff  1625394545 Oct 13 07:01 model.onnx
-rw-r--r--  1 logankilpatrick  staff      685933 Oct 13 07:02 weights.bson

Any ideas to resolve this issue? The model is coming from: https://huggingface.co/lysandre/onnx-bart/tree/main

@ToucheSir
Copy link
Member

I'm going to join this with #53 since they're fundamentally about the same thing (old ONNX, no gather support). See my comment there.

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

No branches or pull requests

2 participants