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

Fix torch dependency requirement and code formatting in setup.py #5296

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Programmer-RD-AI
Copy link
Contributor

This PR addresses issue #5228 reported by @mdvthu. The changes ensure that the torch dependency requirement in the setup.py file of Detectron2 is correctly specified, aligning with actual version compatibility. Additionally, the code formatting and readability in the setup.py file have been improved for better consistency.

Before submitting this PR, I have run dev/linter.sh to ensure that the code adheres to the project's linting standards.

Thank you for considering this contribution!

These changes ensure that the torch dependency requirement is correctly specified and improve the overall code quality of the setup.py file.
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 27, 2024
@sliedes
Copy link

sliedes commented Jun 13, 2024

torch seems to also be a build requirement. Adding it in setup.py as a dependency still doesn't seem to fix everything.

I got detectron2 to install with poetry add $url by just creating a pyproject.toml with these contents:

[build-system]
requires = ["setuptools", "torch"]

Though in addition to that it should be added in setup.py like this PR does.

mostlyuseful added a commit to mostlyuseful/detectron2 that referenced this pull request Jun 20, 2024
@mostlyuseful
Copy link

torch seems to also be a build requirement. Adding it in setup.py as a dependency still doesn't seem to fix everything.

I got detectron2 to install with poetry add $url by just creating a pyproject.toml with these contents:

[build-system]
requires = ["setuptools", "torch"]

Though in addition to that it should be added in setup.py like this PR does.

Tried it in a fork, that was the missing piece for my setup. Thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants