I'd like to include some data from a GPLv2 licensed project in my MIT licensed project.

More specifically, I want to use the data from the other project as the training data for my machine learning algorithm and I'd also like to include the trained model in my project.

I don't want to include the whole project source code, just those data files. I will not modify them. I also want to have the trained model in my project which I think is derived work?

Can I create a folder for those data files, add a copy of the GPLv2 license, make it clear that my project is MIT licensed apart from that folder which contains GPLv2 licensed files?

Does the trained model also have to be released under GPLv2? If so, can I also keep it in that folder?

  • Is the data also licensed under GPL? If so, then no. Feb 10, 2014 at 23:34
  • Yes, the data is also licensed under GPL.
    – mak
    Feb 11, 2014 at 0:00
  • 1
    Then you're out of luck. Feb 11, 2014 at 0:00
  • ..unless the holder of the license is able and willing to grant you an exemption or release the data under a more permissive license (compatible with MIT) or a dual-license. You can always ask, you never know. Many people choose their license based on what is common in their community/ecosystem, rather than deeply-held viewpoints of FOSS licensing.
    – gregmac
    Feb 11, 2014 at 6:21
  • Do I have to include the whole source code then? Can I have a reference to the project (like a git submodule) and then copy the files during the build process? Or can my library be MIT but create a submodule licensed also under GPLv2 that includes the data and the derived trained model? If so, can I have this submodule not like a real separate submodule but a folder in my project?
    – mak
    Feb 11, 2014 at 6:24

2 Answers 2


As I understand it, the GPL files serve as input to your software. In that case, your software can not be considered to be derived from the GPL files and is thus not affected by the copyleft nature of the GPL license.

The output of your program (when taking those GPL files as input) is derived from the GPL files and thus also bound by the GPL license.

This is under the assumption that the model for your algorithm will only be loaded into the algorithm at runtime and thus can be treated as data (for example, you can provide the algorithm with a different model without needing access to the source code). If this assumption is incorrect and the file containing the model is an integral part of your algorithm, then the GPL requires that you make the entire project available under that license.

As for distribution, you get the clearest situation if you split the distribution into two parts: one part with the MIT-licensed project and a second part with the GPL-licensed data and derived model. Then you can distribute both parts each with their appropriate license without possibly incurring confusion which parts are under which license.

  • Thanks for the answer. Your assumption is right. I want to know if I am complying with the GPLv2 if I distribute my library source code (entirely written by me, does not depend on the other project) under MIT and have a subfolder which contains just two data files from the other GPLv2 project along with a copy of the license and if I can include my model (derived from the data) in there as well, also under GPLv2 but it's copyright by me. If the users want to use the model they will, as I understand, have to comply with GPLv2 but that no longer affects me.
    – mak
    Feb 11, 2014 at 9:33
  • I did some research and it looks like I can't do that. Including GPL code in my MIT project would mean that while my code is still MIT the "package" would have to be GPL. So I have no choice but to create another module with the GPL files that will also be licensed under GPL.
    – mak
    Feb 11, 2014 at 10:48
  • Even if your project contains a folder with the GPL code, it might still be regarded as 'mere aggregation' (see here: gnu.org/licenses/old-licenses/gpl-2.0-faq.html#MereAggregation), but you really need to ask a lawyer about that. Feb 11, 2014 at 12:28
  • "We use this term in the case where they are separate programs, not parts of a single program. If modules are designed to run linked together in a shared address space, that almost surely means combining them into one program." Ugh, it looks like GPLv2 is poisonous and I shouldn't even touch it.
    – mak
    Feb 11, 2014 at 13:06
  • @mak: It is the nature of copyleft licenses (including GPL) to be infectious, but it is not that bad if the GPL code does not execute in the same process as your program. And data is generally not considered as being executed. Feb 11, 2014 at 13:47

As I understand you are not going to redestribute that part that you borrowed from GPLv2 project. You just need carefully maintain dependency on that project - it's perfectly fine to use some GPL data during development as soon as your final product that you will release doesn't contain it.

From GPLv2:

This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not covered by this License; they are outside its scope.

  • Thanks for the answer. Having a dependency to that project should have no problems. But I do want to redistribute (i.e. include in my project) those two GPLv2 licensed files so that the users don't have to download the whole project which is huge. I want to know if I can redistribute just those two files (along with a copy of the license) and still have my project be licensed under MIT. Of course, if the users of my library want to use the GPLv2 licensed files, they will have to comply with the conditions of GPLv2.
    – mak
    Feb 11, 2014 at 9:25
  • In the GPL v2, it states "In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License." If your code is completely independent of the GPL code, and is merely bundled with it, then this clause should apply.
    – Simon B
    Feb 11, 2014 at 12:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.