Skip to content

Commit 9dc5839

Browse files
generatedunixname2129521104496973meta-codesync[bot]
authored andcommitted
Fix fbcode//pearl:test_pearl - test_serialization (pearl.test.unit.with_pytorch.test_serialization.TestSerialization) (T278585348)
Differential Revision: D111401279 fbshipit-source-id: 4b6a9b665e2d3901ba763c0470cac623074d3099
1 parent b0c7fad commit 9dc5839

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

test/unit/with_pytorch/test_serialization.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ def save_and_load_state_dict(origin: nn.Module, destination: nn.Module) -> None:
2323

2424
class TestSerialization(TestCase):
2525
def test_serialization(self) -> None:
26+
# Concurrent stress-run copies each default to one compute thread per
27+
# core, oversubscribing the host and timing out; the models are tiny.
28+
torch.set_num_threads(1)
29+
2630
test_agent = TestAgentWithPyTorch()
2731
for (
2832
agent_type,

0 commit comments

Comments
 (0)