Skip to content

bug of python tool #5

@lovedoubledan

Description

@lovedoubledan

rllm/tools/code_tools/lcb_tool.py
excute_code function
line 78 may raise syntaxerror when codes generated by LLM has syntaxerror
but it is catched by the normal execption in line 110 and return empty stderr and empty stdout
It can not feed back syntax error to LLM correctly and affect training
By our test, about 28% of Qwen3-8B generated code has syntax error
You may add

    except SyntaxError as e:
        stderr = f"SyntaxError: {e}"
        return stdout, stderr, result

as additional catcher to fix the bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions