License Question

Hello,

I have a question regarding the license. Does importing torch into my python file constitute as either binary or source code form? If it does, I would need to include PyTorch’s license with source code I put on github, and if it does not, I would not need to include PyTorch’s license with source code I put on github, is this correct?

Thanks,
Phantom

Since I have no idea about licenses, CC’ing @smth and @albanD. :slight_smile:

it’s a library form.

When you ship your program to customers and the world, if you include PyTorch binaries and source code, you will have to keep their LICENSE file and information intact (wherever they are, keep them unmodified). If you don’t include PyTorch binaries and source code when you ship your program (but you expect users to install PyTorch themselves), you don’t have to do anything.

2 Likes

@smth, thank you so much for your response. My question is if I have a python file that I put “import torch” at the beginning is that considered pytorch’s binary or source files (just the import line)? I am wondering if it is reasonable to put a file like this up on github. I would not be including an source files from pytorch. Obviously, if I explicitly included either the binary form of pytorch or the pytorch source code in my repository I would need that license, but if I’m simply doing “import torch” is that considered distributing pytorch in source or binary form?

Thanks again for the help!

if you have a python file that has import torch, it is not a binary that will come under pytorch licensing.

but if I’m simply doing “import torch” is that considered distributing pytorch in source or binary form?

No.

If you include PyTorch source code or binary forms (i.e. the files shipped with PyTorch which are .py or .so or other binaries), those files are under pytorch license.

Thank you so much for the response. So as long as I simply just import torch, I do not need to include the pytorch license?

Thanks,

Phantom