webonnx / wonnx

A WebGPU-accelerated ONNX inference run-time written 100% in Rust, ready for native and the web
Other
1.61k stars 59 forks source link

Release a new version of the library, and the CLI tool to crates.io #57

Closed pixelspark closed 2 years ago

pixelspark commented 2 years ago

Is your feature request related to a problem? Please describe.

To improve the 'tryability' of wonnx, users should be able to quickly do a cargo install wonnx-cli and run nnx infer .... This would then need to be added to the README as well.

Describe the solution you'd like

We should first release a new version of wonnx to crates.io after the CLI (#53) has merged.

Then we should release wonnx-cli as well (unfortunately we can't publish the workspace as single package and we don't want to merge the CLI in the wonnx package because it comes with all sorts of stuff that users of wonnx that just want the library don't need).

An issue is that we need to fix links to packages (e.g. wonnx-cli refers to wonnx using the path ../wonnx but for crates.io it should probably be a specific wonnx version, or a link to the Github repository. See also https://github.com/rust-lang/cargo/issues/6126).

Describe alternatives you've considered

We might want to consider providing binaries from the releases page on Github as well. If we have those, we can think about adding support for Homebrew.

Additional context

n/a

haixuanTao commented 2 years ago

We should probably automate every release for both Pypi, crates.io and homebrew.... Making sure that everything is also pushed on the same commit / tag version.

pixelspark commented 2 years ago

At this point WebGPU is still very much in flux. ONNX is moving as well but at least we implement a pretty good set of basic ops at this point. I think the feature set currently offered by wonnx however is sufficient for a 1.0 release. Wonnx can run a variety of models quite robustly and it is quite a compelling option for the web once WebGPU comes out. The only viable alternative I know of is ONNXRuntime-web (which fundamentally works the same way as wonnx, except it uses WebGL2 and GLSL shaders which by the way could be very useful to have a look at when implementing new ops in wonnx).

I would hence suggest to work towards releasing a v1.0 to be ready when WebGPU is entering mainstream browsers. Before this we should at least fix #56 (which requires a new version of wgpu to be released). Additionally I would also consider fixing #47 (I have made some progress on both fronts).

Practically speaking, I am not in the position to make releases (you have the keys I guess) so perhaps you could think about how to organize this (I like the idea of fully automating this, there should be ample GitHub Actions template workflows for this that should make this really easy).

haixuanTao commented 2 years ago

Ok, I have sent you an invite on crates.io. I'll try to find the time to add automation to the release process this weekend but really not sure.

pixelspark commented 2 years ago

Thanks!

For reference, this issue requires merge of #119 now (the #56 was too outdated)

pixelspark commented 2 years ago

I just released v0.2.5!

To demo wonnx, you can now do cargo install wonnx-cli.

pixelspark commented 2 years ago

Note, in order to publish all crates are required to refer to a specific version of dependencies. Therefore the crate Cargo.toml files now have wonnx = "0.2.5" as dependency. The Cargo.toml in the root of the repository overrides these references to point to the version in the workspace instead.