twiga 0.1.0__tar.gz

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.
Files changed (368) hide show
  1. twiga-0.1.0/.coveragerc +6 -0
  2. twiga-0.1.0/.gitignore +140 -0
  3. twiga-0.1.0/.python-version +1 -0
  4. twiga-0.1.0/.secrets.baseline +144 -0
  5. twiga-0.1.0/CHANGELOG.md +150 -0
  6. twiga-0.1.0/LICENSE +201 -0
  7. twiga-0.1.0/PKG-INFO +467 -0
  8. twiga-0.1.0/README.md +320 -0
  9. twiga-0.1.0/pyproject.toml +265 -0
  10. twiga-0.1.0/tests/__init__.py +0 -0
  11. twiga-0.1.0/tests/conftest.py +22 -0
  12. twiga-0.1.0/tests/integration/__init__.py +2 -0
  13. twiga-0.1.0/tests/integration/test_pipeline_schemas.py +196 -0
  14. twiga-0.1.0/tests/integration/test_serve.py +245 -0
  15. twiga-0.1.0/tests/unit/__init__.py +0 -0
  16. twiga-0.1.0/tests/unit/config/__init__.py +0 -0
  17. twiga-0.1.0/tests/unit/config/test_config.py +753 -0
  18. twiga-0.1.0/tests/unit/conformal/__init__.py +0 -0
  19. twiga-0.1.0/tests/unit/conformal/base.py +0 -0
  20. twiga-0.1.0/tests/unit/conformal/cqr.py +35 -0
  21. twiga-0.1.0/tests/unit/conformal/crc.py +22 -0
  22. twiga-0.1.0/tests/unit/conformal/split.py +139 -0
  23. twiga-0.1.0/tests/unit/conformal/test_conformal_base.py +223 -0
  24. twiga-0.1.0/tests/unit/conformal/test_core.py +39 -0
  25. twiga-0.1.0/tests/unit/conformal/test_cqr.py +175 -0
  26. twiga-0.1.0/tests/unit/conformal/test_crc.py +213 -0
  27. twiga-0.1.0/tests/unit/conformal/test_residual_fitting.py +303 -0
  28. twiga-0.1.0/tests/unit/core/__init__.py +0 -0
  29. twiga-0.1.0/tests/unit/core/test_ami.py +180 -0
  30. twiga-0.1.0/tests/unit/core/test_autocorr.py +331 -0
  31. twiga-0.1.0/tests/unit/core/test_core.py +206 -0
  32. twiga-0.1.0/tests/unit/core/test_entropy.py +268 -0
  33. twiga-0.1.0/tests/unit/core/test_entropy_params.py +40 -0
  34. twiga-0.1.0/tests/unit/core/test_logger.py +439 -0
  35. twiga-0.1.0/tests/unit/core/test_stationarity.py +122 -0
  36. twiga-0.1.0/tests/unit/core/test_utils.py +238 -0
  37. twiga-0.1.0/tests/unit/data/__init__.py +0 -0
  38. twiga-0.1.0/tests/unit/data/test_autores.py +159 -0
  39. twiga-0.1.0/tests/unit/data/test_characterisation.py +446 -0
  40. twiga-0.1.0/tests/unit/data/test_data_loader.py +311 -0
  41. twiga-0.1.0/tests/unit/data/test_data_pipeline.py +283 -0
  42. twiga-0.1.0/tests/unit/data/test_differentiator.py +263 -0
  43. twiga-0.1.0/tests/unit/data/test_feature.py +622 -0
  44. twiga-0.1.0/tests/unit/data/test_feature_engeering.py +637 -0
  45. twiga-0.1.0/tests/unit/data/test_processing.py +695 -0
  46. twiga-0.1.0/tests/unit/data/test_relevance.py +97 -0
  47. twiga-0.1.0/tests/unit/data/test_selection.py +215 -0
  48. twiga-0.1.0/tests/unit/data/test_temporal.py +172 -0
  49. twiga-0.1.0/tests/unit/distribution/__init__.py +0 -0
  50. twiga-0.1.0/tests/unit/distribution/test_fpquantile.py +209 -0
  51. twiga-0.1.0/tests/unit/distribution/test_ml_utils.py +199 -0
  52. twiga-0.1.0/tests/unit/distribution/test_parametric.py +665 -0
  53. twiga-0.1.0/tests/unit/distribution/test_quantile.py +169 -0
  54. twiga-0.1.0/tests/unit/distribution/test_quantile_loss.py +272 -0
  55. twiga-0.1.0/tests/unit/eval/__init__.py +0 -0
  56. twiga-0.1.0/tests/unit/eval/test_backtester.py +317 -0
  57. twiga-0.1.0/tests/unit/forecaster/__init__.py +0 -0
  58. twiga-0.1.0/tests/unit/forecaster/test_abstract_forecaster.py +393 -0
  59. twiga-0.1.0/tests/unit/forecaster/test_base_forecaster.py +441 -0
  60. twiga-0.1.0/tests/unit/forecaster/test_core_forecaster.py +239 -0
  61. twiga-0.1.0/tests/unit/forecaster/test_distribution_resolution.py +162 -0
  62. twiga-0.1.0/tests/unit/forecaster/test_ensemble.py +239 -0
  63. twiga-0.1.0/tests/unit/forecaster/test_forecast_result.py +587 -0
  64. twiga-0.1.0/tests/unit/forecaster/test_registry.py +93 -0
  65. twiga-0.1.0/tests/unit/forecaster/test_twiga_utils.py +93 -0
  66. twiga-0.1.0/tests/unit/forecaster/test_utils.py +153 -0
  67. twiga-0.1.0/tests/unit/metrics/__init__.py +0 -0
  68. twiga-0.1.0/tests/unit/metrics/test_core_metrics_interval.py +225 -0
  69. twiga-0.1.0/tests/unit/metrics/test_core_metrics_prob.py +64 -0
  70. twiga-0.1.0/tests/unit/metrics/test_metrics.py +511 -0
  71. twiga-0.1.0/tests/unit/metrics/test_point_metrics.py +521 -0
  72. twiga-0.1.0/tests/unit/metrics/test_quantile.py +894 -0
  73. twiga-0.1.0/tests/unit/mlops/__init__.py +0 -0
  74. twiga-0.1.0/tests/unit/mlops/test_app.py +134 -0
  75. twiga-0.1.0/tests/unit/mlops/test_loader.py +158 -0
  76. twiga-0.1.0/tests/unit/mlops/test_monitor.py +355 -0
  77. twiga-0.1.0/tests/unit/mlops/test_schemas.py +171 -0
  78. twiga-0.1.0/tests/unit/mlops/test_tasks.py +618 -0
  79. twiga-0.1.0/tests/unit/mlops/test_tracker.py +172 -0
  80. twiga-0.1.0/tests/unit/models/__init__.py +0 -0
  81. twiga-0.1.0/tests/unit/models/baseline/__init__.py +0 -0
  82. twiga-0.1.0/tests/unit/models/baseline/test_context_parrot.py +331 -0
  83. twiga-0.1.0/tests/unit/models/baseline/test_drift.py +187 -0
  84. twiga-0.1.0/tests/unit/models/baseline/test_naive.py +216 -0
  85. twiga-0.1.0/tests/unit/models/baseline/test_seasonal_naive.py +228 -0
  86. twiga-0.1.0/tests/unit/models/baseline/test_window_average.py +195 -0
  87. twiga-0.1.0/tests/unit/models/ml/__init__.py +0 -0
  88. twiga-0.1.0/tests/unit/models/ml/test_base_regressor.py +139 -0
  89. twiga-0.1.0/tests/unit/models/ml/test_catboost.py +89 -0
  90. twiga-0.1.0/tests/unit/models/ml/test_catboostgauss.py +147 -0
  91. twiga-0.1.0/tests/unit/models/ml/test_lightgbm.py +118 -0
  92. twiga-0.1.0/tests/unit/models/ml/test_lineareg.py +94 -0
  93. twiga-0.1.0/tests/unit/models/ml/test_ngboostexponential.py +224 -0
  94. twiga-0.1.0/tests/unit/models/ml/test_ngboostlognormal.py +189 -0
  95. twiga-0.1.0/tests/unit/models/ml/test_ngboostnormal.py +239 -0
  96. twiga-0.1.0/tests/unit/models/ml/test_qrrandomforest.py +126 -0
  97. twiga-0.1.0/tests/unit/models/ml/test_randomforest.py +88 -0
  98. twiga-0.1.0/tests/unit/models/ml/test_xgboost.py +115 -0
  99. twiga-0.1.0/tests/unit/models/nn/__init__.py +0 -0
  100. twiga-0.1.0/tests/unit/models/nn/core/__init__.py +0 -0
  101. twiga-0.1.0/tests/unit/models/nn/core/test_base.py +191 -0
  102. twiga-0.1.0/tests/unit/models/nn/core/test_base_arch.py +104 -0
  103. twiga-0.1.0/tests/unit/models/nn/core/test_base_model.py +275 -0
  104. twiga-0.1.0/tests/unit/models/nn/core/test_embending.py +476 -0
  105. twiga-0.1.0/tests/unit/models/nn/core/test_linear.py +702 -0
  106. twiga-0.1.0/tests/unit/models/nn/ganf/__init__.py +0 -0
  107. twiga-0.1.0/tests/unit/models/nn/ganf/test_ganf_model.py +305 -0
  108. twiga-0.1.0/tests/unit/models/nn/ganf/test_ganf_network.py +467 -0
  109. twiga-0.1.0/tests/unit/models/nn/ganf/test_gate.py +316 -0
  110. twiga-0.1.0/tests/unit/models/nn/ganf/test_groups.py +467 -0
  111. twiga-0.1.0/tests/unit/models/nn/mlpf/__init__.py +0 -0
  112. twiga-0.1.0/tests/unit/models/nn/mlpf/test_mlpf.py +123 -0
  113. twiga-0.1.0/tests/unit/models/nn/mlpf/test_mlpf_model.py +164 -0
  114. twiga-0.1.0/tests/unit/models/nn/mlpf/test_mlpfgam.py +117 -0
  115. twiga-0.1.0/tests/unit/models/nn/mlpf/test_mlpfgam_model.py +158 -0
  116. twiga-0.1.0/tests/unit/models/nn/nhits/__init__.py +0 -0
  117. twiga-0.1.0/tests/unit/models/nn/nhits/test_nhits.py +351 -0
  118. twiga-0.1.0/tests/unit/models/nn/nhits/test_nhits_model.py +154 -0
  119. twiga-0.1.0/tests/unit/models/nn/prob/__init__.py +0 -0
  120. twiga-0.1.0/tests/unit/models/nn/prob/test_mlpf_crc_model.py +160 -0
  121. twiga-0.1.0/tests/unit/models/nn/prob/test_mlpf_parametric_model.py +106 -0
  122. twiga-0.1.0/tests/unit/models/nn/prob/test_mlpffpqr_model.py +238 -0
  123. twiga-0.1.0/tests/unit/models/nn/prob/test_mlpfqr_model.py +151 -0
  124. twiga-0.1.0/tests/unit/models/nn/prob/test_mlpfstudentt_model.py +222 -0
  125. twiga-0.1.0/tests/unit/models/nn/prob/test_mlpgaf_crc_model.py +183 -0
  126. twiga-0.1.0/tests/unit/models/nn/prob/test_mlpgaf_parametric_model.py +309 -0
  127. twiga-0.1.0/tests/unit/models/nn/prob/test_mlpgaffpqr_model.py +277 -0
  128. twiga-0.1.0/tests/unit/models/nn/prob/test_mlpgafqr_model.py +257 -0
  129. twiga-0.1.0/tests/unit/models/nn/prob/test_mlpgam_crc_model.py +183 -0
  130. twiga-0.1.0/tests/unit/models/nn/prob/test_mlpgam_parametric_model.py +274 -0
  131. twiga-0.1.0/tests/unit/models/nn/prob/test_mlpgamfpqr_model.py +247 -0
  132. twiga-0.1.0/tests/unit/models/nn/prob/test_mlpgamqr_model.py +230 -0
  133. twiga-0.1.0/tests/unit/models/nn/prob/test_mplfqr_model.py +171 -0
  134. twiga-0.1.0/tests/unit/models/nn/prob/test_nhits_parametric_model.py +182 -0
  135. twiga-0.1.0/tests/unit/models/nn/prob/test_nhitscrc_model.py +192 -0
  136. twiga-0.1.0/tests/unit/models/nn/prob/test_nhitsqr_model.py +258 -0
  137. twiga-0.1.0/tests/unit/models/nn/rnn/__init__.py +0 -0
  138. twiga-0.1.0/tests/unit/models/nn/rnn/test_rnn.py +235 -0
  139. twiga-0.1.0/tests/unit/models/nn/rnn/test_rnn_model.py +145 -0
  140. twiga-0.1.0/tests/unit/models/nn/rnn/test_rnn_prob.py +291 -0
  141. twiga-0.1.0/tests/unit/plot/__init__.py +0 -0
  142. twiga-0.1.0/tests/unit/plot/conftest.py +75 -0
  143. twiga-0.1.0/tests/unit/plot/test_distribution.py +60 -0
  144. twiga-0.1.0/tests/unit/plot/test_exploration.py +75 -0
  145. twiga-0.1.0/tests/unit/plot/test_residuals.py +111 -0
  146. twiga-0.1.0/tests/unit/plot/test_stats_plots.py +70 -0
  147. twiga-0.1.0/tests/unit/plot/test_timeseries.py +121 -0
  148. twiga-0.1.0/tests/unit/stats/__init__.py +0 -0
  149. twiga-0.1.0/tests/unit/stats/test_corr.py +137 -0
  150. twiga-0.1.0/tests/unit/stats/test_mutual_information.py +56 -0
  151. twiga-0.1.0/tests/unit/stats/test_ppscore.py +59 -0
  152. twiga-0.1.0/tests/unit/stats/test_residual.py +152 -0
  153. twiga-0.1.0/tests/unit/stats/test_xicorr.py +65 -0
  154. twiga-0.1.0/tests/unit/utils/__init__.py +0 -0
  155. twiga-0.1.0/tests/unit/utils/test_data_loading.py +239 -0
  156. twiga-0.1.0/tests/unit/utils/test_run_forecast.py +310 -0
  157. twiga-0.1.0/twiga/__init__.py +102 -0
  158. twiga-0.1.0/twiga/core/__init__.py +58 -0
  159. twiga-0.1.0/twiga/core/backtester.py +499 -0
  160. twiga-0.1.0/twiga/core/config/__init__.py +27 -0
  161. twiga-0.1.0/twiga/core/config/base.py +87 -0
  162. twiga-0.1.0/twiga/core/config/characterisation.py +120 -0
  163. twiga-0.1.0/twiga/core/config/conformal.py +124 -0
  164. twiga-0.1.0/twiga/core/config/data.py +100 -0
  165. twiga-0.1.0/twiga/core/config/forecaster.py +98 -0
  166. twiga-0.1.0/twiga/core/config/neural.py +449 -0
  167. twiga-0.1.0/twiga/core/config/search_space.py +153 -0
  168. twiga-0.1.0/twiga/core/data/__init__.py +28 -0
  169. twiga-0.1.0/twiga/core/data/autores.py +193 -0
  170. twiga-0.1.0/twiga/core/data/characterisation.py +1291 -0
  171. twiga-0.1.0/twiga/core/data/diff.py +107 -0
  172. twiga-0.1.0/twiga/core/data/feature.py +269 -0
  173. twiga-0.1.0/twiga/core/data/loader.py +136 -0
  174. twiga-0.1.0/twiga/core/data/pipeline.py +362 -0
  175. twiga-0.1.0/twiga/core/data/processing.py +1404 -0
  176. twiga-0.1.0/twiga/core/data/relevance.py +135 -0
  177. twiga-0.1.0/twiga/core/data/selection.py +199 -0
  178. twiga-0.1.0/twiga/core/data/temporal.py +154 -0
  179. twiga-0.1.0/twiga/core/exceptions.py +55 -0
  180. twiga-0.1.0/twiga/core/explain/__init__.py +14 -0
  181. twiga-0.1.0/twiga/core/explain/shap_explainer.py +383 -0
  182. twiga-0.1.0/twiga/core/metrics/__init__.py +107 -0
  183. twiga-0.1.0/twiga/core/metrics/_core.py +67 -0
  184. twiga-0.1.0/twiga/core/metrics/interval.py +453 -0
  185. twiga-0.1.0/twiga/core/metrics/parametric.py +144 -0
  186. twiga-0.1.0/twiga/core/metrics/point.py +975 -0
  187. twiga-0.1.0/twiga/core/metrics/prob.py +371 -0
  188. twiga-0.1.0/twiga/core/metrics/quantile.py +735 -0
  189. twiga-0.1.0/twiga/core/metrics/stats.py +265 -0
  190. twiga-0.1.0/twiga/core/plot/__init__.py +84 -0
  191. twiga-0.1.0/twiga/core/plot/_constants.py +57 -0
  192. twiga-0.1.0/twiga/core/plot/distribution.py +396 -0
  193. twiga-0.1.0/twiga/core/plot/exploration.py +399 -0
  194. twiga-0.1.0/twiga/core/plot/gt.py +311 -0
  195. twiga-0.1.0/twiga/core/plot/matplot_theme.py +224 -0
  196. twiga-0.1.0/twiga/core/plot/plotly.py +302 -0
  197. twiga-0.1.0/twiga/core/plot/residuals.py +457 -0
  198. twiga-0.1.0/twiga/core/plot/stats.py +530 -0
  199. twiga-0.1.0/twiga/core/plot/theme.py +170 -0
  200. twiga-0.1.0/twiga/core/plot/timeseries.py +835 -0
  201. twiga-0.1.0/twiga/core/settings.py +77 -0
  202. twiga-0.1.0/twiga/core/stats/__init__.py +64 -0
  203. twiga-0.1.0/twiga/core/stats/ami.py +147 -0
  204. twiga-0.1.0/twiga/core/stats/association.py +122 -0
  205. twiga-0.1.0/twiga/core/stats/autocorr.py +195 -0
  206. twiga-0.1.0/twiga/core/stats/entropy.py +220 -0
  207. twiga-0.1.0/twiga/core/stats/mutual_information.py +68 -0
  208. twiga-0.1.0/twiga/core/stats/ppscore.py +139 -0
  209. twiga-0.1.0/twiga/core/stats/residual.py +128 -0
  210. twiga-0.1.0/twiga/core/stats/seasonality.py +159 -0
  211. twiga-0.1.0/twiga/core/stats/selection.py +87 -0
  212. twiga-0.1.0/twiga/core/stats/stationarity.py +94 -0
  213. twiga-0.1.0/twiga/core/stats/utils.py +448 -0
  214. twiga-0.1.0/twiga/core/stats/xicorr.py +144 -0
  215. twiga-0.1.0/twiga/core/utils/__init__.py +5 -0
  216. twiga-0.1.0/twiga/core/utils/logger.py +379 -0
  217. twiga-0.1.0/twiga/distributions/__init__.py +28 -0
  218. twiga-0.1.0/twiga/distributions/conformal/__init__.py +14 -0
  219. twiga-0.1.0/twiga/distributions/conformal/base.py +198 -0
  220. twiga-0.1.0/twiga/distributions/conformal/common.py +0 -0
  221. twiga-0.1.0/twiga/distributions/conformal/core.py +25 -0
  222. twiga-0.1.0/twiga/distributions/conformal/cqr.py +90 -0
  223. twiga-0.1.0/twiga/distributions/conformal/crc.py +86 -0
  224. twiga-0.1.0/twiga/distributions/conformal/util +0 -0
  225. twiga-0.1.0/twiga/distributions/ml/__init__.py +0 -0
  226. twiga-0.1.0/twiga/distributions/ml/utils.py +117 -0
  227. twiga-0.1.0/twiga/distributions/nn/__init__.py +55 -0
  228. twiga-0.1.0/twiga/distributions/nn/custom_loss.py +334 -0
  229. twiga-0.1.0/twiga/distributions/nn/fpquantile.py +426 -0
  230. twiga-0.1.0/twiga/distributions/nn/parametric.py +701 -0
  231. twiga-0.1.0/twiga/distributions/nn/quantile.py +244 -0
  232. twiga-0.1.0/twiga/distributions/nn/residual_conformal.py +273 -0
  233. twiga-0.1.0/twiga/forecaster/__init__.py +18 -0
  234. twiga-0.1.0/twiga/forecaster/abstract.py +904 -0
  235. twiga-0.1.0/twiga/forecaster/base.py +1045 -0
  236. twiga-0.1.0/twiga/forecaster/core.py +363 -0
  237. twiga-0.1.0/twiga/forecaster/ensemble.py +76 -0
  238. twiga-0.1.0/twiga/forecaster/registry.py +99 -0
  239. twiga-0.1.0/twiga/forecaster/result.py +362 -0
  240. twiga-0.1.0/twiga/forecaster/utils.py +312 -0
  241. twiga-0.1.0/twiga/models/__init__.py +94 -0
  242. twiga-0.1.0/twiga/models/baseline/__init__.py +20 -0
  243. twiga-0.1.0/twiga/models/baseline/context_parrot_model.py +330 -0
  244. twiga-0.1.0/twiga/models/baseline/drift_model.py +179 -0
  245. twiga-0.1.0/twiga/models/baseline/naive_model.py +222 -0
  246. twiga-0.1.0/twiga/models/baseline/seasonal_naive_model.py +285 -0
  247. twiga-0.1.0/twiga/models/baseline/window_average_model.py +206 -0
  248. twiga-0.1.0/twiga/models/ml/__init__.py +80 -0
  249. twiga-0.1.0/twiga/models/ml/catboost_model.py +98 -0
  250. twiga-0.1.0/twiga/models/ml/core/__init__.py +0 -0
  251. twiga-0.1.0/twiga/models/ml/core/base_regressor.py +234 -0
  252. twiga-0.1.0/twiga/models/ml/gausscatboost_model.py +290 -0
  253. twiga-0.1.0/twiga/models/ml/lightgbm_model.py +197 -0
  254. twiga-0.1.0/twiga/models/ml/lineareg_model.py +74 -0
  255. twiga-0.1.0/twiga/models/ml/ngboostexponential_model.py +160 -0
  256. twiga-0.1.0/twiga/models/ml/ngboostlognormal_model.py +166 -0
  257. twiga-0.1.0/twiga/models/ml/ngboostnormal_model.py +152 -0
  258. twiga-0.1.0/twiga/models/ml/prob/__init__.py +0 -0
  259. twiga-0.1.0/twiga/models/ml/prob/base_ngboost.py +149 -0
  260. twiga-0.1.0/twiga/models/ml/prob/base_quantile.py +318 -0
  261. twiga-0.1.0/twiga/models/ml/qrcatboost_model.py +96 -0
  262. twiga-0.1.0/twiga/models/ml/qrlightgbm_model.py +71 -0
  263. twiga-0.1.0/twiga/models/ml/qrrandomforest_model.py +196 -0
  264. twiga-0.1.0/twiga/models/ml/qrxgboost_model.py +85 -0
  265. twiga-0.1.0/twiga/models/ml/randomforest_model.py +115 -0
  266. twiga-0.1.0/twiga/models/ml/xgboost_model.py +162 -0
  267. twiga-0.1.0/twiga/models/nn/__init__.py +140 -0
  268. twiga-0.1.0/twiga/models/nn/core/__init__.py +46 -0
  269. twiga-0.1.0/twiga/models/nn/core/base.py +376 -0
  270. twiga-0.1.0/twiga/models/nn/core/base_arch.py +191 -0
  271. twiga-0.1.0/twiga/models/nn/core/base_model.py +541 -0
  272. twiga-0.1.0/twiga/models/nn/core/defaults.py +305 -0
  273. twiga-0.1.0/twiga/models/nn/core/embedding.py +673 -0
  274. twiga-0.1.0/twiga/models/nn/core/linear.py +729 -0
  275. twiga-0.1.0/twiga/models/nn/core/scheduler.py +0 -0
  276. twiga-0.1.0/twiga/models/nn/mlpf_model.py +187 -0
  277. twiga-0.1.0/twiga/models/nn/mlpfbeta_model.py +139 -0
  278. twiga-0.1.0/twiga/models/nn/mlpfcrc_model.py +142 -0
  279. twiga-0.1.0/twiga/models/nn/mlpffpqr_model.py +207 -0
  280. twiga-0.1.0/twiga/models/nn/mlpfgamma_model.py +139 -0
  281. twiga-0.1.0/twiga/models/nn/mlpflaplace_model.py +128 -0
  282. twiga-0.1.0/twiga/models/nn/mlpflognormal_model.py +132 -0
  283. twiga-0.1.0/twiga/models/nn/mlpfnormal_model.py +127 -0
  284. twiga-0.1.0/twiga/models/nn/mlpfqr_model.py +381 -0
  285. twiga-0.1.0/twiga/models/nn/mlpfstudentt_model.py +135 -0
  286. twiga-0.1.0/twiga/models/nn/mlpgaf_model.py +224 -0
  287. twiga-0.1.0/twiga/models/nn/mlpgafbeta_model.py +142 -0
  288. twiga-0.1.0/twiga/models/nn/mlpgafcrc_model.py +150 -0
  289. twiga-0.1.0/twiga/models/nn/mlpgaffpqr_model.py +169 -0
  290. twiga-0.1.0/twiga/models/nn/mlpgafgamma_model.py +142 -0
  291. twiga-0.1.0/twiga/models/nn/mlpgaflaplace_model.py +132 -0
  292. twiga-0.1.0/twiga/models/nn/mlpgaflognormal_model.py +132 -0
  293. twiga-0.1.0/twiga/models/nn/mlpgafnormal_model.py +139 -0
  294. twiga-0.1.0/twiga/models/nn/mlpgafqr_model.py +166 -0
  295. twiga-0.1.0/twiga/models/nn/mlpgafstudentt_model.py +137 -0
  296. twiga-0.1.0/twiga/models/nn/mlpgam_model.py +169 -0
  297. twiga-0.1.0/twiga/models/nn/mlpgambeta_model.py +138 -0
  298. twiga-0.1.0/twiga/models/nn/mlpgamcrc_model.py +136 -0
  299. twiga-0.1.0/twiga/models/nn/mlpgamfpqr_model.py +163 -0
  300. twiga-0.1.0/twiga/models/nn/mlpgamgamma_model.py +138 -0
  301. twiga-0.1.0/twiga/models/nn/mlpgamlaplace_model.py +128 -0
  302. twiga-0.1.0/twiga/models/nn/mlpgamlognormal_model.py +128 -0
  303. twiga-0.1.0/twiga/models/nn/mlpgamnormal_model.py +134 -0
  304. twiga-0.1.0/twiga/models/nn/mlpgamqr_model.py +162 -0
  305. twiga-0.1.0/twiga/models/nn/mlpgamstudentt_model.py +133 -0
  306. twiga-0.1.0/twiga/models/nn/net/__init__.py +17 -0
  307. twiga-0.1.0/twiga/models/nn/net/ganf/__init__.py +0 -0
  308. twiga-0.1.0/twiga/models/nn/net/ganf/gates.py +73 -0
  309. twiga-0.1.0/twiga/models/nn/net/ganf/groups.py +170 -0
  310. twiga-0.1.0/twiga/models/nn/net/ganf/importance.py +829 -0
  311. twiga-0.1.0/twiga/models/nn/net/ganf/losses.py +159 -0
  312. twiga-0.1.0/twiga/models/nn/net/mlpf.py +414 -0
  313. twiga-0.1.0/twiga/models/nn/net/mlpfgaf.py +589 -0
  314. twiga-0.1.0/twiga/models/nn/net/mlpfgam.py +468 -0
  315. twiga-0.1.0/twiga/models/nn/net/nhits.py +723 -0
  316. twiga-0.1.0/twiga/models/nn/net/rnn.py +257 -0
  317. twiga-0.1.0/twiga/models/nn/nhits_model.py +306 -0
  318. twiga-0.1.0/twiga/models/nn/nhitsbeta_model.py +98 -0
  319. twiga-0.1.0/twiga/models/nn/nhitscrc_model.py +122 -0
  320. twiga-0.1.0/twiga/models/nn/nhitsgamma_model.py +98 -0
  321. twiga-0.1.0/twiga/models/nn/nhitslaplace_model.py +98 -0
  322. twiga-0.1.0/twiga/models/nn/nhitslognormal_model.py +98 -0
  323. twiga-0.1.0/twiga/models/nn/nhitsnormal_model.py +98 -0
  324. twiga-0.1.0/twiga/models/nn/nhitsqr_model.py +239 -0
  325. twiga-0.1.0/twiga/models/nn/nhitsstudentt_model.py +101 -0
  326. twiga-0.1.0/twiga/models/nn/prob/__init__.py +81 -0
  327. twiga-0.1.0/twiga/models/nn/prob/core.py +201 -0
  328. twiga-0.1.0/twiga/models/nn/prob/mlpf_crc.py +120 -0
  329. twiga-0.1.0/twiga/models/nn/prob/mlpf_parametric.py +456 -0
  330. twiga-0.1.0/twiga/models/nn/prob/mlpffpqr.py +144 -0
  331. twiga-0.1.0/twiga/models/nn/prob/mlpfqr.py +143 -0
  332. twiga-0.1.0/twiga/models/nn/prob/mlpgaf_crc.py +130 -0
  333. twiga-0.1.0/twiga/models/nn/prob/mlpgaf_parametric.py +499 -0
  334. twiga-0.1.0/twiga/models/nn/prob/mlpgaffpqr.py +162 -0
  335. twiga-0.1.0/twiga/models/nn/prob/mlpgafqr.py +162 -0
  336. twiga-0.1.0/twiga/models/nn/prob/mlpgam_crc.py +118 -0
  337. twiga-0.1.0/twiga/models/nn/prob/mlpgam_parametric.py +453 -0
  338. twiga-0.1.0/twiga/models/nn/prob/mlpgamfpqr.py +143 -0
  339. twiga-0.1.0/twiga/models/nn/prob/mlpgamqr.py +142 -0
  340. twiga-0.1.0/twiga/models/nn/prob/nhits_crc.py +107 -0
  341. twiga-0.1.0/twiga/models/nn/prob/nhits_parametric.py +412 -0
  342. twiga-0.1.0/twiga/models/nn/prob/nhitsfpqr.py +132 -0
  343. twiga-0.1.0/twiga/models/nn/prob/nhitsqr.py +131 -0
  344. twiga-0.1.0/twiga/models/nn/prob/rnn_parametric.py +500 -0
  345. twiga-0.1.0/twiga/models/nn/prob/rnn_qr.py +242 -0
  346. twiga-0.1.0/twiga/models/nn/rnn_model.py +159 -0
  347. twiga-0.1.0/twiga/models/nn/rnnbeta_model.py +108 -0
  348. twiga-0.1.0/twiga/models/nn/rnngamma_model.py +108 -0
  349. twiga-0.1.0/twiga/models/nn/rnnlaplace_model.py +108 -0
  350. twiga-0.1.0/twiga/models/nn/rnnlognormal_model.py +108 -0
  351. twiga-0.1.0/twiga/models/nn/rnnnormal_model.py +108 -0
  352. twiga-0.1.0/twiga/models/nn/rnnqr_model.py +251 -0
  353. twiga-0.1.0/twiga/models/nn/rnnstudentt_model.py +108 -0
  354. twiga-0.1.0/twiga/pipeline/__init__.py +52 -0
  355. twiga-0.1.0/twiga/pipeline/flows.py +441 -0
  356. twiga-0.1.0/twiga/pipeline/schemas.py +98 -0
  357. twiga-0.1.0/twiga/pipeline/tasks.py +350 -0
  358. twiga-0.1.0/twiga/serve/__init__.py +41 -0
  359. twiga-0.1.0/twiga/serve/app.py +408 -0
  360. twiga-0.1.0/twiga/serve/loader.py +174 -0
  361. twiga-0.1.0/twiga/serve/monitor.py +462 -0
  362. twiga-0.1.0/twiga/serve/schemas.py +263 -0
  363. twiga-0.1.0/twiga/tracking/__init__.py +22 -0
  364. twiga-0.1.0/twiga/tracking/tracker.py +314 -0
  365. twiga-0.1.0/twiga/utils/__init__.py +7 -0
  366. twiga-0.1.0/twiga/utils/data_loading.py +281 -0
  367. twiga-0.1.0/twiga/utils/run_forecast.py +757 -0
  368. twiga-0.1.0/twiga/utils/utils.py +36 -0
@@ -0,0 +1,6 @@
1
+ [run]
2
+ omit =
3
+ twiga/core/plot/*
4
+ */__init__.py
5
+ twiga/pipeline/flows.py
6
+ twiga/pipeline/tasks.py
twiga-0.1.0/.gitignore ADDED
@@ -0,0 +1,140 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+
12
+
13
+ # PyInstaller
14
+ # Usually these files are written by a python script from a template
15
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
16
+ *.manifest
17
+ *.spec
18
+
19
+ # Installer logs
20
+ pip-log.txt
21
+ pip-delete-this-directory.txt
22
+
23
+ # Unit test / coverage reports
24
+ htmlcov/
25
+ .tox/
26
+ .nox/
27
+ .coverage
28
+ .coverage.*
29
+ .cache
30
+ nosetests.xml
31
+ coverage.xml
32
+ *.cover
33
+ *.py,cover
34
+ .hypothesis/
35
+ .pytest_cache/
36
+ .ruff_cache/
37
+ pytestdebug.log
38
+ cover/
39
+
40
+ # Translations
41
+ *.mo
42
+ *.pot
43
+
44
+ # Sphinx documentation
45
+ docs/_build/
46
+
47
+ # PyBuilder
48
+ .pybuilder/
49
+ target/
50
+
51
+ # Jupyter Notebook
52
+ .ipynb_checkpoints
53
+
54
+ # IPython
55
+ profile_default/
56
+ ipython_config.py
57
+
58
+
59
+ # UV
60
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
61
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
62
+ # commonly ignored for libraries.
63
+ uv.lock
64
+
65
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
66
+ __pypackages__/
67
+
68
+ # VS Code
69
+ # The following files are specific to Visual Studio Code
70
+ .vscode/
71
+
72
+ # Jetbrains IDEs
73
+ # The following files are specific to Jetbrains IDEs
74
+ .idea/
75
+
76
+ # PyPI configuration file
77
+ .pypirc
78
+
79
+
80
+ # extra files
81
+ *.DS_Store
82
+ *.log
83
+
84
+ # Sphinx build output
85
+ docs_sphinx/_build/
86
+
87
+ # ── Twiga runtime outputs ────────────────────────────────────────────────────
88
+
89
+ # Model checkpoints (joblib pickles + manifest)
90
+ checkpoints/
91
+ **/checkpoints/
92
+ _checkpoint_manifest.json
93
+ *.pkl
94
+
95
+ # MLflow tracking store (local file-based backend)
96
+ mlruns/
97
+ mlartifacts/
98
+ mlflow.db
99
+ mlflow-artifacts/
100
+
101
+ # Optuna SQLite study databases
102
+ *.db
103
+ optuna_studies/
104
+
105
+ # CatBoost training artefacts
106
+ catboost_info/
107
+ learn_error.tsv
108
+ test_error.tsv
109
+ catboost_training.json
110
+ time_left.tsv
111
+ *.cbm
112
+ *.cb
113
+
114
+ # Evidently HTML drift / performance reports
115
+ reports/
116
+ **/reports/
117
+ data_drift_*.html
118
+ model_performance_*.html
119
+
120
+ # Prefect local storage
121
+ .prefect/
122
+ prefect-storage/
123
+
124
+ # Twiga project output directories (created by ForecasterConfig)
125
+ logs/
126
+ results/
127
+ figures/
128
+
129
+ # Tutorial / notebook generated artefacts
130
+ examples/lets-plot-images/
131
+ examples/checkpoints/
132
+ examples/logs/
133
+ examples/results/
134
+ examples/figures/
135
+ examples/tutorials/mlruns/
136
+ examples/tutorials/mlops_demo/
137
+ **/mlops_demo/
138
+
139
+ # Generated serving scripts written by notebooks
140
+ serve.py
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,144 @@
1
+ {
2
+ "version": "1.5.0",
3
+ "plugins_used": [
4
+ {
5
+ "name": "ArtifactoryDetector"
6
+ },
7
+ {
8
+ "name": "AWSKeyDetector"
9
+ },
10
+ {
11
+ "name": "AzureStorageKeyDetector"
12
+ },
13
+ {
14
+ "name": "Base64HighEntropyString",
15
+ "limit": 4.5
16
+ },
17
+ {
18
+ "name": "BasicAuthDetector"
19
+ },
20
+ {
21
+ "name": "CloudantDetector"
22
+ },
23
+ {
24
+ "name": "DiscordBotTokenDetector"
25
+ },
26
+ {
27
+ "name": "GitHubTokenDetector"
28
+ },
29
+ {
30
+ "name": "GitLabTokenDetector"
31
+ },
32
+ {
33
+ "name": "HexHighEntropyString",
34
+ "limit": 3.0
35
+ },
36
+ {
37
+ "name": "IbmCloudIamDetector"
38
+ },
39
+ {
40
+ "name": "IbmCosHmacDetector"
41
+ },
42
+ {
43
+ "name": "IPPublicDetector"
44
+ },
45
+ {
46
+ "name": "JwtTokenDetector"
47
+ },
48
+ {
49
+ "name": "KeywordDetector",
50
+ "keyword_exclude": ""
51
+ },
52
+ {
53
+ "name": "MailchimpDetector"
54
+ },
55
+ {
56
+ "name": "NpmDetector"
57
+ },
58
+ {
59
+ "name": "OpenAIDetector"
60
+ },
61
+ {
62
+ "name": "PrivateKeyDetector"
63
+ },
64
+ {
65
+ "name": "PypiTokenDetector"
66
+ },
67
+ {
68
+ "name": "SendGridDetector"
69
+ },
70
+ {
71
+ "name": "SlackDetector"
72
+ },
73
+ {
74
+ "name": "SoftlayerDetector"
75
+ },
76
+ {
77
+ "name": "SquareOAuthDetector"
78
+ },
79
+ {
80
+ "name": "StripeDetector"
81
+ },
82
+ {
83
+ "name": "TelegramBotTokenDetector"
84
+ },
85
+ {
86
+ "name": "TwilioKeyDetector"
87
+ }
88
+ ],
89
+ "filters_used": [
90
+ {
91
+ "path": "detect_secrets.filters.allowlist.is_line_allowlisted"
92
+ },
93
+ {
94
+ "path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
95
+ "min_level": 2
96
+ },
97
+ {
98
+ "path": "detect_secrets.filters.heuristic.is_indirect_reference"
99
+ },
100
+ {
101
+ "path": "detect_secrets.filters.heuristic.is_likely_id_string"
102
+ },
103
+ {
104
+ "path": "detect_secrets.filters.heuristic.is_lock_file"
105
+ },
106
+ {
107
+ "path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
108
+ },
109
+ {
110
+ "path": "detect_secrets.filters.heuristic.is_potential_uuid"
111
+ },
112
+ {
113
+ "path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
114
+ },
115
+ {
116
+ "path": "detect_secrets.filters.heuristic.is_sequential_string"
117
+ },
118
+ {
119
+ "path": "detect_secrets.filters.heuristic.is_swagger_file"
120
+ },
121
+ {
122
+ "path": "detect_secrets.filters.heuristic.is_templated_secret"
123
+ },
124
+ {
125
+ "path": "detect_secrets.filters.regex.should_exclude_file",
126
+ "pattern": [
127
+ "uv\\.lock",
128
+ "\\.ipynb$"
129
+ ]
130
+ }
131
+ ],
132
+ "results": {
133
+ "docs/mlops/serving.md": [
134
+ {
135
+ "type": "Secret Keyword",
136
+ "filename": "docs/mlops/serving.md",
137
+ "hashed_secret": "a761ce3a45d97e41840a788495e85a70d1bb3815",
138
+ "is_verified": false,
139
+ "line_number": 39
140
+ }
141
+ ]
142
+ },
143
+ "generated_at": "2026-04-19T06:51:19Z"
144
+ }
@@ -0,0 +1,150 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## v0.1.0 (2026-04-19)
6
+
7
+ ### Feat
8
+
9
+ - **nn**: add probabilistic RNN distribution variants with tests
10
+ - MLOps pipeline, serving layer, and core analytics improvements (#16)
11
+ - add AMI, signal characterisation, context parrot model, and fix Prefect test infrastructure
12
+ - add MLOps Streamlit dashboard, docs overhaul, and core improvements
13
+ - add MLOps docs, tutorial 17, and update gitignore
14
+ - align MLOps modules to production best practices
15
+ - add PyPI publish and Sphinx docs workflows (#15)
16
+ - add PyPI publish and Sphinx docs workflows
17
+ - add NGBoost probabilistic ML models (Normal, LogNormal, Exponential)
18
+ - update experiment code with feature selection
19
+ - update ganf step with sigma loss
20
+ - format README file
21
+ - update forecaster base to handle prediction scaling with different format
22
+ - update base quantiles
23
+ - fix quantile lightgm
24
+ - fix quantile lightgm
25
+ - add quantile ml
26
+ - add basequantile for ml models
27
+ - update pv notebook
28
+ - **stats**: add MSTL-based get_trend_seasonality for multi-period decomposition
29
+ - **metrics**: add Giacomini-White test; upgrade DM to 2D multivariate/univariate
30
+ - **metrics**: implement missing point, interval, quantile, and probabilistic metrics
31
+ - add security scanning (bandit, detect-secrets, CodeQL, pip-audit, Dependabot)
32
+ - MLOps pipeline, serving layer, and core analytics improvements (#16)
33
+ - add PyPI publish and Sphinx docs workflows (#15)
34
+ - add AMI, signal characterisation, context parrot model, and fix Prefect test infrastructure
35
+ - add MLOps Streamlit dashboard, docs overhaul, and core improvements
36
+ - add MLOps docs, tutorial 17, and update gitignore
37
+ - align MLOps modules to production best practices
38
+ - add PyPI publish and Sphinx docs workflows
39
+ - add NGBoost probabilistic ML models (Normal, LogNormal, Exponential)
40
+ - update experiment code with feature selection
41
+ - update ganf step with sigma loss
42
+ - format README file
43
+ - update forecaster base to handle prediction scaling with different format
44
+ - update base quantiles
45
+ - fix quantile lightgm
46
+ - fix quantile lightgm
47
+ - add quantile ml
48
+ - add basequantile for ml models
49
+ - update pv notebook
50
+ - add neural-net models and refine twiga forecaster
51
+ - add neural-net models and refine twiga forecaster
52
+
53
+ ### Fix
54
+
55
+ - strip editable entry from uv export before pip-audit
56
+ - clean up CI workflow and pytest config
57
+ - align pre-commit default_language_version to python3.12
58
+ - update ForecastMonitor to use Evidently Snapshot API
59
+ - on_save_checkpoint now returns the checkpoint directory path
60
+ - handle RawPrediction in build_forecast_result, get_prediction_array, and calibrate
61
+ - auto-register lag/window columns in DataPipeline and handle RawPrediction in _run_predictions
62
+ - resolve test failures from full suite run
63
+ - replace deprecated np.trapz with np.trapezoid for NumPy 2.0 compatibility
64
+ - failed unit test and ty check
65
+ - clean examples folders
66
+ - baselines and tutorials (#13)
67
+ - baselines and tutorials
68
+ - upadte github action and prehook
69
+ - upadte github action
70
+ - guard logs_path None check in create_optuna_study
71
+ - align FPQRDistribution.forecast() with pipeline and add notebook example
72
+ - delegate ProbabilisticNetwork.forecast() to head.forecast() for QR models
73
+ - fix pytorch bug when loading qr model, and refactor evaluate module in forecaster while updating notebook tutorilas and other bugs
74
+ - update readme for cuda installation
75
+ - remove test.notebook
76
+ - failed test
77
+ - failed test
78
+ - git actions by creating separate prehook config for remote repo
79
+ - remove run myv --check from test-and-lint job
80
+ - remove invalid uv lock --check from test-and-lint job
81
+ - update pre-commit stage names to modern syntax
82
+ - merge the update with main and update the code
83
+ - **docs**: use lvert/rvert in medae docstring to avoid docutils substitution parse error
84
+ - **metrics**: correct GW inner function return type; add GW autofunction to Sphinx page
85
+ - convert NumPy-style docstrings to Google style in feature.py
86
+ - resolve all Sphinx build warnings and commitizen release failure
87
+ - update models page
88
+ - remove TwigaSettings from core/config eager import path
89
+ - lazy-import ShapExplainer to allow import twiga without shap extra
90
+ - context parrot num_targets, lazy lets_plot import, base update override, docs cleanup
91
+ - store feature names in ML regressors to eliminate sklearn mismatch warnings
92
+ - guard optional deps so bare install no longer crashes on import
93
+ - issue on creating timestap sequences
94
+ - issue on creating timestap sequences
95
+ - update uv smoke test on publish action rc6
96
+ - update uv smoke test on publish action
97
+ - update uv smoke test on publish action
98
+ - update uv smoke test on publish action
99
+ - update uv tags on publish action
100
+ - failure github actions for publishing on pypi
101
+ - failure github actions for publishing on pypi
102
+ - failure github actions for publishing library on pypi
103
+ - github actions for publishing library on pypi and tomly
104
+ - github actions for publishing library on pypi
105
+ - github actions for publishing library on pypi
106
+ - update doc_compilation github action and fix issues on doc compilation
107
+ - update pydantic config and fix issues on doc compilation
108
+ - fix all issue on sphinix docs
109
+ - resolve doc-publish CI failures — circular import and RST math syntax
110
+ - clean up CI workflow and pytest config
111
+ - align pre-commit default_language_version to python3.12
112
+ - update ForecastMonitor to use Evidently Snapshot API
113
+ - on_save_checkpoint now returns the checkpoint directory path
114
+ - handle RawPrediction in build_forecast_result, get_prediction_array, and calibrate
115
+ - auto-register lag/window columns in DataPipeline and handle RawPrediction in _run_predictions
116
+ - resolve test failures from full suite run
117
+ - replace deprecated np.trapz with np.trapezoid for NumPy 2.0 compatibility
118
+ - failed unit test and ty check
119
+ - clean examples folders
120
+ - baselines and tutorials (#13)
121
+ - baselines and tutorials
122
+ - upadte github action and prehook
123
+ - upadte github action
124
+ - guard logs_path None check in create_optuna_study
125
+ - align FPQRDistribution.forecast() with pipeline and add notebook example
126
+ - delegate ProbabilisticNetwork.forecast() to head.forecast() for QR models
127
+ - fix pytorch bug when loading qr model, and refactor evaluate module in forecaster while updating notebook tutorilas and other bugs
128
+ - update readme for cuda installation
129
+ - remove test.notebook
130
+ - failed test
131
+ - failed test
132
+ - git actions by creating separate prehook config for remote repo
133
+ - remove run myv --check from test-and-lint job
134
+ - remove invalid uv lock --check from test-and-lint job
135
+ - update pre-commit stage names to modern syntax
136
+ - merge the update with main and update the code
137
+
138
+ ### Refactor
139
+
140
+ - remove legacy utils, add GANF experiments and paper notebooks
141
+ - modularise plot/stats, add feature intelligence, replace mypy with ty
142
+ - modernise XGBoost/LightGBM models with eval_set and best-practice configs
143
+ - replace two-stage Gaussian CatBoost with RMSEWithUncertainty
144
+ - move CharacterisationConfig to core/config, re-export TwigaSettings from core/config
145
+ - merge torch/lightning extras into nn group, clarify public API
146
+ - code quality — null checks, override decorators, naming, cleanup
147
+ - remove legacy utils, add GANF experiments and paper notebooks
148
+ - modularise plot/stats, add feature intelligence, replace mypy with ty
149
+ - modernise XGBoost/LightGBM models with eval_set and best-practice configs
150
+ - replace two-stage Gaussian CatBoost with RMSEWithUncertainty
twiga-0.1.0/LICENSE ADDED
@@ -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.