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

Release to Pypi? #6

Closed
SkafteNicki opened this issue Oct 14, 2024 · 11 comments
Closed

Release to Pypi? #6

SkafteNicki opened this issue Oct 14, 2024 · 11 comments

Comments

@SkafteNicki
Copy link

Hi @ivan-chai
Thanks for the great work. I would like to hear if it would be possible for you to release the code as a package to Pypi such that it can be installed using pip install torch-linear-assignment?
We want to use this code as a dependency in Torchmetrics (PR: Lightning-AI/torchmetrics#2777) for a new implementation and it messes with our CI that the package currently needs to be installed from src.
Thanks!

@ivan-chai
Copy link
Owner

ivan-chai commented Oct 14, 2024

Hi!
I think about Pypi myself. However, It's quite difficult to build and support CUDA extensions for all PyTorch and CUDA versions as well as all GPU architectures. Do you have any reference code with the established release pipeline? Are there useful examples of GitHub pipelines?

@Borda
Copy link
Contributor

Borda commented Oct 14, 2024

Hi! I think about Pypi myself. However, It's quite difficult to build and support CUDA extensions for all PyTorch and CUDA versions as well as all GPU architectures. Do you have any reference code with the established release pipeline? Are there useful examples of GitHub pipelines?

You don't need to publish compiled wheels which (you are right) could be challenging, but you can just publish sdist...
We could assist you with it 🦩

@ivan-chai
Copy link
Owner

Thank you for clarifications! I will be very grateful for some handy manual, if you have one.

@Borda
Copy link
Contributor

Borda commented Oct 14, 2024

created draft #7 and seems that the package can't be easily installed on clean env. it somehow expects that torch was already installed... 🐰

@ivan-chai
Copy link
Owner

Yes, Torch is needed to build Torch CUDA extensions. Thus, it is a build dependency.

@ivan-chai
Copy link
Owner

I'll look at pyproject.toml specification. However, I'm not sure it is compatible with Torch extensions.

@ivan-chai
Copy link
Owner

Thank you for writing setup code! I've merged the PR and added pyproject.toml. By now the CI pipeline seems OK.

@ivan-chai
Copy link
Owner

ivan-chai commented Oct 15, 2024

The package was uploaded to Pypi, but there are some problems with build dependencies.

@SkafteNicki
Copy link
Author

@ivan-chai cannot find it on Pypi?
https://pypi.org/search/?q=torch-linear-assignment

@SkafteNicki
Copy link
Author

@ivan-chai cannot find it on Pypi?
https://pypi.org/search/?q=torch-linear-assignment

Alrighty, now I can find a v0.0.1post1 version. I try it out in our PR to see if everything works as expected

@ivan-chai
Copy link
Owner

The post1 release didn't include '.cu' files. I fixed this issue in the post2 release.

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

No branches or pull requests

3 participants