saltudelft / type4py

Type4Py: Deep Similarity Learning-Based Type Inference for Python
Apache License 2.0
61 stars 13 forks source link

Integrate with pyre incremental and adapt the TypeWriter search strategy #7

Open stroxler opened 2 years ago

stroxler commented 2 years ago

It would be interesting to see how well the TypeWriter algorithm (https://software-lab.org/publications/TypeWriter_arXiv_1912.03768.pdf) for searching type annotation suggestions works against type4py. We might get dramatically better results for two reasons:

At one point we'd considered hacking this very quickly as an internal project in my company, but we ran out of time. I think it would be better done open-source anyway because then

I'm unsure if I can find time to prioritize this in the next 6 months at work but it's a little more likely if I treat it as a side project, which would also open the door to an informal weekend hackathon as a way to kick it off :)

I could do this in a separate repository or inside of type4py. What do you think @mir-am ? And does this sound interesting to you?

mir-am commented 2 years ago

@stroxler Thanks for your interest in Type4Py and sharing your ideas. Yes, it is indeed an interesting idea. We very welcome contributions. We actually had a similar idea to yours, i.e., using a type checker (mypy) to validate Type4Py's predictions. I prefer to implement this idea inside Type4Py's repo on another branch. I am also glad to help you to incorporate the idea into Type4Py. It may be worth mentioning that I used pyre qurey to infer type annotations for augmenting the dataset of Type4Py (see here). Regarding this, I have a couple of questions about using pyre, which I will ask later in this thread.