relarena 0.0.1a1__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.
- relarena-0.0.1a1/LICENSE +200 -0
- relarena-0.0.1a1/NOTICE +68 -0
- relarena-0.0.1a1/PKG-INFO +390 -0
- relarena-0.0.1a1/README.md +331 -0
- relarena-0.0.1a1/pyproject.toml +159 -0
- relarena-0.0.1a1/pyproject.toml.orig +191 -0
- relarena-0.0.1a1/src/relarena/__init__.py +54 -0
- relarena-0.0.1a1/src/relarena/cache.py +224 -0
- relarena-0.0.1a1/src/relarena/checksums/__init__.py +27 -0
- relarena-0.0.1a1/src/relarena/checksums/checksum.py +266 -0
- relarena-0.0.1a1/src/relarena/checksums/relbench_v1_checksums.json +212 -0
- relarena-0.0.1a1/src/relarena/cli.py +138 -0
- relarena-0.0.1a1/src/relarena/dataset.py +386 -0
- relarena-0.0.1a1/src/relarena/evaluation/__init__.py +26 -0
- relarena-0.0.1a1/src/relarena/evaluation/leaderboard.py +172 -0
- relarena-0.0.1a1/src/relarena/evaluation/plots.py +301 -0
- relarena-0.0.1a1/src/relarena/evaluation/reference.py +71 -0
- relarena-0.0.1a1/src/relarena/featurization/__init__.py +15 -0
- relarena-0.0.1a1/src/relarena/featurization/_columns.py +54 -0
- relarena-0.0.1a1/src/relarena/featurization/cache.py +47 -0
- relarena-0.0.1a1/src/relarena/featurization/dfs.py +634 -0
- relarena-0.0.1a1/src/relarena/featurization/entity.py +51 -0
- relarena-0.0.1a1/src/relarena/featurization/warm_cache.py +71 -0
- relarena-0.0.1a1/src/relarena/identity.py +120 -0
- relarena-0.0.1a1/src/relarena/metrics.py +142 -0
- relarena-0.0.1a1/src/relarena/model.py +108 -0
- relarena-0.0.1a1/src/relarena/models/VENDORED-LICENSES +92 -0
- relarena-0.0.1a1/src/relarena/models/__init__.py +49 -0
- relarena-0.0.1a1/src/relarena/models/_shared/__init__.py +7 -0
- relarena-0.0.1a1/src/relarena/models/_shared/gbdt/__init__.py +1 -0
- relarena-0.0.1a1/src/relarena/models/_shared/gbdt/lgb.py +116 -0
- relarena-0.0.1a1/src/relarena/models/_shared/gnn/__init__.py +9 -0
- relarena-0.0.1a1/src/relarena/models/_shared/gnn/_vendor/__init__.py +1 -0
- relarena-0.0.1a1/src/relarena/models/_shared/gnn/_vendor/gnn.py +215 -0
- relarena-0.0.1a1/src/relarena/models/_shared/gnn/graph.py +40 -0
- relarena-0.0.1a1/src/relarena/models/_shared/gnn/graph_cache.py +45 -0
- relarena-0.0.1a1/src/relarena/models/_shared/gnn/training.py +91 -0
- relarena-0.0.1a1/src/relarena/models/_shared/predict_contract.py +39 -0
- relarena-0.0.1a1/src/relarena/models/_shared/tfm/__init__.py +6 -0
- relarena-0.0.1a1/src/relarena/models/_shared/tfm/tfm.py +341 -0
- relarena-0.0.1a1/src/relarena/models/dummy/__init__.py +9 -0
- relarena-0.0.1a1/src/relarena/models/dummy/model.py +138 -0
- relarena-0.0.1a1/src/relarena/models/graphsage/__init__.py +9 -0
- relarena-0.0.1a1/src/relarena/models/graphsage/model.py +384 -0
- relarena-0.0.1a1/src/relarena/models/lightgbm/__init__.py +8 -0
- relarena-0.0.1a1/src/relarena/models/lightgbm/model.py +115 -0
- relarena-0.0.1a1/src/relarena/models/rdblearn/__init__.py +8 -0
- relarena-0.0.1a1/src/relarena/models/rdblearn/model.py +170 -0
- relarena-0.0.1a1/src/relarena/models/relgnn/__init__.py +18 -0
- relarena-0.0.1a1/src/relarena/models/relgnn/_vendor/__init__.py +12 -0
- relarena-0.0.1a1/src/relarena/models/relgnn/_vendor/atomic_routes.py +53 -0
- relarena-0.0.1a1/src/relarena/models/relgnn/_vendor/conv.py +78 -0
- relarena-0.0.1a1/src/relarena/models/relgnn/_vendor/hetero_conv.py +188 -0
- relarena-0.0.1a1/src/relarena/models/relgnn/_vendor/model.py +165 -0
- relarena-0.0.1a1/src/relarena/models/relgnn/_vendor/nn.py +91 -0
- relarena-0.0.1a1/src/relarena/models/relgnn/model.py +303 -0
- relarena-0.0.1a1/src/relarena/models/relgnn/preprocessing.py +130 -0
- relarena-0.0.1a1/src/relarena/models/relgnn/warm_cache.py +59 -0
- relarena-0.0.1a1/src/relarena/models/relgt/__init__.py +12 -0
- relarena-0.0.1a1/src/relarena/models/relgt/_vendor/__init__.py +10 -0
- relarena-0.0.1a1/src/relarena/models/relgt/_vendor/_sampler.py +226 -0
- relarena-0.0.1a1/src/relarena/models/relgt/_vendor/codebook.py +129 -0
- relarena-0.0.1a1/src/relarena/models/relgt/_vendor/encoders.py +425 -0
- relarena-0.0.1a1/src/relarena/models/relgt/_vendor/local_module.py +221 -0
- relarena-0.0.1a1/src/relarena/models/relgt/_vendor/model.py +365 -0
- relarena-0.0.1a1/src/relarena/models/relgt/model.py +360 -0
- relarena-0.0.1a1/src/relarena/models/relgt/tokenize.py +576 -0
- relarena-0.0.1a1/src/relarena/models/relgt/warm_cache.py +78 -0
- relarena-0.0.1a1/src/relarena/models/rt/__init__.py +10 -0
- relarena-0.0.1a1/src/relarena/models/rt/config.py +750 -0
- relarena-0.0.1a1/src/relarena/models/rt/export.py +503 -0
- relarena-0.0.1a1/src/relarena/models/rt/model.py +683 -0
- relarena-0.0.1a1/src/relarena/models/rt/warm_cache.py +90 -0
- relarena-0.0.1a1/src/relarena/models/tabpfn_rel/__init__.py +14 -0
- relarena-0.0.1a1/src/relarena/models/tabpfn_rel/context.py +296 -0
- relarena-0.0.1a1/src/relarena/models/tabpfn_rel/features.py +311 -0
- relarena-0.0.1a1/src/relarena/models/tabpfn_rel/model.py +189 -0
- relarena-0.0.1a1/src/relarena/py.typed +0 -0
- relarena-0.0.1a1/src/relarena/registry.py +102 -0
- relarena-0.0.1a1/src/relarena/results.py +151 -0
- relarena-0.0.1a1/src/relarena/runner.py +201 -0
- relarena-0.0.1a1/src/relarena/search_space.py +149 -0
- relarena-0.0.1a1/src/relarena/tasks.py +99 -0
- relarena-0.0.1a1/src/relarena/tuner.py +263 -0
- relarena-0.0.1a1/src/relarena/userdb/__init__.py +33 -0
- relarena-0.0.1a1/src/relarena/userdb/_schema.py +29 -0
- relarena-0.0.1a1/src/relarena/userdb/database.schema.json +37 -0
- relarena-0.0.1a1/src/relarena/userdb/ingest.py +239 -0
- relarena-0.0.1a1/src/relarena/userdb/predict.py +115 -0
- relarena-0.0.1a1/src/relarena/userdb/query.py +368 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/__init__.py +83 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-amazon/__init__.py +1 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-amazon/db.yaml +9 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-amazon/item-churn.yaml +22 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-amazon/item-ltv.yaml +17 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-amazon/user-churn.yaml +22 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-amazon/user-ltv.yaml +24 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-avito/__init__.py +1 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-avito/ad-ctr.yaml +20 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-avito/db.yaml +33 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-avito/user-clicks.yaml +23 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-avito/user-visits.yaml +19 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-event/__init__.py +1 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-event/db.yaml +22 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-event/user-attendance.yaml +20 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-event/user-ignore.yaml +21 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-event/user-repeat.yaml +33 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-f1/__init__.py +1 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-f1/db.yaml +43 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-f1/driver-dnf.yaml +20 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-f1/driver-position.yaml +20 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-f1/driver-top3.yaml +20 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-hm/__init__.py +1 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-hm/db.yaml +9 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-hm/item-sales.yaml +19 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-hm/user-churn.yaml +24 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-stack/__init__.py +1 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-stack/db.yaml +38 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-stack/post-votes.yaml +20 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-stack/user-badge.yaml +20 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-stack/user-engagement.yaml +35 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-trial/__init__.py +1 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-trial/db.yaml +66 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-trial/site-success.yaml +30 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-trial/study-adverse.yaml +25 -0
- relarena-0.0.1a1/src/relarena/userdb/relbench_v1/rel-trial/study-outcome.yaml +27 -0
- relarena-0.0.1a1/src/relarena/userdb/spec.py +77 -0
- relarena-0.0.1a1/src/relarena/userdb/task.py +96 -0
- relarena-0.0.1a1/src/relarena/userdb/task.schema.json +67 -0
relarena-0.0.1a1/LICENSE
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
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 2026 PriorLabs GmbH
|
|
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
|
relarena-0.0.1a1/NOTICE
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
relarena
|
|
2
|
+
Copyright 2026 PriorLabs GmbH
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0. See the LICENSE file.
|
|
5
|
+
|
|
6
|
+
This product includes third-party software. The following components are used
|
|
7
|
+
under the MIT license, with the upstream copyright notice and license text
|
|
8
|
+
retained alongside the code in this package:
|
|
9
|
+
|
|
10
|
+
* RelBench example GNN building blocks
|
|
11
|
+
Copyright (c) 2023 RelBench Team
|
|
12
|
+
https://github.com/snap-stanford/relbench
|
|
13
|
+
src/relarena/models/_shared/gnn/_vendor/gnn.py
|
|
14
|
+
|
|
15
|
+
* RelGNN composite-message-passing GNN
|
|
16
|
+
Copyright (c) 2023 RelBench Team
|
|
17
|
+
https://github.com/snap-stanford/RelGNN
|
|
18
|
+
src/relarena/models/relgnn/_vendor/
|
|
19
|
+
|
|
20
|
+
* RelGT Relational Graph Transformer
|
|
21
|
+
Copyright (c) 2025 Vijay Prakash Dwivedi, Sri Jaladi, Yangyi Shen,
|
|
22
|
+
Federico López, Charilaos I. Kanatsoulis, Rishi Puri, Matthias Fey,
|
|
23
|
+
Jure Leskovec
|
|
24
|
+
https://github.com/snap-stanford/relgt
|
|
25
|
+
src/relarena/models/relgt/_vendor/
|
|
26
|
+
|
|
27
|
+
* RDBLearn (method adaptation; no files copied)
|
|
28
|
+
Copyright (c) HKU Shanghai X-Lab
|
|
29
|
+
https://github.com/HKUSHXLab/rdblearn
|
|
30
|
+
src/relarena/models/rdblearn/model.py, src/relarena/models/_shared/tfm/tfm.py,
|
|
31
|
+
src/relarena/featurization/dfs.py
|
|
32
|
+
|
|
33
|
+
* Relational Transformer (RT) (dependency; no files copied)
|
|
34
|
+
Copyright (c) 2025 Stanford STAR / Relational Transformer authors
|
|
35
|
+
https://github.com/rishabh-ranjan/relational-transformer
|
|
36
|
+
src/relarena/models/rt/ -- installed from the `rt` extra, not vendored.
|
|
37
|
+
|
|
38
|
+
Datasets are not distributed with this package. They are downloaded at runtime by
|
|
39
|
+
relbench and remain subject to their own upstream terms.
|
|
40
|
+
|
|
41
|
+
Vendored component provenance
|
|
42
|
+
-----------------------------
|
|
43
|
+
|
|
44
|
+
RelBench example GNN building blocks were copied from
|
|
45
|
+
https://github.com/snap-stanford/relbench at commit 74d4c37
|
|
46
|
+
(`examples/model.py` and `examples/text_embedder.py`). Their imports were merged
|
|
47
|
+
into `src/relarena/models/_shared/gnn/_vendor/gnn.py`; only Ruff formatting was
|
|
48
|
+
otherwise normalized. The GNN layers themselves are imported from the installed
|
|
49
|
+
`relbench.modeling.nn` package and are not copied.
|
|
50
|
+
|
|
51
|
+
RelGNN model building blocks were copied from
|
|
52
|
+
https://github.com/snap-stanford/RelGNN at commit cffdb8b. The upstream example
|
|
53
|
+
modules were split into the matching modules under
|
|
54
|
+
`src/relarena/models/relgnn/_vendor/`; package imports were rewritten and Ruff
|
|
55
|
+
formatting normalized. Duplicate RelBench encoders were not copied.
|
|
56
|
+
|
|
57
|
+
RelGT model and sampler building blocks were copied from
|
|
58
|
+
https://github.com/snap-stanford/relgt at commit 19e423ca. Upstream `utils.py`
|
|
59
|
+
became `_sampler.py` and retains only the sampler functions and globals RelArena
|
|
60
|
+
uses; inter-module imports were rewritten to package paths and Ruff formatting
|
|
61
|
+
normalized. `models/relgt/model.py` and `models/relgt/tokenize.py` are original
|
|
62
|
+
RelArena adapter code, not vendored files.
|
|
63
|
+
|
|
64
|
+
RDBLearn is a method adaptation rather than a file copy. RelArena reimplements
|
|
65
|
+
the Deep Feature Synthesis to tabular-foundation-model recipe from
|
|
66
|
+
https://github.com/HKUSHXLab/rdblearn. The closest adaptation is the
|
|
67
|
+
non-stratified train downsampling in `models/_shared/tfm/tfm.py`; RelArena's DFS
|
|
68
|
+
cache and TabPFN-Rel extensions are original work.
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: relarena
|
|
3
|
+
Version: 0.0.1a1
|
|
4
|
+
Summary: A unified, fair benchmarking framework for models on relational tasks on RelBench databases.
|
|
5
|
+
Keywords: benchmarking,machine-learning,relational-learning,relbench,tabular-data
|
|
6
|
+
Author: Prior Labs
|
|
7
|
+
License-Expression: Apache-2.0
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
License-File: NOTICE
|
|
10
|
+
License-File: src/relarena/models/VENDORED-LICENSES
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
17
|
+
Requires-Dist: relbench==2.1.2
|
|
18
|
+
Requires-Dist: numpy>=1.24
|
|
19
|
+
Requires-Dist: pandas>=2.3.3,<3.0
|
|
20
|
+
Requires-Dist: scikit-learn>=1.3
|
|
21
|
+
Requires-Dist: configspace>=1.0
|
|
22
|
+
Requires-Dist: pyyaml>=6.0
|
|
23
|
+
Requires-Dist: jsonschema>=4.0
|
|
24
|
+
Requires-Dist: torch
|
|
25
|
+
Requires-Dist: relarena[rdl] ; extra == 'graphsage'
|
|
26
|
+
Requires-Dist: bencheval ; extra == 'leaderboard'
|
|
27
|
+
Requires-Dist: lightgbm>=4.0,<4.7 ; extra == 'lightgbm'
|
|
28
|
+
Requires-Dist: bencheval[plot] ; extra == 'plots'
|
|
29
|
+
Requires-Dist: autorank ; extra == 'plots'
|
|
30
|
+
Requires-Dist: tabpfn>=8 ; extra == 'rdblearn'
|
|
31
|
+
Requires-Dist: fastdfs>=0.2.1 ; extra == 'rdblearn'
|
|
32
|
+
Requires-Dist: setuptools<82 ; extra == 'rdblearn'
|
|
33
|
+
Requires-Dist: torch-geometric>=2.5 ; extra == 'rdl'
|
|
34
|
+
Requires-Dist: pytorch-frame>=0.2.3 ; extra == 'rdl'
|
|
35
|
+
Requires-Dist: sentence-transformers ; extra == 'rdl'
|
|
36
|
+
Requires-Dist: relarena[rdl] ; extra == 'relgnn'
|
|
37
|
+
Requires-Dist: relarena[rdl] ; extra == 'relgt'
|
|
38
|
+
Requires-Dist: einops>=0.8 ; extra == 'relgt'
|
|
39
|
+
Requires-Dist: h5py>=3.0 ; extra == 'relgt'
|
|
40
|
+
Requires-Dist: fastdfs>=0.2.1 ; extra == 'tabpfn-rel-api'
|
|
41
|
+
Requires-Dist: setuptools<82 ; extra == 'tabpfn-rel-api'
|
|
42
|
+
Requires-Dist: tabpfn-client>=0.3.2 ; extra == 'tabpfn-rel-api'
|
|
43
|
+
Requires-Dist: relarena[rdblearn] ; extra == 'tabpfn-rel-local'
|
|
44
|
+
Requires-Python: >=3.11, <3.13
|
|
45
|
+
Project-URL: Homepage, https://github.com/PriorLabs/relarena
|
|
46
|
+
Project-URL: Repository, https://github.com/PriorLabs/relarena
|
|
47
|
+
Project-URL: Issues, https://github.com/PriorLabs/relarena/issues
|
|
48
|
+
Provides-Extra: graphsage
|
|
49
|
+
Provides-Extra: leaderboard
|
|
50
|
+
Provides-Extra: lightgbm
|
|
51
|
+
Provides-Extra: plots
|
|
52
|
+
Provides-Extra: rdblearn
|
|
53
|
+
Provides-Extra: rdl
|
|
54
|
+
Provides-Extra: relgnn
|
|
55
|
+
Provides-Extra: relgt
|
|
56
|
+
Provides-Extra: tabpfn-rel-api
|
|
57
|
+
Provides-Extra: tabpfn-rel-local
|
|
58
|
+
Description-Content-Type: text/markdown
|
|
59
|
+
|
|
60
|
+
# RelArena-α
|
|
61
|
+
|
|
62
|
+
A unified, fair benchmarking framework for running models on relational tasks on
|
|
63
|
+
[RelBench](https://github.com/snap-stanford/relbench) databases — inspired by how
|
|
64
|
+
[TabArena](https://tabarena.ai) standardizes tabular benchmarking.
|
|
65
|
+
|
|
66
|
+
This repository also open-sources TabPFN-Rel and an initial version of the
|
|
67
|
+
Relational Predictive Interface (RPI). A detailed release report covering
|
|
68
|
+
RelArena-α, TabPFN-Rel, and the RPI is in preparation.
|
|
69
|
+
|
|
70
|
+
> **Current status:** alpha release. RelArena is a living benchmark: its task coverage,
|
|
71
|
+
> baselines, API, and tuning regime will evolve with community feedback. The
|
|
72
|
+
> current release focuses on RelBench v1 entity-level forecasting tasks.
|
|
73
|
+
|
|
74
|
+
## Why
|
|
75
|
+
|
|
76
|
+
Reproducibility varies across relational-learning methods: some releases omit
|
|
77
|
+
training scripts or tuning details, and reported results often use different
|
|
78
|
+
evaluation and tuning regimes. RelArena provides one executable
|
|
79
|
+
*train → tune → evaluate* path with common data loading, split construction,
|
|
80
|
+
model selection, and result recording. Models provide their training code and a
|
|
81
|
+
declarative hyperparameter search space; callers choose the tuning budget.
|
|
82
|
+
|
|
83
|
+
## Core idea
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
┌─ runner ───── fit config(s) on train → pick best on val → final fit → test
|
|
87
|
+
├─ tuner ────── random search or a fixed grid under a caller-supplied budget;
|
|
88
|
+
│ records configurations, metrics, predictions, and phase timings
|
|
89
|
+
├─ model ────── RelArenaModel: fit / predict (the contract)
|
|
90
|
+
├─ space ────── SearchSpace: what to tune over, bound to the model in the registry
|
|
91
|
+
└─ RelBench ─── Database, EntityTask, task.evaluate, metrics (dependency)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Evaluation protocol.** Each candidate configuration is fit on `train` and
|
|
95
|
+
scored on `val`. The best validation configuration then receives a final fit and
|
|
96
|
+
produces the test prediction. Depending on the model's published protocol, that
|
|
97
|
+
final fit either refits on `train + val` or trains on `train` while retaining
|
|
98
|
+
`val` for checkpoint selection. Parameter-free models simply run their sole
|
|
99
|
+
configuration. Test labels are withheld from the model and supplied only to
|
|
100
|
+
RelBench's evaluator.
|
|
101
|
+
|
|
102
|
+
RelArena uses **nested temporal validation**: tuning receives a database censored
|
|
103
|
+
at `val_timestamp`, while final evaluation receives one censored at
|
|
104
|
+
`test_timestamp`. This prevents access to post-boundary data and test labels.
|
|
105
|
+
Within that allowed database state, each method decides whether and how to enforce
|
|
106
|
+
the finer timestamp of every historical example. See
|
|
107
|
+
[docs/temporal-validation.md](docs/temporal-validation.md) for the complete
|
|
108
|
+
guarantee and trade-off.
|
|
109
|
+
|
|
110
|
+
Three design decisions carried over from TabArena/TabRepo:
|
|
111
|
+
|
|
112
|
+
1. **The search space is decoupled from the model and declarative.** Models
|
|
113
|
+
implement just `fit` / `predict`; *what* to tune lives in a separate
|
|
114
|
+
`SearchSpace` (a `ConfigSpace.ConfigurationSpace` for random search, or an
|
|
115
|
+
explicit ordered `grid` for discrete spaces) bound to the model in the registry
|
|
116
|
+
— mirroring AutoGluon / TabArena rather than declaring the space on the class.
|
|
117
|
+
2. **Budget is centralized rather than hidden in the model.** A model declares
|
|
118
|
+
only its `SearchSpace`; the caller supplies `n_trials`. The alpha release uses
|
|
119
|
+
documented, method-specific budgets because equalizing compute across methods
|
|
120
|
+
remains an open problem. See [docs/tuning-regime.md](docs/tuning-regime.md).
|
|
121
|
+
3. **Runs retain useful metadata.** Each trial records its configuration, metrics,
|
|
122
|
+
optional predictions, and separate tuning/final-fit timings for later analysis.
|
|
123
|
+
|
|
124
|
+
## Layout
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
src/relarena/
|
|
128
|
+
model.py # RelArenaModel — the contract every model implements
|
|
129
|
+
search_space.py # SearchSpace — declarative HPO space (ConfigSpace or grid)
|
|
130
|
+
registry.py # string-keyed model registry, binds model -> search space
|
|
131
|
+
tasks.py # entity task-type scope + guard
|
|
132
|
+
metrics.py # metric direction map + primary-metric selection
|
|
133
|
+
tuner.py # random search / fixed grids; per-trial timing and predictions
|
|
134
|
+
runner.py # local orchestration for one (model, dataset, task)
|
|
135
|
+
results.py # TrialResult schema + DataFrame export
|
|
136
|
+
models/ # constant, lightgbm, rdblearn, graphsage, relgnn, relgt, tabpfn-rel, rt wrappers
|
|
137
|
+
featurization/ # relational DB -> flat feature table (entity-only, for now)
|
|
138
|
+
checksums/ # content fingerprints of the RelBench data + the recorded baseline
|
|
139
|
+
evaluation/ # leaderboard, plots, externally-reported reference baselines
|
|
140
|
+
userdb/ # Relational Predictive Interface (RPI)
|
|
141
|
+
tests/ # smoke + unit tests (no data download)
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Models
|
|
145
|
+
|
|
146
|
+
This is the canonical inventory of registered methods. The release snapshot and
|
|
147
|
+
paper contain the rows marked **paper**; the additional `relgnn` registration
|
|
148
|
+
is retained as an experimental final-fit variant.
|
|
149
|
+
|
|
150
|
+
### Models and systems
|
|
151
|
+
|
|
152
|
+
Every method registers as one of two kinds (`RelArenaModel.kind`), and the two
|
|
153
|
+
are **not the same kind of result**. Both face the same tasks, splits, metrics,
|
|
154
|
+
and runtime budget, so the comparison is fair on final performance: if a system
|
|
155
|
+
scores higher, it really did do better on the benchmark. What a system gives up
|
|
156
|
+
is the controlled setup. A **model** is one method under the harness's fixed
|
|
157
|
+
tuning pipeline, so its score isolates the method. A **system** is free to step
|
|
158
|
+
outside those constraints — it selects its own hyperparameters, training
|
|
159
|
+
schedule, or components inside `fit` — so its score tells you what the whole
|
|
160
|
+
package achieves without telling you which part earned it: how much comes from
|
|
161
|
+
the underlying architecture rather than the selection machinery or other
|
|
162
|
+
transferable tricks is not identifiable from the benchmark alone. Leaderboards
|
|
163
|
+
should either exclude systems (`compute_leaderboard(..., kinds={"model"})`) or
|
|
164
|
+
rank both populations together with systems clearly marked; publishing both
|
|
165
|
+
boards side by side is the recommended presentation.
|
|
166
|
+
|
|
167
|
+
System support is currently **highly experimental**: systems run through the ordinary
|
|
168
|
+
model API with documented workarounds (all tuning inside a single fit of the
|
|
169
|
+
default config, state carried between the fit and refit phases via module-level
|
|
170
|
+
globals), and a system submission needs extra validation by and discussion with the maintainers. A
|
|
171
|
+
future release will replace these workarounds with an explicit fitting API for
|
|
172
|
+
systems — see
|
|
173
|
+
[adding-a-model.md](docs/adding-a-model.md#model-or-system) for the current
|
|
174
|
+
rules.
|
|
175
|
+
|
|
176
|
+
| Registered identifier | Paper-facing name | Family | Kind | Status | Final fit | Extra |
|
|
177
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
178
|
+
| `constant-global` | Constant (global) | global constant | model | paper | train + val | core |
|
|
179
|
+
| `constant-per-entity` | Constant (per-entity) | entity-wise constant | model | paper | train + val | core |
|
|
180
|
+
| `lightgbm` | LightGBM | entity-only tabular | model | paper | train + val | `lightgbm` |
|
|
181
|
+
| `rdblearn` | RDBLearn | DFS + tabular foundation model | model | paper | train; val retained | `rdblearn` |
|
|
182
|
+
| `tabpfn-rel-local` | TabPFN-Rel (OSS) | DFS + TabPFN v3 | model | paper | train + val | `tabpfn-rel-local` |
|
|
183
|
+
| `tabpfn-rel-client` | TabPFN-Rel (API) | DFS + hosted TabPFN v3 with text | model | paper | train + val | `tabpfn-rel-api` |
|
|
184
|
+
| `graphsage` | GraphSAGE | relational GNN | model | paper | train + val | `graphsage` |
|
|
185
|
+
| `relgnn-es` | RelGNN | relational GNN | model | paper | best-validation checkpoint | `relgnn` |
|
|
186
|
+
| `relgnn` | RelGNN full-data refit | relational GNN | model | experimental variant | train + val | `relgnn` |
|
|
187
|
+
| `relgt` | RelGT | relational transformer | model | paper | best-validation checkpoint | `relgt` |
|
|
188
|
+
| `rt-plurel` | RT-PluRel | pretrained relational transformer, fine-tuned per task | **system** | paper | train + val | `rt` |
|
|
189
|
+
|
|
190
|
+
The paper reports `relgnn-es` simply as **RelGNN**, because that published-style
|
|
191
|
+
best-validation-checkpoint regime performed better in our runs. The regular
|
|
192
|
+
`relgnn` identifier remains available for experiments but is excluded from the
|
|
193
|
+
default release leaderboard.
|
|
194
|
+
|
|
195
|
+
RT-PluRel is the sole registered **system** (see
|
|
196
|
+
[Models and systems](#models-and-systems)); its protocol and every configured
|
|
197
|
+
value are documented in [`models/rt/model.py`](src/relarena/models/rt/model.py).
|
|
198
|
+
Note that its recorded `val_score` is a placeholder — see
|
|
199
|
+
[`baseline_results/README.md`](baseline_results/README.md).
|
|
200
|
+
|
|
201
|
+
Everything else per method lives at its source: install caveats in
|
|
202
|
+
[docs/adding-a-model.md §6](docs/adding-a-model.md#6-optional-dependencies)
|
|
203
|
+
(the GNN baselines need platform-specific PyG sampling wheels beyond their
|
|
204
|
+
extras), excluded backends and cache warmers in each model's docstring, and
|
|
205
|
+
the complete implementation choices in the
|
|
206
|
+
[adding-a-model appendix](docs/adding-a-model.md#appendix--what-every-existing-model-chose).
|
|
207
|
+
|
|
208
|
+
## Install & test
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
uv sync # the dev group (pytest, ruff, ...) installs by default
|
|
212
|
+
OMP_NUM_THREADS=1 uv run pytest # the prefix is required on macOS; harmless elsewhere
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
The `rt` integration is temporarily not exposed as a package extra because its
|
|
216
|
+
platform-specific dependency is not yet on PyPI. To use it from a source
|
|
217
|
+
checkout, uncomment the documented `rt` block in `pyproject.toml`, then run
|
|
218
|
+
`uv lock` and `uv sync --extra rt`. Once `relational-transformer` is published
|
|
219
|
+
on PyPI, the extra can use a normal version constraint without this local step.
|
|
220
|
+
|
|
221
|
+
## Use RelArena on your own database (RPI)
|
|
222
|
+
|
|
223
|
+
The **Relational Predictive Interface (RPI)** applies registered RelArena models
|
|
224
|
+
to an entity-level forecasting task over your own relational database. Describe
|
|
225
|
+
CSV or Parquet tables in a YAML database specification, define the forward-looking
|
|
226
|
+
label and split boundaries in a YAML task specification, then use
|
|
227
|
+
`PredictiveQuery` as the Python façade:
|
|
228
|
+
|
|
229
|
+
```python
|
|
230
|
+
from relarena.userdb import PredictiveQuery, PredictiveQuerySpec
|
|
231
|
+
|
|
232
|
+
spec = PredictiveQuerySpec.from_yaml("task.yaml", data_dir="data/")
|
|
233
|
+
predictions = PredictiveQuery(spec).fit("tabpfn-rel-client").predict()
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
See [docs/predictive-task.md](docs/predictive-task.md) for the task definition,
|
|
237
|
+
SQL rules, split semantics, and worked examples.
|
|
238
|
+
|
|
239
|
+
## Preprocessing caches (optional)
|
|
240
|
+
|
|
241
|
+
Expensive CPU-bound preprocessing may run before a benchmark and be reused across
|
|
242
|
+
trials. This can substantially reduce repeated-run time, especially for DFS feature
|
|
243
|
+
matrices, materialized graphs, and tokenized databases.
|
|
244
|
+
|
|
245
|
+
Caching is not required. RelArena provides an **optional, experimental** helper API
|
|
246
|
+
in [`relarena.cache`](src/relarena/cache.py) for local paths, miss policies, private
|
|
247
|
+
scratch computation, and atomic publication. A method may ignore this API and
|
|
248
|
+
implement caching independently. The helper does not bring cache warming into a
|
|
249
|
+
timed RelArena experiment; preprocessing scripts still run separately, so their
|
|
250
|
+
runtime is not currently included in the recorded experiment timings.
|
|
251
|
+
|
|
252
|
+
Regardless of the mechanism, cache-generation code must be public, reproducible,
|
|
253
|
+
and leakage-safe. Some practical pointers:
|
|
254
|
+
|
|
255
|
+
- Load data through `RelBenchDatasetTask.inner_split()` and `outer_split()` so the
|
|
256
|
+
validation and test phase boundaries remain intact.
|
|
257
|
+
- Let the preprocessing implementation own its keys, versions, serialization, and
|
|
258
|
+
validation; include only inputs that actually determine the artifact.
|
|
259
|
+
- Treat pre-built stores as a convenience: always ship a runnable warmer that can
|
|
260
|
+
reconstruct them.
|
|
261
|
+
|
|
262
|
+
The full implementation guidance and reference code live in
|
|
263
|
+
[docs/adding-a-model.md](docs/adding-a-model.md#4-pre-processing-cache).
|
|
264
|
+
|
|
265
|
+
Configure the store explicitly at the run entrypoint:
|
|
266
|
+
|
|
267
|
+
```python
|
|
268
|
+
run_experiment(..., cache_dir="~/relarena-cache")
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Entrypoints also resolve these environment variables once:
|
|
272
|
+
|
|
273
|
+
- `RELARENA_CACHE_DIR` — the store directory.
|
|
274
|
+
- `RELARENA_DISABLE_CACHE` — set to any value to disable persistent caches.
|
|
275
|
+
|
|
276
|
+
`RELARENA_DISABLE_FEATURE_CACHE` remains as a deprecated alias for one release.
|
|
277
|
+
The helper API's store is an ordinary local directory; remote snapshot transport
|
|
278
|
+
belongs to deployment infrastructure rather than RelArena itself.
|
|
279
|
+
|
|
280
|
+
**Precompute (CPU).** Because `fit` / `predict` read (a miss raises), build the store
|
|
281
|
+
up front with a fill run. The DFS engine (`fastdfs`) runs on CPU and is memory-hungry
|
|
282
|
+
on wide-fan-out schemas, so run it on a large CPU node (many cores, ample RAM);
|
|
283
|
+
everything after it runs on the GPU (or the hosted TabPFN API), so precomputing keeps
|
|
284
|
+
that CPU-heavy step off those nodes. The workflow warms every RelBench v1 task:
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
RELARENA_CACHE_DIR=~/relarena-cache \
|
|
288
|
+
uv run --extra rdblearn python workflows/warm_feature_cache.py
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
It invokes `relarena.featurization.warm_cache` for both protocol splits and warms
|
|
292
|
+
both legitimate outer histories: train-only for RDBLearn and train+val for models
|
|
293
|
+
that refit on all labeled data. The `tabpfn-rel` and `rdblearn`
|
|
294
|
+
models share full-anchor, leak-safe-history matrices whenever their actual inputs
|
|
295
|
+
match; model-specific row selection and downstream training do not affect the key.
|
|
296
|
+
On a warm cache the evaluation reads Parquet only — no RDB build and no DFS.
|
|
297
|
+
RelGNN, RelGT, and RT-PluRel expose independent runnable warmers at
|
|
298
|
+
`relarena.models.relgnn.warm_cache`, `relarena.models.relgt.warm_cache`, and
|
|
299
|
+
`relarena.models.rt.warm_cache`.
|
|
300
|
+
|
|
301
|
+
**Runnable demo.** `examples/tabpfn_rel_caching.py` fits one RelBench task with and
|
|
302
|
+
without a precomputed cache, reports both timings, and checks the outputs are
|
|
303
|
+
identical. Its header includes a CPU-only mode (`RELARENA_EXAMPLE_SKIP_TFM=1`)
|
|
304
|
+
that exercises the DFS and cache path without a GPU.
|
|
305
|
+
|
|
306
|
+
## Batch evaluation
|
|
307
|
+
|
|
308
|
+
The CLI runs one model across many tasks in-process and writes every evaluated
|
|
309
|
+
config to a CSV:
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
relarena --model lightgbm --datasets rel-f1 --output results.csv
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
Each `(model, dataset, task, seed)` experiment is independent, so sweeps
|
|
316
|
+
parallelize trivially. The building blocks are all public — `run_experiment`
|
|
317
|
+
executes one experiment, `summary_to_dataframe` flattens it into the shared
|
|
318
|
+
results schema, and concatenated frames feed the leaderboard (needs the
|
|
319
|
+
`leaderboard` extra):
|
|
320
|
+
|
|
321
|
+
```python
|
|
322
|
+
import pandas as pd
|
|
323
|
+
|
|
324
|
+
import relarena.models # registers the built-in models
|
|
325
|
+
from relarena.evaluation import compute_leaderboard
|
|
326
|
+
from relarena.registry import registry
|
|
327
|
+
from relarena.results import summary_to_dataframe
|
|
328
|
+
from relarena.runner import run_experiment
|
|
329
|
+
from relarena.tasks import list_entity_tasks
|
|
330
|
+
|
|
331
|
+
frames = []
|
|
332
|
+
for spec in list_entity_tasks(["rel-f1"]):
|
|
333
|
+
for model in ("constant-global", "lightgbm"):
|
|
334
|
+
summary = run_experiment(
|
|
335
|
+
registry.get(model), spec.dataset, spec.task, seed=0, n_trials=10
|
|
336
|
+
)
|
|
337
|
+
frames.append(summary_to_dataframe(summary))
|
|
338
|
+
board = compute_leaderboard(pd.concat(frames, ignore_index=True))
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
If you have a large-scale cluster, integrate that loop into your distributed
|
|
342
|
+
backend of choice (a SLURM array, Ray, ...): dispatch each experiment as one
|
|
343
|
+
job, cache each job's result frame keyed by `(model, dataset, task, seed,
|
|
344
|
+
n_trials)`, and concatenate the cached frames for the leaderboard. Warm the
|
|
345
|
+
shared caches first (`workflows/warm_feature_cache.py` and the per-model
|
|
346
|
+
`warm_cache` modules) so workers never pay the featurization cost.
|
|
347
|
+
|
|
348
|
+
## Baseline results
|
|
349
|
+
|
|
350
|
+
[`baseline_results/`](baseline_results/) holds the release snapshot of the sweep
|
|
351
|
+
over the RelBench-v1 entity tasks: `results.csv` (every evaluated config; feed
|
|
352
|
+
it to `compute_leaderboard`) and `reference_results.csv` — per-task scores for
|
|
353
|
+
methods **not reproduced in this pipeline**, transcribed from published model
|
|
354
|
+
reports and flagged with a `_MR` (**model report**) suffix. `_MR` numbers are
|
|
355
|
+
mostly self-reported and are often higher than the results reproduced through
|
|
356
|
+
RelArena; we discuss possible reasons in the forthcoming release report
|
|
357
|
+
of this README. With few exceptions, these results are
|
|
358
|
+
not directly comparable to RelArena runs and should only be used as reference
|
|
359
|
+
points. To include them in a leaderboard or plot, pass `reference=`
|
|
360
|
+
(`relarena.evaluation.load_reference_results`). See
|
|
361
|
+
[`baseline_results/README.md`](baseline_results/README.md) for per-method
|
|
362
|
+
provenance and caveats.
|
|
363
|
+
|
|
364
|
+
## Adding a model
|
|
365
|
+
|
|
366
|
+
A model is a folder under `src/relarena/models/` implementing the
|
|
367
|
+
`RelArenaModel` contract (`fit` / `predict`) with a `SearchSpace` registered via
|
|
368
|
+
`@register_model(search_space=...)`; the registry discovers the folder
|
|
369
|
+
automatically. `models/lightgbm/` is the smallest complete example to copy.
|
|
370
|
+
|
|
371
|
+
The full guide is [docs/adding-a-model.md](docs/adding-a-model.md): the layout,
|
|
372
|
+
the datatypes `fit` and `predict` receive, the tuning regime and its choices,
|
|
373
|
+
where shared code goes, optional dependencies, vendoring requirements, tests,
|
|
374
|
+
and a checklist.
|
|
375
|
+
|
|
376
|
+
## License
|
|
377
|
+
|
|
378
|
+
Apache-2.0 ([`LICENSE`](LICENSE), [`NOTICE`](NOTICE)). Two things the license on
|
|
379
|
+
this code does not settle, both worth reading before you rely on relarena:
|
|
380
|
+
|
|
381
|
+
- **`tabpfn` is not Apache-2.0.** It ships the Prior Labs License, an Apache-2.0
|
|
382
|
+
derivative whose added paragraph 10 requires anyone distributing a product built
|
|
383
|
+
on it to display "Built with PriorLabs-TabPFN". It is confined to the `rdblearn`
|
|
384
|
+
and `tabpfn-rel-*` extras, so a plain install does not pull it.
|
|
385
|
+
- **Datasets are not ours to license.** relarena serves no data itself; `relbench`
|
|
386
|
+
downloads every database at runtime, and they remain subject to their own
|
|
387
|
+
upstream terms.
|
|
388
|
+
|
|
389
|
+
See [`docs/licensing.md`](docs/licensing.md) for what the license does and does not
|
|
390
|
+
cover, and [`NOTICE`](NOTICE) for third-party attribution.
|