abrown opened PR #6854 from abrown:registries
to bytecodealliance:main
:
This implements named models in Wasmtime; see the commit messages for more details.
abrown requested fitzgen for a review on PR #6854.
abrown requested wasmtime-default-reviewers for a review on PR #6854.
abrown requested wasmtime-core-reviewers for a review on PR #6854.
abrown requested pchickey for a review on PR #6854.
abrown submitted PR review.
abrown created PR review comment:
I'm not quite happy with using this script for testing. It was good initially to get things working but I would prefer to be using
cargo test
instead. The problem is that there is a dependency expectation: this can only run if the system has OpenVINO installed, which will not always be the case for developers runningcargo test
.I can think of two workarounds:
#[ignore]
the OpenVINO-specific tests and add some comments telling developers to turn them on to fully test the system- add some checks at the beginning of each test to early-exit if OpenVINO is not available; the issue with this is that users may see "false success" if something goes wrong in the environment, so perhaps a
FORCE_RUN_OPENVINO_TESTS
env variable is necessary?Interested in some feedback on whether one of those approaches is better than this script!
abrown submitted PR review.
abrown created PR review comment:
Another thing I'm not quite sure of is whether this should return
Option<&mut Graph>
,Option<&Graph>
, or evenOption<Graph>
(seeing as howGraph
is just anArc
-wrapper). We immediately clone the graph and I removed the mutability requirement forBackendGraph::init_execution_context
... @geekbeast , any opinions from implementing other kinds ofGraphRegistry
?
abrown edited PR review comment.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Personally I like your second suggestion and matches what I was going to suggest as well. We do run a higher risk of not actually running the tests in CI but I think running something by default as part of
cargo test --workspace
is a good mitigating factor for that.
geekbeast submitted PR review.
geekbeast created PR review comment:
If the tests are for wasi-nn, we should just have a test backend that does something basic like an affine layer.
If this is testing integration we should think about how we handle multiple backends. This same issue will come up with pytorch, onnxruntime, tf, etc.
abrown submitted PR review.
abrown created PR review comment:
@alexcrichton, I have a whole other set of commits ready for switching to that kind of testing. Just waiting on a review of this one because the new testing also covers the
load_by_name
logic added here.
alexcrichton submitted PR review:
I can't review the wasi-nn stuff specifically really, it all seems reasonable though. The
src/commands/run.rs
bits look good to me, although I might recommend renaming--graph
to something like--wasi-nn-graph
or--nn-graph
or something like that perhaps to make it a bit more clear it's for wasi-nn as opposed to something else graph-related (not that we have much else like that right now)
abrown updated PR #6854.
abrown updated PR #6854.
abrown has enabled auto merge for PR #6854.
abrown merged PR #6854.
abrown submitted PR review.
abrown created PR review comment:
Ok, check out https://github.com/bytecodealliance/wasmtime/pull/6895 if you're interested in where I went with this.
Last updated: Nov 22 2024 at 16:03 UTC