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

Add runtime size configuration feature #5805

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

Conversation

neubig
Copy link
Contributor

@neubig neubig commented Dec 26, 2024

This PR adds a new feature to configure the runtime size in the settings modal. Users can now choose between 1x (2 core, 8G) and 2x (4 core, 16G) options.

Changes include:

  • Added a new REMOTE_RUNTIME_RESOURCE_FACTOR field to the Settings type
  • Created a new RuntimeSizeSelector component
  • Updated the SettingsForm component to include the new selector
  • Modified getSettings and saveSettings functions to handle the new setting
  • Updated tests to include the new setting
  • Added documentation about the new runtime size option in the README.md file

Please review and let me know if any changes are needed.


Notes:

  1. Fixes [Feature Request]: Set RemoteRuntime size in frontend #5797
  2. This is pending review by @neubig

To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:ed487f2-nikolaik   --name openhands-app-ed487f2   docker.all-hands.dev/all-hands-ai/openhands:ed487f2

@neubig neubig marked this pull request as draft December 26, 2024 00:43
@neubig neubig self-assigned this Dec 26, 2024
@neubig neubig removed the lint-fix label Dec 29, 2024
Copy link
Contributor Author

@neubig neubig left a comment

Choose a reason for hiding this comment

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

This looks good to me now, @amanape it'd be great if you could do a second review.

@neubig neubig requested a review from amanape December 29, 2024 05:20
@neubig neubig assigned amanape and unassigned neubig Dec 29, 2024
Copy link
Member

@amanape amanape left a comment

Choose a reason for hiding this comment

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

Is the backend already set to recognize these new setting keys?

@neubig
Copy link
Contributor Author

neubig commented Dec 31, 2024

@amanape : yes it is

remote_runtime_resource_factor: int = 1

UPDATE: but now that I think about it, I didn't carefully check the backend code that receives the changes from the frontend, I will check that.

@neubig neubig assigned neubig and unassigned amanape Dec 31, 2024
@neubig
Copy link
Contributor Author

neubig commented Jan 1, 2025

Should be OK now but I want to run locally to see that it works.

@amanape
Copy link
Member

amanape commented Jan 2, 2025

Is this ready for review?

@neubig
Copy link
Contributor Author

neubig commented Jan 2, 2025

Hey @amanape I think this should work but need to test it locally. If you don't mind reviewing before I test then please go ahead, otherwise it can wait.

@neubig
Copy link
Contributor Author

neubig commented Jan 3, 2025

@openhands-agent please make two changes:

  1. Within the interface, I am not seeing the actual textual content, but rather "SETTINGS_FORM$RUNTIME_SIZE_LABEL". Please make sure that i18n is working properly.
  2. Please set the "2x" option to be disabled by default, but have a tooltip "Runtime sizes over 1 are disabled by default, please contact [email protected] to get access to larger runtimes."

@openhands-agent
Copy link
Contributor

OpenHands started fixing the pr! You can monitor the progress here.

@openhands-agent
Copy link
Contributor

Status Summary:
✅ All issues have been successfully resolved

Changes Implemented:

  1. i18n Issue
  • Added missing translation key for "Runtime Settings"
  • Properly integrated into translation.json file
  1. 2x Option Requirements
  • Implemented NextUI Tooltip
  • Disabled 2x option by default
  • Added contact information tooltip
  • Maintained untranslated size specifications

No remaining issues identified - all requirements appear to have been met according to specifications.

@neubig neubig marked this pull request as ready for review January 3, 2025 14:40
@neubig
Copy link
Contributor Author

neubig commented Jan 3, 2025

OK, I think this is ready now @amanape ! This is what it looks like for now, and we'll enable the menu in a future PR once we have a way to pipe in info about which users should have access to this feature.

Screenshot 2025-01-03 at 11 40 08 PM

@neubig neubig requested a review from amanape January 3, 2025 14:42
@neubig
Copy link
Contributor Author

neubig commented Jan 3, 2025

Actually, sorry, let me take another look at this. Please cancel that.

@neubig neubig marked this pull request as draft January 3, 2025 14:44
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.

[Feature Request]: Set RemoteRuntime size in frontend
3 participants