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

informing about bad positional argument in node constructor #1984

Open
leshabirukov opened this issue Dec 26, 2024 · 1 comment
Open

informing about bad positional argument in node constructor #1984

leshabirukov opened this issue Dec 26, 2024 · 1 comment
Assignees
Labels
contribution welcome We welcome code contributions for this

Comments

@leshabirukov
Copy link

rewr.txt

When you mistakingly do

  def lr_pattern( op, x ):
      return op.LeakyRelu( x, 1.0)

instead of

  def lr_pattern_good( op, x ):
      return op.LeakyRelu( x, alpha=1.0)

You will get such error text:

AttributeError: 'float' object has no attribute '_add_usage'

Expected behavior: something like

TypeError: LeakyRelu() takes 2 positional arguments but 3 were given

Possible patch: missed_keyword.patch

@justinchuby justinchuby self-assigned this Dec 27, 2024
@justinchuby
Copy link
Collaborator

Thanks! Will fix

@justinchuby justinchuby added the contribution welcome We welcome code contributions for this label Dec 30, 2024
leshabirukov added a commit to leshabirukov/onnxscript that referenced this issue Dec 30, 2024
Patch for Big Brother issue!  
microsoft#1984
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome We welcome code contributions for this
Projects
None yet
Development

No branches or pull requests

2 participants