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

Swap parameters of scalar constant() operand method #650

Open
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

inexorabletash
Copy link
Contributor

@inexorabletash inexorabletash commented Apr 18, 2024

Make MLGraphBuilder's constant() operand-vending methods consistent and take the data type as the first parameter. This implicitly makes the type required instead of optional.

Use of constant() in decompositions are updated as well, and now use "input" consistently instead of "x" sometimes.

Fixes #475


Preview | Diff

Make MLGraphBuilder's constant() operand-vending methods consistent
and take the data type as the first parameter. This implicitly makes
the type required instead of optional.

Use of constant() in decompositions are updated as well, and now use
"input" consistently instead of "x" sometimes.

Fixes webmachinelearning#475
@inexorabletash
Copy link
Contributor Author

FYI, I ran clang-format --assume-filename=.js --style=Chromium over the decompositions that were significantly touched. I'll write a script to apply that to all of the sample JS blocks in the script and put that up as a separate CL.

@inexorabletash
Copy link
Contributor Author

I'm going to drop this to "draft" to take it off people's radar. This would be a breaking change for lots of content, so we'll want to approach it carefully.

@inexorabletash inexorabletash marked this pull request as draft May 1, 2024 23:07
@inexorabletash inexorabletash marked this pull request as ready for review May 28, 2024 18:26
@inexorabletash
Copy link
Contributor Author

I didn't realize until last week that Chromium didn't implement the scalar version of constant(), so this should be safe to change - no content should be relying on it, right?

index.bs Outdated Show resolved Hide resolved
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.

Remove builder.constant(value, type) variant
2 participants