Browse Source

Extract memo

pull/2964/head
tomKPZ 9 months ago committed by GitHub
parent
commit
5d6fc95bbd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      execution.py

3
execution.py

@ -379,7 +379,8 @@ class PromptExecutor:
while len(to_execute) > 0:
#always execute the output that depends on the least amount of unexecuted nodes first
output_node_id = min(to_execute, key=lambda a: len(recursive_will_execute(prompt, self.outputs, a, {})))
memo = {}
output_node_id = min(to_execute, key=lambda a: len(recursive_will_execute(prompt, self.outputs, a, memo)))
to_execute.remove(output_node_id)
# This call shouldn't raise anything if there's an error deep in

Loading…
Cancel
Save