Preventing CUDA Out of Memory #10664
-
Hi all, Like a lot of the discussions/issues here, I've been dealing with CUDA OOM errors when fine tuning my NER model. For example:
Some details:
In the config file, if I set a max_epochs in [training], then I'm not able to get to a single eval step before running out of memory. If I stream the data in by setting max_epochs to -1 then I can get through ~4 steps (with an eval_frequency of 200) before running OOM. I've tried adjusting a wide variety of settings in the config file, including:
I thought about setting
and run train with Finally, I created my train set .spacy files with the following, which takes a Pandas DF's 'spacy' col:
Here's my full config file:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
You are correct you need to edit your config to add the component, and that pipeline description looks fine. Your custom code file is not correct, you shouldn't be creating a pipeline there - remove the lines with "nlp" on them. You just need to declare the component, which in this case is basically just a function that takes in a Doc, modifies it, and returns the modified Doc. After you fix that you should be able to add the component to your pipeline. If you get an error doing so please share it. |
Beta Was this translation helpful? Give feedback.
You are correct you need to edit your config to add the component, and that pipeline description looks fine.
Your custom code file is not correct, you shouldn't be creating a pipeline there - remove the lines with "nlp" on them. You just need to declare the component, which in this case is basically just a function that takes in a Doc, modifies it, and returns the modified Doc.
After you fix that you should be able to add the component to yo…