Skip to content

Commit

Permalink
tests: add multiprocessing.freeze_support() call to lightning test
Browse files Browse the repository at this point in the history
When running the `test_lightning_mnist_autoencoder` under arm64
macOS, `multiprocessing` seems to be activated at some point,
and the test gets stuck due to lack of
`multiprocessing.freeze_support` call.
  • Loading branch information
rokm committed Dec 23, 2023
1 parent 1df4461 commit 4ac0e97
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/_pyinstaller_hooks_contrib/tests/test_deep_learning.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ def test_lightning_mnist_autoencoder(pyi_builder):
pyi_builder.test_source("""
import os
# On macOS, multiprocessing seems to be used at some point...
if __name__ == '__main__':
import multiprocessing
multiprocessing.freeze_support()
import torch
import torchvision
import lightning
Expand Down

0 comments on commit 4ac0e97

Please sign in to comment.