Comments (5)
cc @gramalingam
from onnxscript.
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.
SGTM. How does
_ = scale
look to you? Assuming the example and ignoring the actual underlying issue.
from onnxscript.
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.
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)
- [discussion] Disable certain optimizer passes HOT 2
- Upsample exports to a very big subgraph in dynamo HOT 15
- [discussion] How to compose two onnx model in onnxscript? HOT 2
- [IR] Enhanced name authority
- [IR] Name authority design
- This is a common operation, but ONNX doesn't give us a convenient way of expressing this HOT 1
- crash in rewriter/broadcast_to_matmul.py (proposed fix) HOT 3
- tiiuae/falcon-rw-1b: Dynamo export error during optimization step HOT 3
- There should be a method to set size threshold for constant folding HOT 1
- [IR] Create a DEBUG flag to enable addtional checks
- Create method to turn external tensor to ir.Tensor
- Remove `get_numpy_from_ir_value`
- [IR] Pass manager follow up
- [IR] Figure out how we can share tensors
- Create a node iterator
- how to set opset in generated model by to_model_proto? HOT 4
- proper way to construct a tensor on the fly? HOT 4
- SequenceEmpty parameter dtype seems not work HOT 2
- Handle attribute constraints in multi-output pattern-matcher
- Keyword arg not respected and was treated as positional arg HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onnxscript.