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

Use latest alpine image for code execution #1192

Merged

Conversation

rickythefox
Copy link
Contributor

Background

Currently code execution uses a fat python 3.10 image.

Changes

This PR replaces it with the smaller and newer 3.11 alpine image. This also ensures that an update to newer python versions will happen automatically as the alpine tag uses the latest stable python version.

Documentation

N/A

Test Plan

Integration test included.

PR Quality Checklist

  • My pull request is atomic and focuses on a single change.
  • I have thoroughly tested my changes with multiple different prompts.
  • I have considered potential risks and mitigations for my changes.
  • I have documented my changes clearly and comprehensively.
  • I have not snuck in any "extra" small tweaks changes

@rickythefox rickythefox force-pushed the change_image_for_code_execution branch from 6c31426 to 0610968 Compare April 13, 2023 21:10
Copy link
Contributor

@nponeccop nponeccop left a comment

Choose a reason for hiding this comment

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

Tests and image name changes are unrelated. Submit them apart in separate PRs.

Also besides alipne there are debian slim images and other options. At least keep Python version pinned.

@rickythefox rickythefox force-pushed the change_image_for_code_execution branch 2 times, most recently from a68ce58 to 573af28 Compare April 14, 2023 07:23
@rickythefox
Copy link
Contributor Author

rickythefox commented Apr 14, 2023

@nponeccop I've split the PRs, will submit the test separately.

Alpine is the smallest image, hence I chose alpine.

When it comes to the version - the code generated by GPT can reasonably be assumed to use the latest python features, that's why I think we should use the latest version. I've pinned the major (3) although Python 4 ever coming out is (according to Guido) rather doubtful.

@nponeccop
Copy link
Contributor

code generated by GPT can reasonably be assumed to use the latest python features

Latest as of the training data, that is Sep 2021. I've just asked GPT+ if you are curious.

Q: What is the latest version of Python you are aware of?

3.5: As of my knowledge cutoff date of September 2021, the latest version of Python is 3.10.0, which was released on October 4, 2021.

4: As of my knowledge cutoff date in September 2021, the latest version of Python was Python 3.9.

Further investigation is needed, maybe 4 is just smarter to detect the contradiction but it's actually aware of 3.10

So this particular argument for the latest version doesn't hold.

nponeccop
nponeccop previously approved these changes Apr 14, 2023
@rickythefox
Copy link
Contributor Author

So this particular argument for the latest version doesn't hold.

3.x should be backwards-compatible anyway.

@nponeccop
Copy link
Contributor

Yes, there are other arguments in favor of the latest python, just not the GPT generated code one.

@rickythefox
Copy link
Contributor Author

Yes, there are other arguments in favor of the latest python, just not the GPT generated code one.

You're right.

@rickythefox
Copy link
Contributor Author

@nponeccop same change applied to the refactored code, please review again. Sorry to bother you, but the codebase is changing from right under me.

@nponeccop nponeccop mentioned this pull request Apr 14, 2023
1 task
@nponeccop
Copy link
Contributor

@rickythefox There are conflicts now

@rickythefox
Copy link
Contributor Author

@nponeccop fixed

@nponeccop
Copy link
Contributor

@rickythefox There are conflicts now

@rickythefox rickythefox force-pushed the change_image_for_code_execution branch from cdb397c to 434c4a1 Compare April 15, 2023 18:20
@rickythefox
Copy link
Contributor Author

@nponeccop fixed (jesus christ this is changing fast)

@nponeccop nponeccop mentioned this pull request Apr 16, 2023
1 task
@nponeccop nponeccop added the B6 label Apr 16, 2023
@nponeccop
Copy link
Contributor

@rickythefox There are conflicts now

@rickythefox
Copy link
Contributor Author

@nponeccop fork synked

@rickythefox
Copy link
Contributor Author

@nponeccop merged again

@nponeccop nponeccop removed the B6 label Apr 17, 2023
Copy link
Contributor

@p-i- p-i- left a comment

Choose a reason for hiding this comment

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

👍

@p-i- p-i- merged commit baf31e6 into Significant-Gravitas:master Apr 17, 2023
laixiao pushed a commit to laixiao/Auto-GPT-code that referenced this pull request Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants