From a17029cea511327c6282de85924146fb772d38d8 Mon Sep 17 00:00:00 2001 From: John Bauer Date: Sun, 27 Oct 2024 01:55:01 -0700 Subject: [PATCH] SentimentProcessor ought to be able to keep the trainer now... will make it easier to access the whole model state elsewhere --- stanza/pipeline/sentiment_processor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/stanza/pipeline/sentiment_processor.py b/stanza/pipeline/sentiment_processor.py index 54f18dd5f..b0faf0b0d 100644 --- a/stanza/pipeline/sentiment_processor.py +++ b/stanza/pipeline/sentiment_processor.py @@ -55,6 +55,7 @@ def _set_up_model(self, config, pipeline, device): trainer = Trainer.load(filename=filename, args=args, foundation_cache=pipeline.foundation_cache) + self._trainer = trainer self._model = trainer.model self._model_type = self._model.config.model_type # batch size counted as words