Dataloader problem in pyinstaller executable file

Has anyone ever built a PyTorch inference file with pyinstaller?

When iterating using enumerate, there was no problem when executing the Python file directly,

but if I build it as an executable file and run it, dataloader part is not executed and the executable file is restarted.

Hard to debug:(

Does anyone know a solution or has similar experience?

Thank ahead:)

I have the same problem
Have u fixed this issue?

@Nazar_Pankov you can refer to this page

try ‘num_worker=1’