mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-05 19:17:43 +00:00
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:
@@ -71,7 +71,7 @@ class ModelGeneralCaseSpecEvaluator(CoSTEEREvaluator):
|
||||
) # only check the model changed this time
|
||||
implementation.inject_files(**{fname: test_code})
|
||||
result = implementation.run(env=env, entry=f"python {fname}")
|
||||
stdout = result.stdout
|
||||
stdout = result.get_truncated_stdout()
|
||||
ret_code = result.exit_code
|
||||
|
||||
if stdout is None:
|
||||
@@ -118,6 +118,6 @@ class ModelGeneralCaseSpecEvaluator(CoSTEEREvaluator):
|
||||
user_prompt=user_prompt,
|
||||
init_kwargs_update_func=ModelSingleFeedback.val_and_update_init_dict,
|
||||
)
|
||||
fb.final_decision = fb.final_decision and result.exit_code == 0
|
||||
fb.final_decision = fb.final_decision and ret_code == 0
|
||||
|
||||
return fb
|
||||
|
||||
Reference in New Issue
Block a user