Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions rdagent/components/workflow/rd_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,6 @@ def feedback(self, prev_out: dict[str, Any]):
feedback = self.summarizer.generate_feedback(prev_out["running"], self.trace)
logger.log_object(feedback, tag="feedback")
self.trace.hist.append((prev_out["running"], feedback))

# TODO: `def record(self, prev_out: dict[str, Any]):` has already been hard coded into LoopBase
# So we should add it into RDLoop class to make sure every RDLoop Sub Class be aware of it.
3 changes: 2 additions & 1 deletion rdagent/utils/workflow/loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def __new__(mcs, clsname: str, bases: tuple[type, ...], attrs: dict[str, Any]) -
"""
steps = LoopMeta._get_steps(bases) # all the base classes of parents
for name, attr in attrs.items():
if not name.startswith("_") and callable(attr):
if not name.startswith("_") and callable(attr) and not isinstance(attr, type):
# NOTE: `not isinstance(attr, type)` is trying to exclude class type attribute
if name not in steps and name not in ["load", "dump"]: # incase user override the load/dump method
# NOTE: if we override the step in the subclass
# Then it is not the new step. So we skip it.
Expand Down