diff --git a/projects/blenderbot2/agents/modules.py b/projects/blenderbot2/agents/modules.py index 448ce5d9b14..7b813313d9c 100644 --- a/projects/blenderbot2/agents/modules.py +++ b/projects/blenderbot2/agents/modules.py @@ -107,6 +107,9 @@ def __init__(self, opt: Opt, dictionary: DictionaryAgent, retriever_shared=None) self.should_generate_query = ( self.knowledge_access_method is KnowledgeAccessMethod.CLASSIFY or self.search + ) and ( + self.knowledge_access_method + not in [KnowledgeAccessMethod.MEMORY_ONLY, KnowledgeAccessMethod.NONE] ) def has_query_generator(self) -> bool: @@ -381,6 +384,7 @@ def retrieve_and_concat( memory_decoder_vec, generated_memories, ) + logging.debug(f'Memory Access Complete: {time.time() - start:.2f}') if memories is not None and memory_scores is not None: self._fill_docs_and_scores( top_docs, doc_scores, memory_indices, memories, memory_scores