AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Add an alternate requirements file for better compatibility

Open devindkim opened this issue 2 years ago • 5 comments
trafficstars

Background

Devs and aspiring contributors frequently have dependency conflicts when trying to clone the repo and build dependencies for the first time.

Adding an alternate requirements file:

  • Removes package versions, allowing pip to resolve dependency conflicts with less strict versioning
  • Explicitly adds packages to be installed, that was being missed by pip and resulting in 'module not found' errors

Changes

Add a new requirements-alternate.txt

Test Plan

Other contributors and myself have found success with this requirements file, as opposed to the main one.

Change Safety

  • [x] I have added tests to cover my changes
  • [x] I have considered potential risks and mitigations for my changes

devindkim avatar Apr 07 '23 06:04 devindkim

What are the reasons it worked? I don't think it's good to accept PRs even if their authors are unaware which exact problem they solve and how.

nponeccop avatar Apr 08 '23 19:04 nponeccop

Thanks for the feedback, I added additional reasoning and context.

devindkim avatar Apr 08 '23 20:04 devindkim

There are missing deps in the requirements.txt, which are fixed by other PRs such as #482 that adds Pillow.

So, I guess you should check that fixed file against your file to see the difference. And if more dependencies are missing, add them in a separate PRs.

Having dependencies pinned is a good practice. So, the right way to do it is pinned dependencies with virtual envs, where conflicts with other projects are not possible. Pinned versions simplify bug reporting and diagnostics, so having two otherwise identical requirements.txt one with the pinning and one without it is not a good idea. So, I guess we need to have them always pinned and instead offer venv as the right way to do it and to avoid conflicts, and suggest deleting versions from a text file as a last resort for advanced users (who would be skilled to remove the versions themselves).

What do you think?

nponeccop avatar Apr 08 '23 22:04 nponeccop

thanks for your efforts, it should probably be called requirements-dev.txt, we already have a lot of PRs with requirements-dev suggestions

waynehamadi avatar Apr 16 '23 23:04 waynehamadi

This is a mass message from the AutoGPT core team. Our apologies for the ongoing delay in processing PRs. This is because we are re-architecting the AutoGPT core!

For more details (and for infor on joining our Discord), please refer to: https://github.com/Significant-Gravitas/Auto-GPT/wiki/Architecting

p-i- avatar May 05 '23 00:05 p-i-

Hey @devindkim the problem is we can't let pip decide, because sometimes it decides things that end up not working so we can't guarantee it's going to work.

We need to all work with the same requirements to guarantee it works for everyone

waynehamadi avatar Jul 06 '23 17:07 waynehamadi