optimum-rbln 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- optimum/rbln/__init__.py +115 -0
- optimum/rbln/__version__.py +1 -0
- optimum/rbln/diffusers/__init__.py +64 -0
- optimum/rbln/diffusers/models/__init__.py +26 -0
- optimum/rbln/diffusers/models/autoencoder_kl.py +313 -0
- optimum/rbln/diffusers/models/controlnet.py +180 -0
- optimum/rbln/diffusers/models/unet_2d_condition.py +352 -0
- optimum/rbln/diffusers/pipelines/__init__.py +30 -0
- optimum/rbln/diffusers/pipelines/controlnet/__init__.py +24 -0
- optimum/rbln/diffusers/pipelines/controlnet/multicontrolnet.py +266 -0
- optimum/rbln/diffusers/pipelines/stable_diffusion/__init__.py +26 -0
- optimum/rbln/diffusers/pipelines/stable_diffusion/pipeline_controlnet_img2img.py +731 -0
- optimum/rbln/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py +106 -0
- optimum/rbln/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py +116 -0
- optimum/rbln/diffusers/pipelines/stable_diffusion_xl/__init__.py +2 -0
- optimum/rbln/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl.py +109 -0
- optimum/rbln/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_img2img.py +111 -0
- optimum/rbln/modeling.py +0 -0
- optimum/rbln/modeling_alias.py +49 -0
- optimum/rbln/modeling_base.py +645 -0
- optimum/rbln/modeling_config.py +169 -0
- optimum/rbln/modeling_seq2seq.py +469 -0
- optimum/rbln/transformers/__init__.py +59 -0
- optimum/rbln/transformers/generation/__init__.py +24 -0
- optimum/rbln/transformers/generation/streamers.py +122 -0
- optimum/rbln/transformers/models/__init__.py +28 -0
- optimum/rbln/transformers/models/bart/__init__.py +24 -0
- optimum/rbln/transformers/models/bart/bart_architecture.py +377 -0
- optimum/rbln/transformers/models/clip/__init__.py +24 -0
- optimum/rbln/transformers/models/clip/modeling_clip.py +116 -0
- optimum/rbln/transformers/models/gpt2/__init__.py +24 -0
- optimum/rbln/transformers/models/gpt2/gpt2_architecture.py +253 -0
- optimum/rbln/transformers/models/gpt2/modeling_gpt2.py +700 -0
- optimum/rbln/transformers/models/llama/__init__.py +24 -0
- optimum/rbln/transformers/models/llama/llama_architecture.py +607 -0
- optimum/rbln/transformers/models/llama/modeling_llama.py +409 -0
- optimum/rbln/transformers/models/t5/__init__.py +24 -0
- optimum/rbln/transformers/models/t5/t5_architecture.py +439 -0
- optimum/rbln/transformers/models/wav2vec2/__init__.py +24 -0
- optimum/rbln/transformers/models/wav2vec2/modeling_wav2vec2.py +121 -0
- optimum/rbln/transformers/models/whisper/__init__.py +24 -0
- optimum/rbln/transformers/models/whisper/modeling_whisper.py +374 -0
- optimum/rbln/transformers/models/whisper/whisper_architecture.py +406 -0
- optimum/rbln/utils/__init__.py +25 -0
- optimum/rbln/utils/import_utils.py +28 -0
- optimum/rbln/utils/runtime_utils.py +71 -0
- optimum/rbln/utils/save_utils.py +92 -0
- optimum_rbln-0.1.0.dist-info/METADATA +144 -0
- optimum_rbln-0.1.0.dist-info/RECORD +51 -0
- optimum_rbln-0.1.0.dist-info/WHEEL +4 -0
- optimum_rbln-0.1.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,144 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: optimum-rbln
|
3
|
+
Version: 0.1.0
|
4
|
+
Summary: Optimum RBLN is the interface between the Hugging Face Transformers and Diffusers libraries and RBLN accelerators.
|
5
|
+
It provides a set of tools enabling easy model loading and inference on single and multiple rbln device settings for different downstream tasks.
|
6
|
+
Keywords: transformers,diffusers,inference,rbln,atom,rebel
|
7
|
+
Author-Email: "Rebellions Inc." <support@rebellions.ai>
|
8
|
+
License: Apache
|
9
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
10
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
11
|
+
Classifier: Intended Audience :: Developers
|
12
|
+
Classifier: Intended Audience :: Education
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
14
|
+
Classifier: Operating System :: POSIX :: Linux
|
15
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
16
|
+
Classifier: Programming Language :: Python :: 3.8
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
20
|
+
Project-URL: Homepage, https://rebellions.ai
|
21
|
+
Project-URL: Documentation, https://docs.rbln.ai
|
22
|
+
Requires-Python: <3.11,>=3.8
|
23
|
+
Requires-Dist: torch>=2.2.1
|
24
|
+
Requires-Dist: optimum>=1.17.1
|
25
|
+
Requires-Dist: accelerate>=0.28.0
|
26
|
+
Requires-Dist: transformers<=4.40.2
|
27
|
+
Requires-Dist: rebel-compiler>=0.4.0
|
28
|
+
Requires-Dist: diffusers>=0.27.1; extra == "diffusers"
|
29
|
+
Requires-Dist: pytest>=8.1.1; extra == "tests"
|
30
|
+
Requires-Dist: psutil>=5.9.8; extra == "tests"
|
31
|
+
Requires-Dist: parameterized>=0.9.0; extra == "tests"
|
32
|
+
Requires-Dist: GitPython>=3.1.42; extra == "tests"
|
33
|
+
Requires-Dist: sentencepiece>=0.2.0; extra == "tests"
|
34
|
+
Requires-Dist: datasets>=2.18.0; extra == "tests"
|
35
|
+
Requires-Dist: sacremoses>=0.1.1; extra == "tests"
|
36
|
+
Requires-Dist: diffusers>=0.27.1; extra == "tests"
|
37
|
+
Requires-Dist: safetensors>=0.4.2; extra == "tests"
|
38
|
+
Requires-Dist: black>=24.3.0; extra == "quality"
|
39
|
+
Requires-Dist: ruff>=0.3.3; extra == "quality"
|
40
|
+
Requires-Dist: isort>=5.13.2; extra == "quality"
|
41
|
+
Requires-Dist: hf-doc-builder>=0.5.0; extra == "quality"
|
42
|
+
Provides-Extra: diffusers
|
43
|
+
Provides-Extra: tests
|
44
|
+
Provides-Extra: quality
|
45
|
+
Description-Content-Type: text/markdown
|
46
|
+
|
47
|
+
<!---
|
48
|
+
Copyright 2023 The HuggingFace Team. All rights reserved.
|
49
|
+
|
50
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
51
|
+
you may not use this file except in compliance with the License.
|
52
|
+
You may obtain a copy of the License at
|
53
|
+
|
54
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
55
|
+
|
56
|
+
Unless required by applicable law or agreed to in writing, software
|
57
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
58
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
59
|
+
See the License for the specific language governing permissions and
|
60
|
+
limitations under the License.
|
61
|
+
-->
|
62
|
+
|
63
|
+
# Optimum RBLN
|
64
|
+
|
65
|
+
🤗 Optimum RBLN is the interface between the 🤗 Transformers library and RBLN Accelerators including [ATOM](https://atom_link) and [REBEL](https://rebel_link).
|
66
|
+
It provides a set of tools enabling easy model loading and inference on single- and multi-Accelerator settings for different downstream tasks.
|
67
|
+
The list of officially validated models and tasks is available [here](TODO:). Users can try other models and tasks with only few changes.
|
68
|
+
|
69
|
+
## Install from PyPI
|
70
|
+
|
71
|
+
To install the latest release of this package:
|
72
|
+
|
73
|
+
```bash
|
74
|
+
pip install --index-url https://pypi.rebellions.in/simple optimum-rbln
|
75
|
+
```
|
76
|
+
|
77
|
+
## Install from source
|
78
|
+
|
79
|
+
### Prerequisites
|
80
|
+
|
81
|
+
- Install [PDM](https://pdm-project.org/latest/) (refer [this link](https://pdm-project.org/latest/#installation) for detailed commands)
|
82
|
+
- Export environment variables to access to RBLN private PyPI.
|
83
|
+
```bash
|
84
|
+
export REBEL_PYPI_USERNAME=<username>
|
85
|
+
export REBEL_PYPI_PASSWORD=<password>
|
86
|
+
```
|
87
|
+
|
88
|
+
The below command installs optimum-rbln along with its dependencies.
|
89
|
+
|
90
|
+
```bash
|
91
|
+
git clone https://github.com/rebellions-sw/optimum-rbln.git
|
92
|
+
cd optimum-rbln
|
93
|
+
pdm install
|
94
|
+
```
|
95
|
+
|
96
|
+
To install optional dependencies from all groups, specify `-G:all` option.
|
97
|
+
|
98
|
+
```bash
|
99
|
+
pdm install -G:all
|
100
|
+
```
|
101
|
+
|
102
|
+
## How to use it?
|
103
|
+
|
104
|
+
### Quick Start
|
105
|
+
|
106
|
+
🤗 Optimum RBLN was designed with one goal in mind: **to make inference straightforward for any 🤗 Transformers user while leveraging the complete power of RBLN Accelerators**.
|
107
|
+
|
108
|
+
#### Transformers Interface
|
109
|
+
|
110
|
+
<!--
|
111
|
+
There are two main classes one needs to know:
|
112
|
+
- TrainiumArgumentParser: inherits the original [HfArgumentParser](https://huggingface.co/docs/transformers/main/en/internal/trainer_utils#transformers.HfArgumentParser) in Transformers with additional checks on the argument values to make sure that they will work well with AWS Trainium instances.
|
113
|
+
- [NeuronTrainer](https://huggingface.co/docs/optimum/neuron/package_reference/trainer): this version trainer takes care of doing the proper checks and changes to the supported models to make them trainable on AWS Trainium instances.
|
114
|
+
|
115
|
+
The [NeuronTrainer](https://huggingface.co/docs/optimum/neuron/package_reference/trainer) is very similar to the [🤗 Transformers Trainer](https://huggingface.co/docs/transformers/main_classes/trainer), and adapting a script using the Trainer to make it work with Trainium will mostly consist in simply swapping the Trainer class for the NeuronTrainer one.
|
116
|
+
That's how most of the [example scripts](https://github.com/huggingface/optimum-neuron/tree/main/examples) were adapted from their [original counterparts](https://github.com/huggingface/transformers/tree/main/examples/pytorch).
|
117
|
+
|
118
|
+
```diff
|
119
|
+
from transformers import TrainingArguments
|
120
|
+
+from optimum.neuron import NeuronTrainer as Trainer
|
121
|
+
|
122
|
+
training_args = TrainingArguments(
|
123
|
+
# training arguments...
|
124
|
+
)
|
125
|
+
|
126
|
+
# A lot of code here
|
127
|
+
|
128
|
+
# Initialize our Trainer
|
129
|
+
trainer = Trainer(
|
130
|
+
model=model,
|
131
|
+
args=training_args, # Original training arguments.
|
132
|
+
train_dataset=train_dataset if training_args.do_train else None,
|
133
|
+
eval_dataset=eval_dataset if training_args.do_eval else None,
|
134
|
+
compute_metrics=compute_metrics,
|
135
|
+
tokenizer=tokenizer,
|
136
|
+
data_collator=data_collator,
|
137
|
+
)
|
138
|
+
``` -->
|
139
|
+
|
140
|
+
### Documentation
|
141
|
+
|
142
|
+
Check out [the documentation of Optimum RBLN](https://huggingface.co/docs/optimum-rbln/index) for more advanced usage.
|
143
|
+
|
144
|
+
If you find any issue while using those, please open an issue or a pull request.
|
@@ -0,0 +1,51 @@
|
|
1
|
+
optimum/rbln/__init__.py,sha256=MWckW5I-PQYH87qpw3-I3hMa5cc_RldVOf0vEmWVuJY,3741
|
2
|
+
optimum/rbln/__version__.py,sha256=L6zbQIZKsAP-Knhm6fBcQFPoVdIDuejxze60qX23jiw,21
|
3
|
+
optimum/rbln/diffusers/__init__.py,sha256=Ai3nNlgBqXnt90fv8p1AXwDKFGIeTpsDP67nMJm8Ydk,2295
|
4
|
+
optimum/rbln/diffusers/models/__init__.py,sha256=aY6Llq_31dZjdB9HPBDvi7sXVtdQT9r11gokXG5ffxA,1139
|
5
|
+
optimum/rbln/diffusers/models/autoencoder_kl.py,sha256=7Nn7JG3HFuFJSzTtNVoVeittUM8FybHaaJAY-6eOoz0,11775
|
6
|
+
optimum/rbln/diffusers/models/controlnet.py,sha256=-tHH1NAcjCBpltzj_g-ycEbXbW2Ptxd3F8k0-LfZkPM,6262
|
7
|
+
optimum/rbln/diffusers/models/unet_2d_condition.py,sha256=pAVNoW5mg4DcZDhaGBRta9kj0scjLizxpj3T8HFgjNc,13327
|
8
|
+
optimum/rbln/diffusers/pipelines/__init__.py,sha256=qnw9AXFA72KFLFL60FYSQ1PfjYlA1SVWvs5WULETc9E,1300
|
9
|
+
optimum/rbln/diffusers/pipelines/controlnet/__init__.py,sha256=Z_YuJRDhhOvIA1H4dk6LtOGCjGGurwH6z4mk7aS8-RE,1047
|
10
|
+
optimum/rbln/diffusers/pipelines/controlnet/multicontrolnet.py,sha256=y-CZhtywVnvnWloCqKaYVS94_QprslZpA_EFEY6pHpU,9466
|
11
|
+
optimum/rbln/diffusers/pipelines/stable_diffusion/__init__.py,sha256=A6IgKzHW-jVs-u8mTht5flE9UIEVZ-l9LR7jzQvUaDg,1228
|
12
|
+
optimum/rbln/diffusers/pipelines/stable_diffusion/pipeline_controlnet_img2img.py,sha256=sYvEI_FUlAz0-o49My7a2VqfckSSF2mm_VgrePwDlsk,37367
|
13
|
+
optimum/rbln/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py,sha256=JSNSX6Av81vpB2FkNF79kc6MEajeGMz5Az9FbsJz4OU,4350
|
14
|
+
optimum/rbln/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py,sha256=H_45If9HnrPSvFSyqp9-szxZNosjCQZfFFQWKIYxG9o,4776
|
15
|
+
optimum/rbln/diffusers/pipelines/stable_diffusion_xl/__init__.py,sha256=8MDMHIVsDrM6lZAyvpjFtWOFwiY_IoSxzCQe-gJYTPI,159
|
16
|
+
optimum/rbln/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl.py,sha256=vZDAg3g8IPR16tmhQVvH0anmWL7q2fnTarlTZC8HhPI,4633
|
17
|
+
optimum/rbln/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_img2img.py,sha256=OzAHyxzpsAnmo5PL8At_yNALHH-GD9Q7KEl54dS-P0I,4783
|
18
|
+
optimum/rbln/modeling.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
|
+
optimum/rbln/modeling_alias.py,sha256=pyYGME31QaiBaLqnjQq3LwUF1T6dLeb8QLB91gzNsLM,1574
|
20
|
+
optimum/rbln/modeling_base.py,sha256=Stmi3ITdw3sJAnSKnWwGin98AjMcKHBK8hviZUejepE,24843
|
21
|
+
optimum/rbln/modeling_config.py,sha256=R0GBd-upavJrpR-2SvfgCCxP7f5Zr0NxIqdKmwBfVCk,6439
|
22
|
+
optimum/rbln/modeling_seq2seq.py,sha256=Nps24Sw0DwGsQomzoNq2GOLGygNMNfCr1ZZfycsgiaQ,19004
|
23
|
+
optimum/rbln/transformers/__init__.py,sha256=RHnckU1ghEE6rEtYrwoElVdKXj3BF2aW0fWRelk65Ng,1860
|
24
|
+
optimum/rbln/transformers/generation/__init__.py,sha256=334nuQakoo3brXQhHRlrzEGgyhBDx3NPDopyTzuQnVE,1042
|
25
|
+
optimum/rbln/transformers/generation/streamers.py,sha256=oFsXcOF0c2pjZwP-X-chdtnfJ9vpqGDLEtJHbkHqjUI,5392
|
26
|
+
optimum/rbln/transformers/models/__init__.py,sha256=LidItK8nZMZi7IoIOq7fyAn4y1M_K6LOSqohVes-dwg,1238
|
27
|
+
optimum/rbln/transformers/models/bart/__init__.py,sha256=SGUcpQ_5iLsVxySxtbwhRpmGt7BgVUTxHAjxAjQStdU,1063
|
28
|
+
optimum/rbln/transformers/models/bart/bart_architecture.py,sha256=H8yVoBFa5uMXQv_wYCHKRW6tIIjdD50ho9C0vcMsbSo,14956
|
29
|
+
optimum/rbln/transformers/models/clip/__init__.py,sha256=tbco8qW9QhBe3dtWoKgslLZMsXu9dg_KfJ4IgjvK248,1071
|
30
|
+
optimum/rbln/transformers/models/clip/modeling_clip.py,sha256=SMiMtSWW4EFbhQsHRHKZarTW6u209FTqa0FkM8zN2Tw,4019
|
31
|
+
optimum/rbln/transformers/models/gpt2/__init__.py,sha256=jsOKYXUclG9G6cwUTUX4eeKqjCPfQUwev7TTFIMXS4Y,1040
|
32
|
+
optimum/rbln/transformers/models/gpt2/gpt2_architecture.py,sha256=RQ0Y5f7IKQ73onmuIRB-aw379asSR7kfhUPclLHCOkY,10348
|
33
|
+
optimum/rbln/transformers/models/gpt2/modeling_gpt2.py,sha256=lKJcLrGAPkngKKIYabKgjsE2SWnpxY9IDo7VAOVzxg8,29509
|
34
|
+
optimum/rbln/transformers/models/llama/__init__.py,sha256=5mX-MuKzVBj6WQeVxyPhtvFTv0jeZXAFfg4RZ2nVUh0,1042
|
35
|
+
optimum/rbln/transformers/models/llama/llama_architecture.py,sha256=LFaBX8joIHBw5RU-DJnX7soTG4Nfz24mgXS1VHWkTWs,25843
|
36
|
+
optimum/rbln/transformers/models/llama/modeling_llama.py,sha256=ltpDPDDKLKrEwCilSYCigTIow4ZsUy0oErZYMwi4Z9M,15811
|
37
|
+
optimum/rbln/transformers/models/t5/__init__.py,sha256=dK6F1jbBf001h79WZiVdiNZoXm5kOe2fskzhREhu0EE,1057
|
38
|
+
optimum/rbln/transformers/models/t5/t5_architecture.py,sha256=2nFovfOdiJdY9jdAR9BngwPO3d2Oofn9jqVWgZ-YYZ0,18091
|
39
|
+
optimum/rbln/transformers/models/wav2vec2/__init__.py,sha256=mz4cXqG9b0tDpTAw3qYn3FaJuolX601VmKBE3gohLSw,1043
|
40
|
+
optimum/rbln/transformers/models/wav2vec2/modeling_wav2vec2.py,sha256=kooQ1CC6p2mHvRHkFE48d69yNTnkG_V6g9Beu6Sy3XU,4063
|
41
|
+
optimum/rbln/transformers/models/whisper/__init__.py,sha256=PZ8qeAAFMas2MizwVYFxlpFWd5k1Pe1x-0IJfYAMhT8,1059
|
42
|
+
optimum/rbln/transformers/models/whisper/modeling_whisper.py,sha256=dWXmzQVKM6cQkdyNngLK1j437YjF53sobCWAYIXtyi0,14236
|
43
|
+
optimum/rbln/transformers/models/whisper/whisper_architecture.py,sha256=QX1Nmq26F_82EYgKmdgXEpE2F8ry-inkn2BB9Lx5M38,15885
|
44
|
+
optimum/rbln/utils/__init__.py,sha256=wr7ep1WliFYR0825f7BbHevtT3xhlMSwpDkvAPzShgE,1083
|
45
|
+
optimum/rbln/utils/import_utils.py,sha256=OL3aBy3XLWj7KDb6VZKBPJWiEcktL4qRxlpQpDBcMRg,1116
|
46
|
+
optimum/rbln/utils/runtime_utils.py,sha256=EzEabg2E18nq2WZRDZWsZ_hgrdgQ7u_NElTMAYpSDvM,2545
|
47
|
+
optimum/rbln/utils/save_utils.py,sha256=eFIPtmiblCJ3MvtxEPxmAR3iuLEUrzpyzwtVotDauhw,3283
|
48
|
+
optimum_rbln-0.1.0.dist-info/METADATA,sha256=jAPVCSO-q6JOIeYLYH2cuolp1LEDwlWOzbIJM88nAgA,6172
|
49
|
+
optimum_rbln-0.1.0.dist-info/WHEEL,sha256=vnE8JVcI2Wz7GRKorsPArnBdnW2SWKWGow5gu5tHlRU,90
|
50
|
+
optimum_rbln-0.1.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
51
|
+
optimum_rbln-0.1.0.dist-info/RECORD,,
|
@@ -0,0 +1,201 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
179
|
+
|
180
|
+
To apply the Apache License to your work, attach the following
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182
|
+
replaced with your own identifying information. (Don't include
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
184
|
+
comment syntax for the file format. We also recommend that a
|
185
|
+
file or class name and description of purpose be included on the
|
186
|
+
same "printed page" as the copyright notice for easier
|
187
|
+
identification within third-party archives.
|
188
|
+
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
190
|
+
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192
|
+
you may not use this file except in compliance with the License.
|
193
|
+
You may obtain a copy of the License at
|
194
|
+
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
196
|
+
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
|
+
See the License for the specific language governing permissions and
|
201
|
+
limitations under the License.
|