Open Lockerns opened 2 months ago
serial
crypten.common
I encountered an issue with the crypten.common module where the serial module is not being exposed correctly, even though it is included in the __all__ list in __init__.py.
__all__
__init__.py
File Structure:
crypten/common/serial.py
crypten/common/__init__.py
__all__ = ["functions", "rng", "tensor_types", "util", "serial"]
Code to Reproduce:
import crypten.common print(dir(crypten.common))
Observed Output:
['__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'rng', 'tensor_types', 'util']
Expected Output:
['__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'rng', 'tensor_types', 'util', 'serial']
It appears that serial is not being imported or exposed correctly within the crypten.common namespace.
Hmm, interesting. I seem to be able to reproduce this on my end, but not sure why. Seems to work fine internally:
https://github.com/facebookresearch/CrypTen/blob/main/crypten/communicator/distributed_communicator.py#L17
What is the use case for importing crypten.common.serial?
Issue with Module Import:
serial
Not Appearing incrypten.common
Description
I encountered an issue with the
crypten.common
module where theserial
module is not being exposed correctly, even though it is included in the__all__
list in__init__.py
.Details
File Structure:
crypten/common/serial.py
exists.crypten/common/__init__.py
contains:Code to Reproduce:
Observed Output:
Expected Output:
It appears that
serial
is not being imported or exposed correctly within thecrypten.common
namespace.Additional Information