OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

[Resolver] The LLM uses a non-optimal way to install openhands

Open enyst opened this issue 1 year ago • 4 comments

What problem or use case are you trying to solve?

Check the openhands resolver functionality. When the openhands resolver is running:

I see these days the LLM:

  • trying to run pytest
  • finds out it's not installed, so it runs poetry install
  • it has in the prompt the info that it should set up the project with make build, but that doesn't seem to happen

The problem is that poetry install installs all optional dependencies like torch, nvidia-cuda* etc.

By default, make build does poetry install --without llama-index, which avoids that.

`https://github.com/All-Hands-AI/OpenHands/blob/3e49f0f82713e0ea551a5dbae0e8ebfec154ff67/Makefile#L136C2-L136C39

Now that I look at it, I wonder why we don't do here poetry install --without evaluation,llama-index, since the evaluation group is also dependency-heavy and most users do not use it...

Do you have thoughts on the technical implementation?

I'm not sure, multiple options I guess?

  • maybe we can prompt somehow (in openhands_instructions) to make it more clear what to do to install pytest, or the backend
  • maybe instruct specifically about this issue: e.g. "Do not use poetry install, unless the user tells you to. Use --without... "
  • maybe... force a make build?

Describe alternatives you've considered

Prompting every time... 😹

Additional context Installing those heavy dependencies takes time, space, and context window.

enyst avatar Dec 02 '24 04:12 enyst

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

github-actions[bot] avatar Dec 04 '24 02:12 github-actions[bot]

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

github-actions[bot] avatar Dec 04 '24 03:12 github-actions[bot]

An attempt was made to automatically fix this issue, but it was unsuccessful. A branch named 'openhands-fix-issue-5359' has been created with the attempted changes. You can view the branch here. Manual intervention may be required.

github-actions[bot] avatar Dec 04 '24 03:12 github-actions[bot]

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jan 04 '25 01:01 github-actions[bot]

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Feb 07 '25 01:02 github-actions[bot]

Quite sure this is still the case.

enyst avatar Feb 07 '25 02:02 enyst

Would #6191 help resolve this issue?

malhotra5 avatar Feb 20 '25 17:02 malhotra5

Great point, it should!

enyst avatar Feb 20 '25 20:02 enyst