feat: add stdout into workspace for easier debugging (#1236)

* refactor: use get_truncated_stdout for consistent stdout handling across modules

* lint

* feat: add dump_stdout_type to DSRunnerCoSTEERSettings and use in eval

* fix: avoid circular import by moving DSRunnerEvaluator import inside method
This commit is contained in:
you-n-g
2025-09-10 10:02:49 +08:00
committed by GitHub
parent d4c539912a
commit 0daeb82d63
11 changed files with 43 additions and 30 deletions
+9
View File
@@ -41,7 +41,9 @@ from rdagent.core.conf import ExtendedBaseSettings
from rdagent.core.experiment import RD_AGENT_SETTINGS
from rdagent.log import rdagent_logger as logger
from rdagent.oai.llm_utils import md5_hash
from rdagent.utils import filter_redundant_text
from rdagent.utils.agent.tpl import T
from rdagent.utils.fmt import shrink_text
from rdagent.utils.workflow import wait_retry
@@ -145,6 +147,13 @@ class EnvResult:
exit_code: int
running_time: float
def get_truncated_stdout(self) -> str:
return shrink_text(
filter_redundant_text(self.stdout),
context_lines=RD_AGENT_SETTINGS.stdout_context_len,
line_len=RD_AGENT_SETTINGS.stdout_line_len,
)
class Env(Generic[ASpecificEnvConf]):
"""