On 3/28/2022 10:44 PM, Jason Ansel via Python-Dev wrote:
The PyTorch team plans to use PEP 523 as a part of PyTorch 2.0, so this
proposal may break the next major release of PyTorch.
The related project is TorchDynamo, which can be found here:
https://github.com/facebookresearch/torchdynamo
We will likely move this into the core of PyTorch closer to release.
If the changed happens, would PyTorch still be able to use the eval frame API?
Or would it prevent from being used entirely?
You'd be able to use it, but if we don't nail down the compatibility
guarantees then you might find PyTorch doesn't work properly against
3.11.(n+1) while 3.11.n was fine.
Right now, the API is allowed/expected to change between 3.x releases
(which normally we don't allow without a deprecation period) but it
still has to remain compatible within a single 3.x release. Making it
fully internal *without adding a stability guarantee* means it could
change more frequently, which you wouldn't be able to handle as an
installable package.
It's *unlikely* that it'll change that often, because there are still
other public interfaces that cannot. But, the plan behind this is to
make more stuff internal so that it can be modified more freely, so we
may see that rate of change increase.
In this world, your best bet is for TorchDynamo to become a full CPython
fork. And when that's your best bet, it should set off alarms everywhere
;) But that is what relying on internal APIs implies, and is certainly
what people would have to do if we were to remove the existing PEP's
interface. (It's what Pyjion was doing before the PEP was written, and
it's why Pyjion doesn't have to be a full fork these days.)
So you probably want to state explicit support for either keeping the
APIs public and slightly-flexible, or making them internal but stable.
(Public and stable won't work at all for us, and normal internal won't
work at all for you.)
Cheers,
Steve
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/MU56YBMPWSVMK3HAUJOBRW4KEN2ZLVCG/
Code of Conduct: http://python.org/psf/codeofconduct/