-
-
Notifications
You must be signed in to change notification settings - Fork 35
/
meta.yaml
317 lines (300 loc) · 10.3 KB
/
meta.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
{% set name = "xgboost" %}
{% set version = "2.1.1" %}
{% set build_number = 0 %}
{% set min_python = "3.8" %}
{% set string_prefix = "cuda" ~ (cuda_compiler_version | replace('.', '')) if (cuda_compiler_version or "None") != "None" else "cpu" %}
package:
name: xgboost-split
version: {{ version }}
source:
url: https://github.com/dmlc/xgboost/releases/download/v{{ version }}/xgboost-{{ version }}.tar.gz
sha256: a47ca87f3345d2a866cd7ec40933564aa2b7250592d0e9bf613951630fc1fa6f
patches:
# xgboost patches
- patches/0001-Enable-latest-libcxx-on-MacOS.patch # [osx]
build:
number: {{ build_number }}
# Make sure only one Python is built for as packages are `noarch: python`.
# However using `noarch: python` upsets the linter.
# So skip all Python's except the minimum Python version upstream supports
# xref: https://github.com/conda-forge/conda-smithy/issues/1887#issuecomment-2244323850
# Windows CUDA 11.8 fails due to a compilation error
# xref: https://github.com/conda-forge/xgboost-feedstock/issues/173
{% if python is defined and cuda_compiler_version is defined %}
skip: >-
{{ ( python.split(".")[:2] != min_python.split(".")[:2] or (win and cuda_compiler_version == "11.8") ) }}
{% endif %}
requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('m2w64_c') }} # [win]
- {{ compiler('m2w64_cxx') }} # [win]
- {{ compiler('cuda') }} # [cuda_compiler != "None" and cuda_compiler_version != "None"]
- {{ stdlib('c') }}
- cmake
- llvm-openmp # [osx]
- libgomp # [linux]
- ninja
host:
- cccl !=2.4.0,!=2.5.0 # [cuda_compiler != "None"]
- nccl # [linux and cuda_compiler != "None"]
outputs:
- name: libxgboost
script: install-libxgboost.sh # [not win]
script: install-win-wrapper.bat # [win]
build:
activate_in_script: true
string: {{ string_prefix }}_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}
ignore_run_exports_from:
- {{ compiler('cuda') }} # [(cuda_compiler_version or "").startswith("11")]
missing_dso_whitelist:
# Conda-build raises the missing `R.dll` linkage erroneously.
# xref: https://github.com/conda/conda-build/pull/4786
- '*/R.dll' # [win]
# Conda-build raises the missing `ld64.so.2` linkage erroneously.
# xref: https://github.com/conda/conda-build/issues/5403
- $RPATH/ld64.so.2 # [ppc64le]
requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('cuda') }} # [cuda_compiler != "None"]
- {{ stdlib('c') }}
- git
- cmake
- make
- llvm-openmp # [osx]
- libgomp # [linux]
host:
- nccl # [linux and cuda_compiler != "None"]
run:
- __cuda # [cuda_compiler != "None"]
{% if (cuda_compiler_version or "").startswith("11") %}
- cuda-version >=11.2,<12
{% endif %}
test:
commands:
- test -f "${PREFIX}/lib/libxgboost${SHLIB_EXT}" # [unix]
- if not exist %LIBRARY_PREFIX%\mingw-w64\bin\xgboost.dll exit 1 # [win]
- name: _py-xgboost-mutex
version: 2.0
build:
string: {{ "cpu" if cuda_compiler == "None" else "gpu" }}_0
test:
commands:
- exit 0
- name: py-xgboost
script: install-py-xgboost.sh # [not win]
script: install-win-wrapper.bat # [win]
build:
noarch: python
string: {{ string_prefix }}_pyh{{ PKG_HASH }}_{{ PKG_BUILDNUM }}
script_env:
# Workaround an upstream conda-build issue w/pip & `outputs` by setting env vars manually.
# xref: https://github.com/conda/conda-build/issues/3993
- PIP_NO_BUILD_ISOLATION=False
- PIP_NO_DEPENDENCIES=True
- PIP_IGNORE_INSTALLED=True
- PIP_CACHE_DIR=pip_cache
- PIP_NO_INDEX=True
requirements:
build:
- python # [build_platform != target_platform]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
host:
- {{ pin_subpackage('_py-xgboost-mutex', exact=True) }}
- {{ pin_subpackage('libxgboost', max_pin='x.x.x') }}
- python >={{ min_python }}
- hatchling >=1.12.1
- pip
run:
- {{ pin_subpackage('_py-xgboost-mutex', exact=True) }}
- {{ pin_subpackage('libxgboost', max_pin='x.x.x') }}
- python >={{ min_python }}
- numpy
- scipy
- scikit-learn
- __cuda # [cuda_compiler != "None"]
test:
requires:
- python
imports:
- xgboost
script: test-py-xgboost.py
- name: py-xgboost-cpu
build:
noarch: python
skip: true # [cuda_compiler != "None"]
requirements:
host:
- python >={{ min_python }}
- {{ pin_subpackage('py-xgboost', exact=True) }}
run:
- python >={{ min_python }}
- {{ pin_subpackage('py-xgboost', exact=True) }}
test:
requires:
- python
imports:
- xgboost
- name: py-xgboost-gpu
build:
noarch: python
skip: true # [cuda_compiler == "None"]
requirements:
host:
- python >={{ min_python }}
- {{ pin_subpackage('py-xgboost', exact=True) }}
run:
- python >={{ min_python }}
- {{ pin_subpackage('py-xgboost', exact=True) }}
- __cuda # [cuda_compiler != "None"]
test:
requires:
- python
imports:
- xgboost
- name: xgboost
build:
noarch: python
string: {{ string_prefix }}_pyh{{ PKG_HASH }}_{{ PKG_BUILDNUM }}
requirements:
host:
- python >={{ min_python }}
- {{ pin_subpackage('py-xgboost', exact=True) }}
run:
- python >={{ min_python }}
- {{ pin_subpackage('py-xgboost', exact=True) }}
- __cuda # [cuda_compiler != "None"]
test:
requires:
- python
imports:
- xgboost
- name: _r-xgboost-mutex
version: 2.0
build:
string: {{ "cpu" if cuda_compiler == "None" else "gpu" }}_0
test:
commands:
- exit 0
- name: r-xgboost
script: install-r-xgboost.sh # [not win]
script: install-r-xgboost.bat # [win]
build:
skip: true # [r_base in ("4.1", "4.2") or win]
string: {{ string_prefix }}_r{{ r_base | replace('.', '') }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}
rpaths:
- lib/R/lib
missing_dso_whitelist:
# Conda-build raises the missing `ld64.so.2` linkage erroneously.
# xref: https://github.com/conda/conda-build/issues/5403
- $RPATH/ld64.so.2 # [ppc64le]
requirements:
build:
- {{ compiler('m2w64_c') }} # [win]
- {{ compiler('m2w64_cxx') }} # [win]
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ stdlib('c') }}
- llvm-openmp # [osx]
- libgomp # [linux]
- git
- make # [not win]
- posix # [win]
- cmake
- ninja
- cross-r-base {{ r_base }} # [build_platform != target_platform]
- r-base # [build_platform != target_platform]
- r-matrix # [build_platform != target_platform]
- r-data.table # [build_platform != target_platform]
- r-magrittr # [build_platform != target_platform]
- r-jsonlite # [build_platform != target_platform]
- r-knitr # [build_platform != target_platform]
host:
- {{ pin_subpackage('_r-xgboost-mutex', exact=True) }}
- {{ pin_subpackage('libxgboost', max_pin='x.x.x') }}
- r-base
- r-matrix
- r-data.table
- r-magrittr
- r-jsonlite
- r-knitr
run:
- {{ pin_subpackage('_r-xgboost-mutex', exact=True) }}
- {{ pin_subpackage('libxgboost', max_pin='x.x.x') }}
- r-base
- r-matrix
- r-data.table
- r-magrittr
- r-jsonlite
- __cuda # [cuda_compiler != "None"]
test:
requires:
- r-base
files:
- test-r-xgboost.r
commands:
- Rscript test-r-xgboost.r
- name: r-xgboost-cpu
build:
skip: true # [cuda_compiler != "None"]
skip: true # [r_base in ("4.1", "4.2") or win]
requirements:
host:
- r-base
- {{ pin_subpackage('r-xgboost', exact=True) }}
run:
- r-base
- {{ pin_subpackage('r-xgboost', exact=True) }}
test:
requires:
- r-base
commands:
- $R -e "library('xgboost')" # [unix]
- "\"%R%\" -e \"library('xgboost')\"" # [win]
- name: r-xgboost-gpu
build:
skip: true # [cuda_compiler == "None"]
skip: true # [r_base in ("4.1", "4.2") or win]
requirements:
host:
- r-base
- {{ pin_subpackage('r-xgboost', exact=True) }}
run:
- r-base
- {{ pin_subpackage('r-xgboost', exact=True) }}
- __cuda # [cuda_compiler != "None"]
test:
requires:
- r-base
commands:
- $R -e "library('xgboost')" # [unix]
- "\"%R%\" -e \"library('xgboost')\"" # [win]
about:
home: https://github.com/dmlc/xgboost
license: Apache-2.0
license_file: LICENSE
summary: |
Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for
Python, R, Java, Scala, C++ and more. Runs on single machine, Hadoop, Spark, Flink
and DataFlow
description: |
XGBoost is an optimized distributed gradient boosting library designed to be highly efficient,
flexible and portable. It implements machine learning algorithms under the Gradient Boosting
framework. XGBoost provides a parallel tree boosting (also known as GBDT, GBM) that solve many
data science problems in a fast and accurate way. The same code runs on major distributed
environment (Hadoop, SGE, MPI) and can solve problems beyond billions of examples.
doc_url: https://xgboost.readthedocs.io/
dev_url: https://github.com/dmlc/xgboost/
extra:
feedstock-name: xgboost
recipe-maintainers:
- hcho3
- aldanor
- fhoehle
- jakirkham
- ksangeek
- xhochy
- mfansler