shunting314
shunting314
I'm adding tests but otherwise the PR is ready to review. cc @jansel , @Chillee . Also cc @eellison if you want take another look since I added more functionality...
@pytorchbot merge
BTW, a general question: Some of the test fails since CI does not have cloudpickle. This PR use cloudpickle since pickle can not work for lambda/local-function. Any pointer how I...
> Can you briefly explain why you're transferring lambdas over the subprocess. Naively, I would expect to design a data structure for communicating over process and stick to that. yea....
> I guarantee you it will be more work to convince releng to allow cloudpickle as a core dependency than it will be to rewrite a few dozen lines in...
I changed 2 local functions to objects will '__call__' method, now we can use regular pickle to serialize and deserialize objects for IPC.
@shunting314 has imported this pull request. If you are a Meta employee, you can view this diff [on Phabricator](https://www.internalfb.com/diff/D43996048).
@shunting314 has imported this pull request. If you are a Meta employee, you can view this diff [on Phabricator](https://www.internalfb.com/diff/D43996048).
@shunting314 has imported this pull request. If you are a Meta employee, you can view this diff [on Phabricator](https://www.internalfb.com/diff/D43996048).
@shunting314 has imported this pull request. If you are a Meta employee, you can view this diff [on Phabricator](https://www.internalfb.com/diff/D43996048).