Replace TemporaryFile() with io.BytesIO()#2376
Replace TemporaryFile() with io.BytesIO()#2376karlhigley merged 1 commit intoOpenMined:masterfrom Ankit-Dhankhar:serde_numpy
Conversation
midokura-silvia
left a comment
There was a problem hiding this comment.
Very nice improvement. Before merging, can you confirm me that there are unit tests for these functions? If not, can you please add some.
kamathhrishi
left a comment
There was a problem hiding this comment.
@midokura-silvia I don't think additional unit tests are required as tests for checking serialization already exists and they are passing with the proposed changes. What changes in this pr is how serialization is done.
|
Ok, I just confirmed that there is a unit test. Could we improve the unit test by using |
|
Sure I will add test cases. |
|
I have added test cases for random integer arrays of non-symmetric dimensions. |
|
I have added test-cases with requires_grad=True but tensor generated with torch.randn([dim]) fails this. Is this expected?
|
|
@robert-wagner any update from your side? |
|
@midokura-silvia - if it's been ~7 days or more after checking in with someone who reviewed - and you feel the PR should be approved - you may go ahead and merge. |
|
(in this case it's been 3 months - more than enough time) |
|
Can I pick this up? @iamtrask |
The requested changes have now been made.
|
@Ankit-Dhankhar I cloned your fork, squashed the commits in this PR, and rebased it on current PySyft master. You can see the resulting diff over here on the Sorry it's taken so long! Okay to force-push the result to your branch so we can finally get this PR merged? 😄 |
Using similar syntax as torch_tensor_serializer/desearializer. #2357