[Resolver] The LLM uses a non-optimal way to install openhands
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.
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.
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.
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.
Quite sure this is still the case.
Would #6191 help resolve this issue?
Great point, it should!