fix bad merge

This commit is contained in:
Lincoln Stein 2023-08-16 08:53:07 -04:00
parent bb1b8ceaa8
commit a93bd01353
2 changed files with 3 additions and 2 deletions

View File

@ -171,7 +171,8 @@ class InvocationStatsService(InvocationStatsServiceBase):
if torch.cuda.is_available():
torch.cuda.reset_peak_memory_stats()
self.ram_used = psutil.Process().memory_info().rss
self.model_manager.collect_cache_stats(self.collector._cache_stats[self.graph_id])
if self.model_manager:
self.model_manager.collect_cache_stats(self.collector._cache_stats[self.graph_id])
def __exit__(self, *args):
"""Called on exit from the context."""

View File

@ -88,7 +88,7 @@ class DefaultInvocationProcessor(InvocationProcessorABC):
try:
graph_id = graph_execution_state.id
model_manager = self.__invoker.services.model_manager
with statistics.collect_stats(invocation, graph_id model_manager):
with statistics.collect_stats(invocation, graph_id, model_manager):
# use the internal invoke_internal(), which wraps the node's invoke() method in
# this accomodates nodes which require a value, but get it only from a
# connection