anomalib
anomalib copied to clipboard
Error for multiple gpu training
In the config file trainer part, if I set auto_select_gpus: true
and devices: 2
, I got an error like
AttributeError: Can't pickle local object 'FeatureExtractor.get_features.<locals>.hook'
, it comes from this line trainer.fit(model=model, datamodule=datamodule)
in anomalib/tools/train.py
script but for single GPU it works without an error. Any comments about this error / is it possible to use multiple GPUs for training and testing?
Hi @udasinnayan that's a known issue. This might probably be solved when me move towards torchfx but the only option is to use single GPU for now.
@ashwinvaidya17, I'm wondering if this is the case even when we use timm
's feature extractor
I tested this on the current main
branch and it still does not work with timm
's feature extractor. I am closing as it will require a significant change.