Skip to content

Commit d237755

Browse files
authored
Merge pull request #5 from czlwang/license/mit
Add MIT license with third-party notices and scope
2 parents dadb55b + b87e400 commit d237755

5 files changed

Lines changed: 171 additions & 0 deletions

File tree

‎LICENSE‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024-2026 PopulationTransformer contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎LICENSES/PyTorch-LICENSE.txt‎

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
From PyTorch:
2+
3+
Copyright (c) 2016- Facebook, Inc (Adam Paszke)
4+
Copyright (c) 2014- Facebook, Inc (Soumith Chintala)
5+
Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert)
6+
Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu)
7+
Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu)
8+
Copyright (c) 2011-2013 NYU (Clement Farabet)
9+
Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, Iain Melvin, Jason Weston)
10+
Copyright (c) 2006 Idiap Research Institute (Samy Bengio)
11+
Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, Samy Bengio, Johnny Mariethoz)
12+
13+
From Caffe2:
14+
15+
Copyright (c) 2016-present, Facebook Inc. All rights reserved.
16+
17+
All contributions by Facebook:
18+
Copyright (c) 2016 Facebook Inc.
19+
20+
All contributions by Google:
21+
Copyright (c) 2015 Google Inc.
22+
All rights reserved.
23+
24+
All contributions by Yangqing Jia:
25+
Copyright (c) 2015 Yangqing Jia
26+
All rights reserved.
27+
28+
All contributions from Caffe:
29+
Copyright(c) 2013, 2014, 2015, the respective contributors
30+
All rights reserved.
31+
32+
All other contributions:
33+
Copyright(c) 2015, 2016 the respective contributors
34+
All rights reserved.
35+
36+
Caffe2 uses a copyright model similar to Caffe: each contributor holds
37+
copyright over their contributions to Caffe2. The project versioning records
38+
all such contribution and copyright details. If a contributor wants to further
39+
mark their specific copyright on a particular contribution, they should
40+
indicate their copyright solely in the commit message of the change when it is
41+
committed.
42+
43+
All rights reserved.
44+
45+
Redistribution and use in source and binary forms, with or without
46+
modification, are permitted provided that the following conditions are met:
47+
48+
1. Redistributions of source code must retain the above copyright
49+
notice, this list of conditions and the following disclaimer.
50+
51+
2. Redistributions in binary form must reproduce the above copyright
52+
notice, this list of conditions and the following disclaimer in the
53+
documentation and/or other materials provided with the distribution.
54+
55+
3. Neither the names of Facebook, Deepmind Technologies, NYU, NEC Laboratories America
56+
and IDIAP Research Institute nor the names of its contributors may be
57+
used to endorse or promote products derived from this software without
58+
specific prior written permission.
59+
60+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
61+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
62+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
63+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
64+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
65+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
66+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
67+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
68+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
69+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
70+
POSSIBILITY OF SUCH DAMAGE.

‎LICENSES/SciPy-LICENSE.txt‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Copyright (c) 2001-2002 Enthought, Inc. 2003-2022, SciPy Developers.
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions
6+
are met:
7+
8+
1. Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
11+
2. Redistributions in binary form must reproduce the above
12+
copyright notice, this list of conditions and the following
13+
disclaimer in the documentation and/or other materials provided
14+
with the distribution.
15+
16+
3. Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived
18+
from this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

‎README.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ This is the code for the [PopulationTransformer](https://arxiv.org/abs/2406.0304
1313
| &nbsp;<a href="#pretraining">Pretraining</a>
1414
| &nbsp;<a href="#fine-tuning">Fine-tuning</a>
1515
| &nbsp;<a href="#citation">Citation</a>
16+
| &nbsp;<a href="#license">License</a>
1617
</p>
1718

1819
## Quick Start
@@ -206,3 +207,12 @@ python3 run_train.py \
206207
year={2025}
207208
}
208209
```
210+
211+
## License
212+
213+
Original PopulationTransformer code and documentation are licensed under the
214+
[MIT License](LICENSE). Incorporated third-party material retains its own terms;
215+
see [THIRD_PARTY.md](THIRD_PARTY.md) for attribution and exceptions, including
216+
tutorial material under CC BY-NC 4.0.
217+
218+
Pretrained weights and external datasets are not covered by this code license.

‎THIRD_PARTY.md‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Third-party notices and license scope
2+
3+
The root [MIT License](LICENSE) applies to original PopulationTransformer code
4+
and documentation. Third-party material retains its own terms and is not
5+
relicensed by the MIT grant.
6+
7+
Reference versions below identify material inspected, not necessarily the exact
8+
revisions originally copied.
9+
10+
## Transformer layers: PyTorch and Buomsoo Kim's tutorial
11+
12+
- **Local code:** `_get_activation_fn`, `TransformerEncoderLayer`, `_get_clones`,
13+
and `TransformerEncoder` in `models/pt_model_custom.py`.
14+
- **Credited source:** Buomsoo Kim's
15+
["Attention in Neural Networks - 21. Transformer (5)"](https://buomsoo-kim.github.io/attention/2020/04/27/Attention-mechanism-21.md/),
16+
published 2020-04-27. The site displays "© 2022 Buomsoo Kim" and
17+
[CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/)
18+
([legal terms](https://creativecommons.org/licenses/by-nc/4.0/legalcode.en)).
19+
- **Earlier source:** the tutorial adapts PyTorch's transformer implementation.
20+
Reference: [`torch/nn/modules/transformer.py` at v1.5.0](https://github.com/pytorch/pytorch/blob/v1.5.0/torch/nn/modules/transformer.py).
21+
- **Preserved PyTorch terms:** [LICENSES/PyTorch-LICENSE.txt](LICENSES/PyTorch-LICENSE.txt)
22+
contains the full copyright notices, BSD-style conditions, and disclaimer from
23+
that version.
24+
25+
The local classes adapt the tutorial's attention-returning encoder and integrate
26+
it into PopT. Preserve attribution and modification notices and observe the
27+
noncommercial restriction for material covered by the tutorial's grant. Neither
28+
the root MIT license nor PyTorch's license overrides rights in the tutorial's
29+
additions. No endorsement by the upstream authors is implied.
30+
31+
## SciPy-derived normalization helpers
32+
33+
- **Local code:** `_first` and `zscore` in `preprocessors/stft.py`.
34+
- **Source cited in code:** [`scipy/stats/_stats_py.py` at v1.9.0](https://github.com/scipy/scipy/blob/v1.9.0/scipy/stats/_stats_py.py).
35+
- **Copyright:** Copyright (c) 2001-2002 Enthought, Inc. 2003-2022, SciPy Developers.
36+
- **License:** BSD-3-Clause; full upstream notice in
37+
[LICENSES/SciPy-LICENSE.txt](LICENSES/SciPy-LICENSE.txt).
38+
39+
The local implementation simplifies normalization and replaces zero standard
40+
deviations with one. These adapted portions retain the SciPy terms.

0 commit comments

Comments
 (0)