I’m used to developing and debugging with PyCharm. I’ve recently started using the HuggingFace ecosystem (transformers
, accelerate
, trl
), specifically following an example of the vanilla Trainer()
class in transformers
(which uses accelerate
under the hood, I believe). I find that:
- If I set a breakpoint, PyCharm displays
Collecting data...
and never updates - I already enabled
Gevent compatible
; this made no difference - If I resume executing from that breakpoint, PyCharm “continues executing” but no progress is made. The process just hangs. No subsequent breakpoint will be triggered and I cannot pause the process
- The most relevant GitHub issue I could find was not able to help me
- I tried setting the environment variable
ACCELERATE_DEBUG_MODE=1
as suggested here but this has no apparent effect.
Does anyone know how to successfully debug HuggingFace-ecosystem code using PyCharm?