Giter VIP home page Giter VIP logo

Comments (4)

justinchuby avatar justinchuby commented on August 22, 2024

@gramalingam mypy doesn't seem to play nicely with these types

https://github.com/microsoft/onnx-script/blob/b85fb550c2cf7ab37d57e4e00c9a0085461ce985/onnxscript/onnx_types.py#L67-L82

is there a way we can reconcile this?

from onnxscript.

gramalingam avatar gramalingam commented on August 22, 2024

I think there is non-trivial work to be done for integrating the multiple requirements here. There are one or two things to be done first:
(a) Aaron has a first extension to enable intellisense in visual-code and other environments.
(b) We need to integrate the type annotation classes with the actual runtime class (tensor.Tensor).
As for integrating it with other runtime and static type-checkers, that could be more complex. I don't have an answer off the top of my head. It's worth looking into. If you have suggestions, please let me know, thanks.

from onnxscript.

gramalingam avatar gramalingam commented on August 22, 2024

With regards to the earlier question: for onnxscript code, I think we can do the checking ourselves (both statically and dynamically) and I think that will be better (than trying to use other systems), at least that is my first reaction. However, using the other checkers for our code, in general, may be useful. When we do that, we may run into some issues in the test-related code, where both code co-exist.

from onnxscript.

gramalingam avatar gramalingam commented on August 22, 2024

BTW, what is the specific issue with mypy? It is possible that Aaron's PR in-progress, which makes FLOAT etc. derived classes of TensorType, might fix it. (Though, generally, there are broader challenges in handling things like FLOAT["M", "N"] etc.)

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.