Revert "Raise warning for unpickable local function (#80140)"
This reverts commit 4b75b7d3c1504323d62c9f702de04b17aec0175c.
Reverted https://github.com/pytorch/pytorch/pull/80140 on behalf of https://github.com/ejguan due to It will break the CI for TorchData