tributo-algorithms 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.
- tributo_algorithms-0.1.0/.gitignore +10 -0
- tributo_algorithms-0.1.0/LICENSE +202 -0
- tributo_algorithms-0.1.0/PKG-INFO +328 -0
- tributo_algorithms-0.1.0/README.md +210 -0
- tributo_algorithms-0.1.0/packages/boosting/src/tributo_algorithms_boosting/__init__.py +42 -0
- tributo_algorithms-0.1.0/packages/boosting/src/tributo_algorithms_boosting/algorithm.py +825 -0
- tributo_algorithms-0.1.0/packages/boosting/src/tributo_algorithms_boosting/checkpointing.py +441 -0
- tributo_algorithms-0.1.0/packages/boosting/src/tributo_algorithms_boosting/contracts.py +232 -0
- tributo_algorithms-0.1.0/packages/boosting/src/tributo_algorithms_boosting/data_config.py +59 -0
- tributo_algorithms-0.1.0/packages/boosting/src/tributo_algorithms_boosting/descriptor.py +124 -0
- tributo_algorithms-0.1.0/packages/boosting/src/tributo_algorithms_boosting/lightgbm.py +511 -0
- tributo_algorithms-0.1.0/packages/boosting/src/tributo_algorithms_boosting/lightgbm_contracts.py +186 -0
- tributo_algorithms-0.1.0/packages/boosting/src/tributo_algorithms_boosting/lightgbm_descriptor.py +112 -0
- tributo_algorithms-0.1.0/packages/boosting/src/tributo_algorithms_boosting/native.py +557 -0
- tributo_algorithms-0.1.0/packages/boosting/src/tributo_algorithms_boosting/stages.py +150 -0
- tributo_algorithms-0.1.0/packages/catboost/src/tributo_algorithms_catboost/__init__.py +5 -0
- tributo_algorithms-0.1.0/packages/catboost/src/tributo_algorithms_catboost/algorithm.py +379 -0
- tributo_algorithms-0.1.0/packages/catboost/src/tributo_algorithms_catboost/contracts.py +145 -0
- tributo_algorithms-0.1.0/packages/catboost/src/tributo_algorithms_catboost/descriptor.py +121 -0
- tributo_algorithms-0.1.0/packages/catboost/src/tributo_algorithms_catboost/exporter.py +106 -0
- tributo_algorithms-0.1.0/packages/catboost/src/tributo_algorithms_catboost/flavor.py +191 -0
- tributo_algorithms-0.1.0/packages/causal-core/src/tributo_algorithms_causal_core/__init__.py +41 -0
- tributo_algorithms-0.1.0/packages/causal-core/src/tributo_algorithms_causal_core/algorithm.py +1193 -0
- tributo_algorithms-0.1.0/packages/causal-core/src/tributo_algorithms_causal_core/contracts.py +136 -0
- tributo_algorithms-0.1.0/packages/causal-core/src/tributo_algorithms_causal_core/descriptor.py +270 -0
- tributo_algorithms-0.1.0/packages/causal-core/src/tributo_algorithms_causal_core/exporter.py +52 -0
- tributo_algorithms-0.1.0/packages/causal-discovery/src/tributo_algorithms_causal_discovery/__init__.py +23 -0
- tributo_algorithms-0.1.0/packages/causal-discovery/src/tributo_algorithms_causal_discovery/algorithm.py +526 -0
- tributo_algorithms-0.1.0/packages/causal-discovery/src/tributo_algorithms_causal_discovery/contracts.py +97 -0
- tributo_algorithms-0.1.0/packages/causal-discovery/src/tributo_algorithms_causal_discovery/descriptor.py +130 -0
- tributo_algorithms-0.1.0/packages/causal-discovery/src/tributo_algorithms_causal_discovery/exporter.py +43 -0
- tributo_algorithms-0.1.0/packages/causal-dowhy/src/tributo_algorithms_causal_dowhy/__init__.py +38 -0
- tributo_algorithms-0.1.0/packages/causal-dowhy/src/tributo_algorithms_causal_dowhy/algorithm.py +325 -0
- tributo_algorithms-0.1.0/packages/causal-dowhy/src/tributo_algorithms_causal_dowhy/contracts.py +209 -0
- tributo_algorithms-0.1.0/packages/causal-dowhy/src/tributo_algorithms_causal_dowhy/descriptor.py +106 -0
- tributo_algorithms-0.1.0/packages/causal-dowhy/src/tributo_algorithms_causal_dowhy/exporter.py +43 -0
- tributo_algorithms-0.1.0/packages/causal-dowhy/src/tributo_algorithms_causal_dowhy/gcm.py +634 -0
- tributo_algorithms-0.1.0/packages/causal-dowhy/src/tributo_algorithms_causal_dowhy/gcm_descriptor.py +110 -0
- tributo_algorithms-0.1.0/packages/causal-dr/src/tributo_algorithms_causal_dr/__init__.py +22 -0
- tributo_algorithms-0.1.0/packages/causal-dr/src/tributo_algorithms_causal_dr/algorithm.py +446 -0
- tributo_algorithms-0.1.0/packages/causal-dr/src/tributo_algorithms_causal_dr/contracts.py +94 -0
- tributo_algorithms-0.1.0/packages/causal-dr/src/tributo_algorithms_causal_dr/descriptor.py +104 -0
- tributo_algorithms-0.1.0/packages/causal-xlearner/src/tributo_algorithms_causal_xlearner/__init__.py +29 -0
- tributo_algorithms-0.1.0/packages/causal-xlearner/src/tributo_algorithms_causal_xlearner/algorithm.py +448 -0
- tributo_algorithms-0.1.0/packages/causal-xlearner/src/tributo_algorithms_causal_xlearner/contracts.py +97 -0
- tributo_algorithms-0.1.0/packages/causal-xlearner/src/tributo_algorithms_causal_xlearner/descriptor.py +120 -0
- tributo_algorithms-0.1.0/packages/causal-xlearner/src/tributo_algorithms_causal_xlearner/exporter.py +432 -0
- tributo_algorithms-0.1.0/packages/causal-xlearner/src/tributo_algorithms_causal_xlearner/flavor.py +120 -0
- tributo_algorithms-0.1.0/packages/causal-xlearner/src/tributo_algorithms_causal_xlearner/model.py +116 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/__init__.py +41 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/contracts.py +139 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/descriptors.py +370 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/exporter.py +166 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/isolation_forest.py +172 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/isolation_forest_descriptor.py +122 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/kmeans.py +315 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/kmeans_descriptor.py +147 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/linear_regression.py +206 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/logistic_regression.py +238 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/models.py +28 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/multinomial_nb.py +643 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/multinomial_nb_descriptor.py +183 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/pca.py +187 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/pca_descriptor.py +111 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/random_forest.py +304 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/sgd.py +331 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/sgd_contracts.py +121 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/sgd_descriptor.py +143 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/unsupervised_contracts.py +198 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/unsupervised_exporter.py +427 -0
- tributo_algorithms-0.1.0/packages/classical/src/tributo_algorithms_classical/unsupervised_models.py +90 -0
- tributo_algorithms-0.1.0/packages/graph-pyg/src/tributo_algorithms_graph_pyg/__init__.py +37 -0
- tributo_algorithms-0.1.0/packages/graph-pyg/src/tributo_algorithms_graph_pyg/algorithm.py +883 -0
- tributo_algorithms-0.1.0/packages/graph-pyg/src/tributo_algorithms_graph_pyg/contracts.py +260 -0
- tributo_algorithms-0.1.0/packages/graph-pyg/src/tributo_algorithms_graph_pyg/descriptor.py +201 -0
- tributo_algorithms-0.1.0/packages/multistage-torch/src/tributo_algorithms_multistage_torch/__init__.py +40 -0
- tributo_algorithms-0.1.0/packages/multistage-torch/src/tributo_algorithms_multistage_torch/algorithm.py +532 -0
- tributo_algorithms-0.1.0/packages/multistage-torch/src/tributo_algorithms_multistage_torch/contracts.py +220 -0
- tributo_algorithms-0.1.0/packages/multistage-torch/src/tributo_algorithms_multistage_torch/descriptor.py +146 -0
- tributo_algorithms-0.1.0/packages/multistage-torch/src/tributo_algorithms_multistage_torch/pretrain.py +570 -0
- tributo_algorithms-0.1.0/packages/multistage-torch/src/tributo_algorithms_multistage_torch/pretrain_descriptor.py +153 -0
- tributo_algorithms-0.1.0/packages/recsys-torch/src/tributo_algorithms_recsys_torch/__init__.py +35 -0
- tributo_algorithms-0.1.0/packages/recsys-torch/src/tributo_algorithms_recsys_torch/contracts.py +295 -0
- tributo_algorithms-0.1.0/packages/recsys-torch/src/tributo_algorithms_recsys_torch/descriptor.py +136 -0
- tributo_algorithms-0.1.0/packages/recsys-torch/src/tributo_algorithms_recsys_torch/jagged.py +707 -0
- tributo_algorithms-0.1.0/packages/recsys-torch/src/tributo_algorithms_recsys_torch/jagged_descriptor.py +130 -0
- tributo_algorithms-0.1.0/packages/recsys-torch/src/tributo_algorithms_recsys_torch/recipe.py +192 -0
- tributo_algorithms-0.1.0/packages/representation/src/tributo_algorithms_representation/__init__.py +20 -0
- tributo_algorithms-0.1.0/packages/representation/src/tributo_algorithms_representation/contracts.py +117 -0
- tributo_algorithms-0.1.0/packages/representation/src/tributo_algorithms_representation/descriptor.py +137 -0
- tributo_algorithms-0.1.0/packages/representation/src/tributo_algorithms_representation/recipe.py +162 -0
- tributo_algorithms-0.1.0/packages/tabular-torch/src/tributo_algorithms_tabular_torch/__init__.py +46 -0
- tributo_algorithms-0.1.0/packages/tabular-torch/src/tributo_algorithms_tabular_torch/contracts.py +228 -0
- tributo_algorithms-0.1.0/packages/tabular-torch/src/tributo_algorithms_tabular_torch/descriptor.py +223 -0
- tributo_algorithms-0.1.0/packages/tabular-torch/src/tributo_algorithms_tabular_torch/priors.py +216 -0
- tributo_algorithms-0.1.0/packages/tabular-torch/src/tributo_algorithms_tabular_torch/pu_metrics.py +269 -0
- tributo_algorithms-0.1.0/packages/tabular-torch/src/tributo_algorithms_tabular_torch/pu_reducer.py +129 -0
- tributo_algorithms-0.1.0/packages/tabular-torch/src/tributo_algorithms_tabular_torch/recipe.py +294 -0
- tributo_algorithms-0.1.0/packages/timeseries/src/tributo_algorithms_timeseries/__init__.py +36 -0
- tributo_algorithms-0.1.0/packages/timeseries/src/tributo_algorithms_timeseries/contracts.py +120 -0
- tributo_algorithms-0.1.0/packages/timeseries/src/tributo_algorithms_timeseries/descriptor.py +137 -0
- tributo_algorithms-0.1.0/packages/timeseries/src/tributo_algorithms_timeseries/recipe.py +195 -0
- tributo_algorithms-0.1.0/packages/timeseries/src/tributo_algorithms_timeseries/rnn_contracts.py +170 -0
- tributo_algorithms-0.1.0/packages/timeseries/src/tributo_algorithms_timeseries/rnn_descriptor.py +167 -0
- tributo_algorithms-0.1.0/packages/timeseries/src/tributo_algorithms_timeseries/rnn_recipe.py +223 -0
- tributo_algorithms-0.1.0/packages/transformers-nlp/src/tributo_algorithms_transformers_nlp/__init__.py +20 -0
- tributo_algorithms-0.1.0/packages/transformers-nlp/src/tributo_algorithms_transformers_nlp/contracts.py +109 -0
- tributo_algorithms-0.1.0/packages/transformers-nlp/src/tributo_algorithms_transformers_nlp/descriptor.py +137 -0
- tributo_algorithms-0.1.0/packages/transformers-nlp/src/tributo_algorithms_transformers_nlp/recipe.py +235 -0
- tributo_algorithms-0.1.0/pyproject.toml +256 -0
- tributo_algorithms-0.1.0/scripts/resolve_release_package.py +75 -0
- tributo_algorithms-0.1.0/scripts/verify_installed_distribution.py +157 -0
- tributo_algorithms-0.1.0/tests/jobs/xgboost_worker_gate.py +847 -0
- tributo_algorithms-0.1.0/tests/test_boosting_algorithm.py +217 -0
- tributo_algorithms-0.1.0/tests/test_catboost_algorithm.py +236 -0
- tributo_algorithms-0.1.0/tests/test_causal_core_algorithm.py +411 -0
- tributo_algorithms-0.1.0/tests/test_causal_discovery_algorithm.py +165 -0
- tributo_algorithms-0.1.0/tests/test_causal_dowhy_algorithm.py +32 -0
- tributo_algorithms-0.1.0/tests/test_causal_dr_algorithm.py +80 -0
- tributo_algorithms-0.1.0/tests/test_causal_gcm_algorithm.py +155 -0
- tributo_algorithms-0.1.0/tests/test_causal_xlearner_algorithm.py +238 -0
- tributo_algorithms-0.1.0/tests/test_ci_release_contract.py +204 -0
- tributo_algorithms-0.1.0/tests/test_classical_algorithms.py +270 -0
- tributo_algorithms-0.1.0/tests/test_classical_new_algorithms.py +192 -0
- tributo_algorithms-0.1.0/tests/test_classical_unsupervised.py +215 -0
- tributo_algorithms-0.1.0/tests/test_graph_pyg_algorithm.py +437 -0
- tributo_algorithms-0.1.0/tests/test_jagged_recsys_algorithm.py +241 -0
- tributo_algorithms-0.1.0/tests/test_lightgbm_algorithm.py +167 -0
- tributo_algorithms-0.1.0/tests/test_multistage_torch_algorithm.py +212 -0
- tributo_algorithms-0.1.0/tests/test_package_conformance.py +93 -0
- tributo_algorithms-0.1.0/tests/test_pretrain_finetune_algorithm.py +225 -0
- tributo_algorithms-0.1.0/tests/test_pu_metrics.py +34 -0
- tributo_algorithms-0.1.0/tests/test_pu_priors.py +31 -0
- tributo_algorithms-0.1.0/tests/test_recsys_torch_algorithm.py +154 -0
- tributo_algorithms-0.1.0/tests/test_representation_algorithm.py +92 -0
- tributo_algorithms-0.1.0/tests/test_tabular_torch_algorithms.py +390 -0
- tributo_algorithms-0.1.0/tests/test_timeseries_algorithm.py +104 -0
- tributo_algorithms-0.1.0/tests/test_timeseries_rnn.py +111 -0
- tributo_algorithms-0.1.0/tests/test_torch_contract_identity.py +371 -0
- tributo_algorithms-0.1.0/tests/test_transformer_algorithm.py +135 -0
- tributo_algorithms-0.1.0/tests/test_xgboost_checkpointing.py +698 -0
- tributo_algorithms-0.1.0/tests/test_xgboost_training.py +519 -0
- tributo_algorithms-0.1.0/tests/test_xgboost_validation.py +431 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2026 jiangxt2
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tributo-algorithms
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Official algorithm implementations and optional dependency extras for Tributo
|
|
5
|
+
Author: Tributo Contributors
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
12
|
+
Requires-Python: <3.14,>=3.12
|
|
13
|
+
Requires-Dist: tributo>=1.2
|
|
14
|
+
Provides-Extra: all
|
|
15
|
+
Requires-Dist: catboost<2,>=1.2; extra == 'all'
|
|
16
|
+
Requires-Dist: causal-learn<0.2,>=0.1.4; extra == 'all'
|
|
17
|
+
Requires-Dist: dowhy<0.15,>=0.14; extra == 'all'
|
|
18
|
+
Requires-Dist: lightgbm<5,>=4.5; extra == 'all'
|
|
19
|
+
Requires-Dist: networkx>=3.0; extra == 'all'
|
|
20
|
+
Requires-Dist: numpy<3,>=2; extra == 'all'
|
|
21
|
+
Requires-Dist: onnx>=1.16; extra == 'all'
|
|
22
|
+
Requires-Dist: onnxmltools>=1.13; extra == 'all'
|
|
23
|
+
Requires-Dist: onnxruntime>=1.20; extra == 'all'
|
|
24
|
+
Requires-Dist: safetensors>=0.4.3; extra == 'all'
|
|
25
|
+
Requires-Dist: scikit-learn<2,>=1.4; extra == 'all'
|
|
26
|
+
Requires-Dist: scipy<2,>=1.12; extra == 'all'
|
|
27
|
+
Requires-Dist: skl2onnx>=1.17; extra == 'all'
|
|
28
|
+
Requires-Dist: torch-geometric>=2.5; extra == 'all'
|
|
29
|
+
Requires-Dist: torch<2.14,>=2.5; extra == 'all'
|
|
30
|
+
Requires-Dist: tributo[model-export-torch]>=1.2; extra == 'all'
|
|
31
|
+
Requires-Dist: tributo[model-export]>=1.2; extra == 'all'
|
|
32
|
+
Requires-Dist: xgboost<4,>=2.1; extra == 'all'
|
|
33
|
+
Provides-Extra: boosting
|
|
34
|
+
Requires-Dist: lightgbm<5,>=4.5; extra == 'boosting'
|
|
35
|
+
Requires-Dist: onnxmltools>=1.13; extra == 'boosting'
|
|
36
|
+
Requires-Dist: scikit-learn<2,>=1.4; extra == 'boosting'
|
|
37
|
+
Requires-Dist: tributo[model-export]>=1.2; extra == 'boosting'
|
|
38
|
+
Requires-Dist: xgboost<4,>=2.1; extra == 'boosting'
|
|
39
|
+
Provides-Extra: catboost
|
|
40
|
+
Requires-Dist: catboost<2,>=1.2; extra == 'catboost'
|
|
41
|
+
Requires-Dist: onnxruntime>=1.20; extra == 'catboost'
|
|
42
|
+
Provides-Extra: causal-core
|
|
43
|
+
Requires-Dist: numpy<3,>=2; extra == 'causal-core'
|
|
44
|
+
Requires-Dist: scikit-learn<2,>=1.4; extra == 'causal-core'
|
|
45
|
+
Requires-Dist: skl2onnx>=1.17; extra == 'causal-core'
|
|
46
|
+
Requires-Dist: tributo[model-export]>=1.2; extra == 'causal-core'
|
|
47
|
+
Provides-Extra: causal-discovery
|
|
48
|
+
Requires-Dist: causal-learn<0.2,>=0.1.4; extra == 'causal-discovery'
|
|
49
|
+
Requires-Dist: numpy<3,>=2; extra == 'causal-discovery'
|
|
50
|
+
Requires-Dist: onnx>=1.16; extra == 'causal-discovery'
|
|
51
|
+
Requires-Dist: onnxruntime>=1.20; extra == 'causal-discovery'
|
|
52
|
+
Provides-Extra: causal-dowhy
|
|
53
|
+
Requires-Dist: dowhy<0.15,>=0.14; extra == 'causal-dowhy'
|
|
54
|
+
Requires-Dist: networkx>=3.0; extra == 'causal-dowhy'
|
|
55
|
+
Requires-Dist: numpy<3,>=2; extra == 'causal-dowhy'
|
|
56
|
+
Requires-Dist: onnx>=1.16; extra == 'causal-dowhy'
|
|
57
|
+
Requires-Dist: onnxruntime>=1.20; extra == 'causal-dowhy'
|
|
58
|
+
Requires-Dist: scikit-learn<2,>=1.4; extra == 'causal-dowhy'
|
|
59
|
+
Requires-Dist: skl2onnx>=1.17; extra == 'causal-dowhy'
|
|
60
|
+
Requires-Dist: tributo[model-export]>=1.2; extra == 'causal-dowhy'
|
|
61
|
+
Provides-Extra: causal-dr
|
|
62
|
+
Requires-Dist: lightgbm<5,>=4.5; extra == 'causal-dr'
|
|
63
|
+
Requires-Dist: numpy<3,>=2; extra == 'causal-dr'
|
|
64
|
+
Requires-Dist: onnxmltools>=1.13; extra == 'causal-dr'
|
|
65
|
+
Requires-Dist: scikit-learn<2,>=1.4; extra == 'causal-dr'
|
|
66
|
+
Requires-Dist: skl2onnx>=1.17; extra == 'causal-dr'
|
|
67
|
+
Requires-Dist: tributo[model-export]>=1.2; extra == 'causal-dr'
|
|
68
|
+
Requires-Dist: xgboost<4,>=2.1; extra == 'causal-dr'
|
|
69
|
+
Provides-Extra: causal-xlearner
|
|
70
|
+
Requires-Dist: lightgbm<5,>=4.5; extra == 'causal-xlearner'
|
|
71
|
+
Requires-Dist: numpy<3,>=2; extra == 'causal-xlearner'
|
|
72
|
+
Requires-Dist: onnx>=1.16; extra == 'causal-xlearner'
|
|
73
|
+
Requires-Dist: onnxmltools>=1.13; extra == 'causal-xlearner'
|
|
74
|
+
Requires-Dist: onnxruntime>=1.20; extra == 'causal-xlearner'
|
|
75
|
+
Requires-Dist: tributo[model-export]>=1.2; extra == 'causal-xlearner'
|
|
76
|
+
Requires-Dist: xgboost<4,>=2.1; extra == 'causal-xlearner'
|
|
77
|
+
Provides-Extra: classical
|
|
78
|
+
Requires-Dist: numpy<3,>=2; extra == 'classical'
|
|
79
|
+
Requires-Dist: onnx>=1.16; extra == 'classical'
|
|
80
|
+
Requires-Dist: onnxruntime>=1.20; extra == 'classical'
|
|
81
|
+
Requires-Dist: scikit-learn<2,>=1.4; extra == 'classical'
|
|
82
|
+
Requires-Dist: scipy<2,>=1.12; extra == 'classical'
|
|
83
|
+
Requires-Dist: skl2onnx>=1.17; extra == 'classical'
|
|
84
|
+
Provides-Extra: graph-pyg
|
|
85
|
+
Requires-Dist: onnx>=1.16; extra == 'graph-pyg'
|
|
86
|
+
Requires-Dist: onnxruntime>=1.20; extra == 'graph-pyg'
|
|
87
|
+
Requires-Dist: safetensors>=0.4.3; extra == 'graph-pyg'
|
|
88
|
+
Requires-Dist: torch-geometric>=2.5; extra == 'graph-pyg'
|
|
89
|
+
Requires-Dist: torch<2.14,>=2.5; extra == 'graph-pyg'
|
|
90
|
+
Requires-Dist: tributo[model-export-torch]>=1.2; extra == 'graph-pyg'
|
|
91
|
+
Provides-Extra: multistage-torch
|
|
92
|
+
Requires-Dist: onnx>=1.16; extra == 'multistage-torch'
|
|
93
|
+
Requires-Dist: onnxruntime>=1.20; extra == 'multistage-torch'
|
|
94
|
+
Requires-Dist: safetensors>=0.4.3; extra == 'multistage-torch'
|
|
95
|
+
Requires-Dist: torch>=2.5; extra == 'multistage-torch'
|
|
96
|
+
Requires-Dist: tributo[model-export-torch]>=1.2; extra == 'multistage-torch'
|
|
97
|
+
Provides-Extra: recsys-torch
|
|
98
|
+
Requires-Dist: onnx>=1.16; extra == 'recsys-torch'
|
|
99
|
+
Requires-Dist: onnxruntime>=1.20; extra == 'recsys-torch'
|
|
100
|
+
Requires-Dist: torch>=2.5; extra == 'recsys-torch'
|
|
101
|
+
Requires-Dist: tributo[model-export-torch]>=1.2; extra == 'recsys-torch'
|
|
102
|
+
Provides-Extra: representation
|
|
103
|
+
Requires-Dist: onnx>=1.16; extra == 'representation'
|
|
104
|
+
Requires-Dist: onnxruntime>=1.20; extra == 'representation'
|
|
105
|
+
Requires-Dist: torch>=2.5; extra == 'representation'
|
|
106
|
+
Provides-Extra: tabular-torch
|
|
107
|
+
Requires-Dist: torch>=2.5; extra == 'tabular-torch'
|
|
108
|
+
Requires-Dist: tributo[model-export-torch]>=1.2; extra == 'tabular-torch'
|
|
109
|
+
Provides-Extra: timeseries
|
|
110
|
+
Requires-Dist: onnx>=1.16; extra == 'timeseries'
|
|
111
|
+
Requires-Dist: onnxruntime>=1.20; extra == 'timeseries'
|
|
112
|
+
Requires-Dist: torch>=2.5; extra == 'timeseries'
|
|
113
|
+
Provides-Extra: transformers-nlp
|
|
114
|
+
Requires-Dist: onnx>=1.16; extra == 'transformers-nlp'
|
|
115
|
+
Requires-Dist: onnxruntime>=1.20; extra == 'transformers-nlp'
|
|
116
|
+
Requires-Dist: torch>=2.5; extra == 'transformers-nlp'
|
|
117
|
+
Description-Content-Type: text/markdown
|
|
118
|
+
|
|
119
|
+
# Tributo Official Algorithms
|
|
120
|
+
|
|
121
|
+
This repository publishes one Python distribution, `tributo-algorithms`. The
|
|
122
|
+
Wheel contains all official algorithm descriptors and plugins; optional extras
|
|
123
|
+
install the runtime dependencies for each algorithm domain. Third-party
|
|
124
|
+
algorithms use the same public contracts and entry-point path.
|
|
125
|
+
|
|
126
|
+
Tributo Core owns Ray execution, resource allocation, retries, input leases,
|
|
127
|
+
checkpoint transport, evidence, Tune, Bundle publication, and inference. This
|
|
128
|
+
distribution owns algorithm mathematics, framework-native hooks, executable
|
|
129
|
+
contracts, and algorithm-specific delivery plugins.
|
|
130
|
+
|
|
131
|
+
| Extra | Algorithms and roles |
|
|
132
|
+
| --- | --- |
|
|
133
|
+
| `classical` | Random Forest, Extra Trees, Logistic/Linear Regression, MultinomialNB, PCA, KMeans, synchronous SGD, Isolation Forest |
|
|
134
|
+
| `boosting` | Ray Train XGBoost and LightGBM, ONNX/UBJ export, native flavor |
|
|
135
|
+
| `tabular-torch` | DNN, nnPU/uPU, PU prior and metric utilities |
|
|
136
|
+
| `timeseries` | Temporal convolution, LSTM, and GRU classification |
|
|
137
|
+
| `catboost` | Conditional distributed CatBoost ensemble |
|
|
138
|
+
| `representation` | Distributed tabular autoencoder |
|
|
139
|
+
| `transformers-nlp` | Pre-tokenized Transformer classification |
|
|
140
|
+
| `graph-pyg` | GraphSAGE and relational R-GCN |
|
|
141
|
+
| `recsys-torch` | Two-Tower and Jagged EmbeddingBag with All-to-All routing |
|
|
142
|
+
| `multistage-torch` | Distillation and pretrain-to-finetune |
|
|
143
|
+
| `causal-core` | Difference-in-means, DML, and IV |
|
|
144
|
+
| `causal-discovery` | Distributed PC stability discovery |
|
|
145
|
+
| `causal-dr` | Doubly robust/AIPW estimation |
|
|
146
|
+
| `causal-xlearner` | Five-stage X-Learner and batch CATE flavor |
|
|
147
|
+
| `causal-dowhy` | DoWhy estimation/refutation and GCM root-cause analysis |
|
|
148
|
+
|
|
149
|
+
Install only the domain dependencies you need:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
pip install "tributo-algorithms[classical]"
|
|
153
|
+
pip install "tributo-algorithms[causal-xlearner]"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Use `tributo-algorithms[all]` to install every domain extra. The base
|
|
157
|
+
distribution registers all descriptors, so discovery remains available
|
|
158
|
+
without importing the optional algorithm frameworks. Selecting an algorithm
|
|
159
|
+
requires installing its corresponding extra.
|
|
160
|
+
|
|
161
|
+
The `graph-pyg` extra currently supports Torch `>=2.5,<2.14`; `all` follows
|
|
162
|
+
the same range. PyG's module import uses TorchScript APIs deprecated in Torch
|
|
163
|
+
2.14. Other Torch extras retain their own dependency ranges.
|
|
164
|
+
|
|
165
|
+
## Core compatibility
|
|
166
|
+
|
|
167
|
+
The distribution and domain extras require Tributo Core `>=1.2` without an
|
|
168
|
+
upper version bound. The XGBoost descriptor also requires `>=1.2` for optional
|
|
169
|
+
input routing; other descriptors retain their own minimum versions. Versions
|
|
170
|
+
below 1.2 are outside this distribution's declared compatibility range.
|
|
171
|
+
An open upper bound does not certify future Core
|
|
172
|
+
releases; execution support is established by the Gate for its exact Core
|
|
173
|
+
version, algorithm Wheel, and runtime image. Lock those versions in consuming
|
|
174
|
+
projects for reproducible deployments.
|
|
175
|
+
|
|
176
|
+
## macOS arm64 with Python 3.12
|
|
177
|
+
|
|
178
|
+
DoWhy 0.14 requires SciPy `<=1.15.3` on Python 3.12. The SciPy 1.15.3 macOS 14
|
|
179
|
+
Wheel fails dynamic loader validation on affected macOS versions. The official
|
|
180
|
+
macOS 12 Wheel of the same version works on these systems. The project's uv
|
|
181
|
+
source configuration selects this Wheel for macOS arm64 with Python 3.12 and
|
|
182
|
+
records its hash in `uv.lock`.
|
|
183
|
+
|
|
184
|
+
For pip installations of `causal-dowhy` or `all` on this platform, install that
|
|
185
|
+
official SciPy Wheel before the algorithm extra:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
python -m pip install "https://files.pythonhosted.org/packages/7b/7e/f30be3d03de07f25dc0ec926d1681fed5c732d759ac8f51079708c79e680/scipy-1.15.3-cp312-cp312-macosx_12_0_arm64.whl#sha256=185cd3d6d05ca4b44a8f1595af87f9c372bb6acf9c808e99aa3e9aa03bd98cf6"
|
|
189
|
+
python -m pip install "tributo-algorithms[causal-dowhy]"
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Development
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
uv sync --locked --extra all --group dev
|
|
196
|
+
uv run ruff format --check .
|
|
197
|
+
uv run ruff check .
|
|
198
|
+
uv run mypy packages
|
|
199
|
+
uv run pytest tests
|
|
200
|
+
uv build --no-sources
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Release the aggregate distribution with a single
|
|
204
|
+
`tributo-algorithms-v<semver>` tag. CI builds one Wheel and source distribution,
|
|
205
|
+
publishes the same checksummed files to TestPyPI, verifies the installed
|
|
206
|
+
metadata, then publishes those files to PyPI.
|
|
207
|
+
|
|
208
|
+
## XGBoost validation and early stopping
|
|
209
|
+
|
|
210
|
+
XGBoost accepts a required `train` binding and an optional `validation` binding
|
|
211
|
+
through `InputBindingSet`, with `train` as the primary role. Both inputs must
|
|
212
|
+
declare the same ordered features and label column and provide compatible
|
|
213
|
+
numeric schemas. Validation rows are evaluated separately and never enter the
|
|
214
|
+
training gradient matrix. Both roles use lossless partitioning and report
|
|
215
|
+
their own `input_rows` counts for Core validation.
|
|
216
|
+
|
|
217
|
+
For validation-driven model selection, include these fields in the existing
|
|
218
|
+
`algorithm_config` (alongside its `data`, `ray`, and `output` configuration):
|
|
219
|
+
|
|
220
|
+
```json
|
|
221
|
+
{
|
|
222
|
+
"model": {"objective": "binary:logistic", "eval_metric": "logloss"},
|
|
223
|
+
"training": {
|
|
224
|
+
"num_rounds": 1000,
|
|
225
|
+
"early_stopping_rounds": 20,
|
|
226
|
+
"maximize": false
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Early stopping requires validation, one explicit `model.eval_metric` string,
|
|
232
|
+
positive integer patience, and an explicit boolean `training.maximize`.
|
|
233
|
+
Patience may exceed the round limit. The native XGBoost callback selects the
|
|
234
|
+
best prefix even when the round limit is reached before patience expires.
|
|
235
|
+
Linear Boosters cannot export this selected prefix. A provided validation
|
|
236
|
+
shard must be non-empty on every Worker, matching the current train-shard
|
|
237
|
+
restriction. Invalid inputs or non-finite selection scores fail training.
|
|
238
|
+
|
|
239
|
+
Omit early-stopping fields to preserve fixed-round training. Validation can
|
|
240
|
+
still be provided for evaluation; train-only requests remain supported.
|
|
241
|
+
Execution metrics distinguish `training_rounds` (executed rounds) from
|
|
242
|
+
`model_rounds` (rounds in the exported model). Early-stopped fits additionally
|
|
243
|
+
return zero-based `best_iteration`, `best_score`, `selection_metric`, and
|
|
244
|
+
`maximize`. The `train-*` and `validation-*` metrics describe the last executed
|
|
245
|
+
round; `best_score` describes the selected round. Both ONNX and native UBJ
|
|
246
|
+
artifacts contain the selected model and a digest-checked
|
|
247
|
+
`training_metadata.json` sidecar. Best-model selection does
|
|
248
|
+
not depend on a consumer supplying an iteration range at prediction time.
|
|
249
|
+
|
|
250
|
+
For H&M, use validation logloss for stopping. XGBoost's distributed AUC is an
|
|
251
|
+
[approximation](https://xgboost.readthedocs.io/en/stable/parameter.html#learning-task-parameters).
|
|
252
|
+
Compute AP, ROC-AUC, and Lift over the complete held-out predictions and labels
|
|
253
|
+
in the calling application.
|
|
254
|
+
|
|
255
|
+
## XGBoost periodic checkpoints and same-run recovery
|
|
256
|
+
|
|
257
|
+
Enable periodic saving and a finite Worker failure allowance in the existing
|
|
258
|
+
configuration:
|
|
259
|
+
|
|
260
|
+
```json
|
|
261
|
+
{
|
|
262
|
+
"training": {"num_rounds": 20, "checkpoint_interval_rounds": 10},
|
|
263
|
+
"ray": {"storage_path": "/shared/checkpoints", "max_failures": 1}
|
|
264
|
+
}
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Both fields default to zero. Values must be non-negative integers; booleans
|
|
268
|
+
and infinite retry budgets are rejected. A positive `max_failures` requires
|
|
269
|
+
a positive checkpoint interval. Saving without retries is allowed. Ray Train
|
|
270
|
+
V2 owns checkpoint transport and Worker group restarts; every trainer invocation
|
|
271
|
+
has a unique storage name. All nodes must access the same durable storage path.
|
|
272
|
+
Recovery requires `gbtree`, fixed Worker count/environment, and frozen inputs.
|
|
273
|
+
The exercised baseline is Ray 2.59.0 with XGBoost 3.4.1 and Core 1.2.0.
|
|
274
|
+
|
|
275
|
+
`num_rounds` remains the total target: restoring round 10 with a target of 20
|
|
276
|
+
adds at most 10 rounds. Checkpoints retain the full training Booster, ordered
|
|
277
|
+
features, invocation/plan identity, environment versions, file digests, and
|
|
278
|
+
early-stopping score history. Native early stopping replays that history to
|
|
279
|
+
retain best score and patience progress. A checkpoint that has reached the
|
|
280
|
+
round limit or stopped early adds no further rounds. Corrupt or incompatible
|
|
281
|
+
state fails explicitly, without silently restarting from zero. A failure before
|
|
282
|
+
the first checkpoint may restart from zero within the configured allowance.
|
|
283
|
+
|
|
284
|
+
The latest recovery state and selected inference model are separate. Only a
|
|
285
|
+
final checkpoint can be exported; both Bundle formats contain the selected
|
|
286
|
+
model. Metrics include `resumed_from_round` and `attempt_training_rounds`, whose
|
|
287
|
+
sum equals `training_rounds`. Final Worker receipts contain only the successful
|
|
288
|
+
group's input counts and newly executed rounds, including zero for terminal
|
|
289
|
+
recovery. Failed attempts do not contribute to coverage evidence.
|
|
290
|
+
|
|
291
|
+
This supports Worker process failures within one `fit()`. Cross-run
|
|
292
|
+
`runtime.resume_from`, Driver/Controller or cluster disaster recovery, elastic
|
|
293
|
+
Worker counts, and Tune are outside this feature. The public stage-runner API
|
|
294
|
+
is unchanged and keeps recovery disabled. Input identity checks do not detect
|
|
295
|
+
changed contents behind the same mutable URI. UBJ continuation does not promise
|
|
296
|
+
bitwise equivalence for random sampling, GPU training, or changed data shards;
|
|
297
|
+
the Gate uses deterministic CPU histogram training without sampling.
|
|
298
|
+
|
|
299
|
+
## XGBoost Worker Gate
|
|
300
|
+
|
|
301
|
+
XGBoost consumes replayable Ray Train shards in batches of at most 65,536 rows.
|
|
302
|
+
The existing Core Framework Native and multi-stage entry points share this
|
|
303
|
+
Worker loop; Core continues to manage execution and Bundle delivery.
|
|
304
|
+
|
|
305
|
+
The Gate targets a two-node Docker Ray 2.59.0 cluster with the same fixed
|
|
306
|
+
Tributo Core 1.2.0 and algorithm Wheels installed on every node, together with the
|
|
307
|
+
`boosting` extra. Use a shared directory mounted at the same absolute path on
|
|
308
|
+
both nodes. Submit from this repository through Ray Jobs:
|
|
309
|
+
|
|
310
|
+
```bash
|
|
311
|
+
ray job submit --address "$RAY_DASHBOARD_URL" --working-dir . \
|
|
312
|
+
-- python tests/jobs/xgboost_worker_gate.py --root "$GATE_SHARED_ROOT"
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
`GATE_SHARED_ROOT` must name a new directory. The job checks the Core execution
|
|
316
|
+
path and `XGBoostStageRunner` with two Workers on different nodes, 131,075 input
|
|
317
|
+
train rows, 131,077 validation rows, synchronized model digests, train-only
|
|
318
|
+
and validation fits, early stopping, selected-model reload, and ONNX/native
|
|
319
|
+
Bundle artifacts. A separate bounded routing fixture verifies row identities
|
|
320
|
+
for both input roles, and an empty validation case must fail without publishing
|
|
321
|
+
a Bundle. Recovery cases inject real Worker exits after the controller confirms
|
|
322
|
+
checkpoint persistence: 10-to-20-round continuation, interruption during
|
|
323
|
+
patience, further improvement up to the round cap, final-checkpoint recovery
|
|
324
|
+
with no new rounds, finite retry exhaustion, and invocation/checkpoint isolation.
|
|
325
|
+
Final receipts are matched to the last successful group. It preserves
|
|
326
|
+
`result.json`, failure events, receipts, and model outputs
|
|
327
|
+
under that directory. This targeted Gate does not certify other runtime images
|
|
328
|
+
or execution profiles.
|