Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Touseef docker #733

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Touseef docker #733

wants to merge 7 commits into from

Conversation

aymeric-roucher
Copy link
Collaborator

No description provided.

Comment on lines 176 to 194
stderr=False

if stderr:
raise ValueError(f"Code execution failed:\n{output}")
else:
if return_final_answer:
while "---OUTPUT_END---" not in output:
out, err = self.python_session.output # Get both streams
if out:
output += out.decode()
if err:
stderr += err.decode()

# Load output for final answer or specific results
with open('/tmp/smolagents/result.pkl', 'rb') as f: # Note path on host side
result = pickle.load(f)
else:
result = None
return result, execution_logs, return_final_answer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aymeric-roucher There is an undefined variable execution_logs being referenced outside of any function and a chunk of code is also outside the function why is that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code is still not working, I'll ping you when it is!

@aymeric-roucher
Copy link
Collaborator Author

@touseefahmed96 the main change that I'm doing it to make the code persistent (so can run two different executions of code a and b, with b using variables defined in a) + return any output from final answer (via pickling it). These requirements are quite challenging!

@touseefahmed96
Copy link
Contributor

@aymeric-roucher sure sounds good.

Initialize the Docker-based Jupyter Kernel Gateway executor.
"""
self.logger = logger
self.host = host
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't support Unix sockets?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants