Giter VIP home page Giter VIP logo

Comments (5)

justinchuby avatar justinchuby commented on June 22, 2024

cc @gramalingam

from onnxscript.

gramalingam avatar gramalingam commented on June 22, 2024

Supporting it in onnxscript should be doable. (Though, to be complete, the converter should also check that what is deleted is not used subsequently, and produce an error message if it is used.)

However, from the aten-library perspective, I am not sure if adding the dels are that useful. It seems to me that their primary value is in enabling a garbage collector to collect large data-structures. I am not convinced about its use for documenting unused arguments. Further, it seems a bit artificial in this example, the arguments should really be used. The underlying issue may be something else.

from onnxscript.

justinchuby avatar justinchuby commented on June 22, 2024

SGTM. How does

_ = scale

look to you? Assuming the example and ignoring the actual underlying issue.

from onnxscript.

gramalingam avatar gramalingam commented on June 22, 2024

SGTM. How does

_ = scale

look to you? Assuming the example and ignoring the actual underlying issue.

This will be translated, as of now, into an ONNX node that constructs a constant representing the value of scale, which is something we would not want in the generated function.

I would like to understand the requirement here. Is the goal to document that this is an unused argument? That can be done using comments, if the target is a human-reader, and I think that is a preferable solution. If it is to use del because that is used by some tools, that's a different story, and we can support del directly instead of a statement like the above.

from onnxscript.

justinchuby avatar justinchuby commented on June 22, 2024

It's mostly for tools. Seen in https://google.github.io/styleguide/pyguide.html#214-decision "Unused argument warnings..."

Looks like assigning to _ is discouraged so nvm. I am happy to disable this rule and leave the arguments unused too. If we wanted to follow the recommendation from this guide, then del is the way to go

from onnxscript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.