microsoft/onnxscript

informing about bad positional argument in node constructor

Open

#1.984 geöffnet am 26. Dez. 2024

Auf GitHub ansehen
 (2 Kommentare) (1 Reaktion) (1 zugewiesene Person)Python (117 Forks)auto 404
contribution welcomegood first issue

Repository-Metriken

Stars
 (445 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

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

Contributor Guide