Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

[BB2] Memory Only Fix #3950

Merged
merged 2 commits into from
Aug 18, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions projects/blenderbot2/agents/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down