900c3874bb233c6995fb40a86a0d30a7ae177a41,tests/distributions/test_pickle.py,,test_pickle,#Any#,59
Before Change
// Note that pickling torch.Size() requires protocol >= 2
serialized = pickle.dumps(dist, pickle.HIGHEST_PROTOCOL)
deserialized = pickle.loads(serialized)
assert isinstance(deserialized, Dist)
After Change
except Exception:
pytest.skip(msg="cannot construct distribution")
buffer = io.BytesIO()
// Note that pickling torch.Size() requires protocol >= 2
torch.save(dist, buffer, pickle_protocol=pickle.HIGHEST_PROTOCOL)
buffer.seek(0)
deserialized = torch.load(buffer)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: uber/pyro
Commit Name: 900c3874bb233c6995fb40a86a0d30a7ae177a41
Time: 2020-05-15
Author: fritzo@uber.com
File Name: tests/distributions/test_pickle.py
Class Name:
Method Name: test_pickle
Project Name: sentinel-hub/eo-learn
Commit Name: d3baf96418c790cad57c007cf43224866844ae99
Time: 2019-11-29
Author: matic.lubej@sinergise.com
File Name: core/eolearn/core/eodata.py
Class Name: EOPatch
Method Name: load_aws
Project Name: pytorch/pytorch
Commit Name: 3bd779cec66af12105407d16afc514fa2eade5f5
Time: 2021-03-01
Author: suo@fb.com
File Name: torch/distributed/rpc/internal.py
Class Name: _InternalRPCPickler
Method Name: deserialize
Project Name: uber/pyro
Commit Name: 900c3874bb233c6995fb40a86a0d30a7ae177a41
Time: 2020-05-15
Author: fritzo@uber.com
File Name: tests/poutine/test_poutines.py
Class Name:
Method Name: test_pickling