Tachi67 commited on
Commit
238c448
·
1 Parent(s): 659be3c

Update ExtendLibraryFlow.py

Browse files
Files changed (1) hide show
  1. ExtendLibraryFlow.py +10 -5
ExtendLibraryFlow.py CHANGED
@@ -1,16 +1,21 @@
 
 
 
 
 
1
  class ExtendLibraryFlow(AbstractBossFlow):
2
  def run(self, input_data: Dict[str, Any]) -> Dict[str, Any]:
3
  # ~~~ sets the input_data in the flow_state dict ~~~
4
  self._state_update_dict(update_data=input_data)
5
-
6
  max_rounds = self.flow_config.get("max_rounds", 1)
7
  if max_rounds is None:
8
  log.info(f"Running {self.flow_config['name']} without `max_rounds` until the early exit condition is met.")
9
-
10
  self._sequential_run(max_rounds=max_rounds)
11
-
12
  output = self._get_output_from_state()
13
-
14
  self.reset(full_reset=True, recursive=True, src_flow=self)
15
-
16
  return output
 
1
+ from typing import Dict, Any
2
+ from flows.utils import logging
3
+ log = logging.get_logger(__name__)
4
+
5
+ from flow_modules.Tachi67.AbstractBossFlowModule import AbstractBossFlow
6
  class ExtendLibraryFlow(AbstractBossFlow):
7
  def run(self, input_data: Dict[str, Any]) -> Dict[str, Any]:
8
  # ~~~ sets the input_data in the flow_state dict ~~~
9
  self._state_update_dict(update_data=input_data)
10
+
11
  max_rounds = self.flow_config.get("max_rounds", 1)
12
  if max_rounds is None:
13
  log.info(f"Running {self.flow_config['name']} without `max_rounds` until the early exit condition is met.")
14
+
15
  self._sequential_run(max_rounds=max_rounds)
16
+
17
  output = self._get_output_from_state()
18
+
19
  self.reset(full_reset=True, recursive=True, src_flow=self)
20
+
21
  return output