From 0793c8b35eafe5c70420a4d0270ef5a697e15dbe Mon Sep 17 00:00:00 2001 From: Trenton Holmes <797416+stumpylog@users.noreply.github.com> Date: Sun, 19 Jan 2025 11:08:33 -0800 Subject: [PATCH] Clean up the logging --- src/documents/classifier.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/documents/classifier.py b/src/documents/classifier.py index 2971e4ed8..b3e71711c 100644 --- a/src/documents/classifier.py +++ b/src/documents/classifier.py @@ -219,22 +219,11 @@ class DocumentClassifier: labels_tags_unique = {tag for tags in labels_tags for tag in tags} num_tags = len(labels_tags_unique) - latest_doc_change = docs_queryset.latest("modified").modified - - logger.debug( - f"""Found: - Last training: {self.last_doc_change_time} - Latest doc change: {latest_doc_change} - Last auto type hash: {self.last_auto_type_hash.hex() if self.last_auto_type_hash else None} - Current hash: {hasher.digest().hex()} - Result: Retraining required - """, - ) # Check if retraining is actually required. # A document has been updated since the classifier was trained # New auto tags, types, correspondent, storage paths exist - + latest_doc_change = docs_queryset.latest("modified").modified if ( self.last_doc_change_time is not None and self.last_doc_change_time >= latest_doc_change