Coder Social home page Coder Social logo

How to handle deprecated operators? about sigs HOT 6 CLOSED

onnx avatar onnx commented on June 13, 2024
How to handle deprecated operators?

from sigs.

Comments (6)

winnietsang avatar winnietsang commented on June 13, 2024

Handle the op with the previous definition and print out a warning message state that this op is deprecated at this opset version and advise user to use the "new" op to replace this in the future.

from sigs.

chinhuang007 avatar chinhuang007 commented on June 13, 2024

The recommendation is also that the frontend converters do not add deprecated ops, with respect to the target opset version, into onnx graph. Use the new/replacement op, if existing, instead.

from sigs.

ebarsoum avatar ebarsoum commented on June 13, 2024

Regarding this "Use the new/replacement op, if existing, instead.", replacement must exist or the deprecation was a bug. We can't deprecate operator without an equivalent.

from sigs.

chinhuang007 avatar chinhuang007 commented on June 13, 2024

Good to know it is a mandate to have replacement when deprecating an op. Will document accordingly.

from sigs.

winnietsang avatar winnietsang commented on June 13, 2024

After I ran some test, I found out backend converter don't need to handle any deprecated op at all.

If an user want to convert a deprecated op to a framework, the user will get an error message from the onnx.checker.check_node(node).
onnx.onnx_cpp2py_export.checker.ValidationError: Op registered for Upsample is deprecated in domain_version of 11

Therefore, this node will never get pass to any backend converter.
On the other hand the frontend converter need to make sure it doesn't use any deprecated op in the converted onnx model

from sigs.

chinhuang007 avatar chinhuang007 commented on June 13, 2024

I would recommend all backend converters run checker before conversion, as it is in the onnx base class. If not the case, the converter should handle deprecated ops as described earlier in the thread.

from sigs.

Related Issues (14)

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.