Replies: 2 comments
-
Thanks for submitting this issue! It has been added to our triage queue. A maintainer will review it shortly. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @Cua1103 To pass num_workers, you can create and pass a dataloader directly to the engine.predict()
Let me know how it goes. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Your Question
I am trying to use the following code for inference:
`if args.predict:
print(f"\n--- [阶段 B] 正在为 '{subfolder_name}' 加载模型并进行预测评估 ---")
But there is a warning:
/opt/anaconda3/envs/anomalib/lib/python3.10/site-packages/lightning/pytorch/trainer/connectors/data_connector.py:425: The 'predict_dataloader' does not have many workers which may be a bottleneck. Consider increasing the value of the
num_workers
argumentto
num_workers=255in the
DataLoader` to improve performance.Predicting DataLoader 0: 3%|█▍ | 323/11067 [00:09<05:14, 34.22it/s]
And I also find that the speed of DataLoader is slow (34.22it/s). I am certain that I do not have any hardware resource limitations. Can I get Any help?
Forum Check
Beta Was this translation helpful? Give feedback.
All reactions