diff --git a/deepchopper/cli.py b/deepchopper/cli.py index 737d87a..faeb486 100644 --- a/deepchopper/cli.py +++ b/deepchopper/cli.py @@ -151,6 +151,10 @@ def predict( logger=False, limit_predict_batches=limit_predict_batches, ) + + import multiprocess.context as ctx + + ctx._force_start_method("spawn") trainer.predict(model=model, dataloaders=datamodule, return_predictions=False)