PySyft icon indicating copy to clipboard operation
PySyft copied to clipboard

3 Tests fail when local worker is verbose

Open robert-wagner opened this issue 7 years ago • 7 comments

Describe the bug When hook.local_worker is set to verbose the following errors occur

FAILED test/torch/test_hook.py::test_RNN_grad_set_backpropagation - RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 57 and 128 in dimension 1 at ../aten/src/TH/generic/THTensor.cpp:711
FAILED test/torch/tensors/test_additive_shared.py::test_max - RuntimeError: Error, Please consider calling ".get" method instead of ".item" method, so you can be safely getting the item you need.
FAILED test/torch/tensors/test_additive_shared.py::test_argmax - RuntimeError: Error, Please consider calling ".get" method instead of ".item" method, so you can be safely getting the item you need.

To Reproduce In test/conftest.py put the line hook.local_worker.verbose=True in the hook function

Expected behavior Tests should pass regardless of if they are printing output

robert-wagner avatar Jun 12 '19 19:06 robert-wagner

@robert-wagner I've had a discussion about this with @IonesioJunior some time ago, we think this is due to the fact that garbage collector "gets stuck" since every time you're printing something you're creating a new reference to it, that tries to be deleted but then is printed again, ... and so on

hereismari avatar Jun 12 '19 20:06 hereismari

Having said that, if our intuition is right I'm not sure how easy is to get this fixed

hereismari avatar Jun 12 '19 20:06 hereismari

Hello, please is anyone working on this. I will like to give it a try. Thanks

refactormyself avatar Jul 18 '19 08:07 refactormyself

I don't think so, you're very much welcome!

LaRiffle avatar Jul 18 '19 09:07 LaRiffle

@LaRiffle Is anyone working on this?

imskr avatar Mar 02 '20 16:03 imskr

Can I start working on this?

Kritikalcoder avatar Mar 29 '20 18:03 Kritikalcoder

This issue has been marked stale because it has been open 30 days with no activity. Leave a comment or remove the stale label to unmark it. Otherwise, this will be closed in 7 days.

github-actions[bot] avatar May 25 '20 00:05 github-actions[bot]