Skip to content

Commit

Permalink
Minor tweaks and bump version.
Browse files Browse the repository at this point in the history
  • Loading branch information
GunnarFarneback committed Oct 19, 2023
1 parent 098582a commit 9260fe2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ONNXRunTime"
uuid = "e034b28e-924e-41b2-b98f-d2bbeb830c6a"
authors = ["Jan Weidner <[email protected]> and contributors"]
version = "0.4.0"
version = "0.4.1"

[deps]
ArgCheck = "dce04be8-c92d-5529-be00-80e4d2c0e197"
Expand Down
2 changes: 1 addition & 1 deletion src/highlevel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ function (o::InferenceSession)(
inputs,
output_names=nothing
)
isalive(o) || error("Session has been released and can no longer be called.")
if output_names === nothing
output_names = @__MODULE__().output_names(o)
end
Expand Down Expand Up @@ -174,7 +175,6 @@ function (o::InferenceSession)(
throw(ArgumentError(msg))
end
end
isalive(o) || error("Session has been released and can no longer be called.")
inp_names, input_tensors = prepare_inputs(o, inputs)
run_options = nothing
output_tensors = Run(o.api, o.session, run_options, inp_names, input_tensors, output_names)
Expand Down
1 change: 1 addition & 0 deletions test/test_highlevel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ using ONNXRunTime: juliatype
y = model((;input))
release(model)
@test_throws ErrorException y = model((;input))
@test_throws "Session has been released and can no longer be called." y = model((;input))
end
end

Expand Down

0 comments on commit 9260fe2

Please sign in to comment.