Skip to content

fix: update pywebnn for https://github.com/rustnn/rustnn/pull/260 - #20

Merged
mtavenrath merged 1 commit into
rustnn:mainfrom
theHamsta:fix-filter-options
Oct 2, 2026
Merged

mtavenrath merged 1 commit into
rustnn:mainfrom
theHamsta:fix-filter-options

Conversation

@theHamsta

Copy link
Copy Markdown
Contributor

Possible fix for rustnn/rustnn#260

I could also add a TryFrom implementation to RustNN

.map(|layout| {
serde_json::from_str(layout).map_err(|_err| {
pyo3::exceptions::PyValueError::new_err(format!(
"Invalid filter_layout '{layout}', must be 'iohw' | 'hwoi' | 'ohwi'",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous error message was wrong as it allowed more transposed filter layouts than possible (copied from conv2dfilter layouts?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this ignores the quotes 🤦

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format!("\"{layout}\"") works in a hacky way but ideally RustNN provides the conversion directly

@theHamsta

Copy link
Copy Markdown
Contributor Author

A bit strange that we're using git deps here but don't have the lock file checked in.

@theHamsta
theHamsta marked this pull request as draft September 28, 2026 16:22
@theHamsta
theHamsta marked this pull request as ready for review October 1, 2026 08:11
@mtavenrath
mtavenrath self-requested a review October 2, 2026 07:34

@mtavenrath mtavenrath left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The failure is not related to this change, but added validation to RustNN

@mtavenrath
mtavenrath merged commit c782fa4 into rustnn:main Oct 2, 2026
15 of 16 checks passed
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

Successfully merging this pull request may close these issues.

2 participants