Hi, I’m trying to run textcat.teach
off an existing model but prodigy seems to be hanging.
(py3) $ prodigy textcat.teach potentially_interesting interesting-model --label INTERESTING
What’s a good way to debug this?
Hi, I’m trying to run textcat.teach
off an existing model but prodigy seems to be hanging.
(py3) $ prodigy textcat.teach potentially_interesting interesting-model --label INTERESTING
What’s a good way to debug this?
Hmm!
I haven’t tried this with Prodigy before, but in general I do sudo perf top
to find the function that the processor is spending its time in. (This requires the linux-tools
package to be installed.)
Another thing you can do is make edits to the textcat.teach
recipe, within prodigy/recipes/textcat.py
— the source for this is included. You could make your own recipes file, or just edit the file in your site-packages
.
Within the recipe, you would want to have a generator function that adds printing around the stream and update() functions, like this:
def debug_stream(stream):
for item in stream:
print(item)
yield item
def debug_update(batch):
print(batch)
return model.update(batch)
I see now that we really need a lot more logging options. We’ll add that to the roadmap.