-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Description
@albertvillanova @aymeric-roucher
I ran into the issue that when using CodeAgent
on a task that requires the agent to produce Python code, it often attempts to test the code it generates not with the PythonInterpreter tool but by directly running it.
This seems fine but the CodeAgent
implementation raises an error that variable __name__
is undefined when the agent includes the if __name__ == "__main__":
clause in the code.
I am unsure why that is and whether there is any reason for that vs. it being a bug. I included a screenshot with the error message below.
Would love to hear your thoughts on this. Thanks!
Metadata
Metadata
Assignees
Labels
No labels