Issue in Patch-Core
See original GitHub issueBackground
I have tried to run anomalib
on the kaggle environment (also preparing a tutorial to contribute here for newcomers to get started with anomalib
π). However, with the patch-core
model, Iβm facing an issue.
Describe the Behaviour
When I run the script with patch-core, it kinda stuck in the following stage. And Iβve noticed that the coreset is processing on CPU (usages were high). So, it might be stuck or take lots of time to process on the CPU, which should not be.
Epoch 0: 8%|ββ | 7/90 [01:20<15:58, 11.54s/it, loss=nan]
Validation: 0it [00:00, ?it/s]A
Creating CoreSet Sampler via k-Center Greedy
Getting the coreset from the main embedding.
Reproducible Code
- Kaggle Notebook. (make sure to enable GPU quote)
Other info.
Not sure if itβs the current know issue with patchcore. Iβve run the code successfully with the padim
model (didnβt test the rest of the models).
Iβm considering myself a beginner in pytorch/pytorch-lighting
, maybe Iβm missing something obvious. Also, there are lots of pytorch-lighting
related UserWarning
messages. IMHO, itβs annoying, can it be removed, like verbose = 0
?
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
Meanwhile the code from
fix/sa/configs
is merged. I have a slightly different setup and still does not work.First I trained PatchCore on a single-GPU machine. There i always ran into Cuda-OutOfMemory as my dataset was to big for the patch-core training step. So i switched to a 8-GPU instance. I changed:
if i use the settings from
fix/sa/configs
it only uses one gpu and goes into OOO in training step.Training Step π
Now the
training_step
works very well with all the data. I also found that the GPU-Mem is not used anymore at all (maybe because ofdp
setting.Validation Step
The validation Step however does not use any of the GPUs and it takes forever.
I get the log
Applying core-set subsampling to get the embedding.
and then it computes forever on CPU.Is there any idea how to get this working @samet-akcay ? Thank you very much in advance!
@samet-akcay running from
fix/sa/configs
branch fix the issue. Thanks. π