forked from conda-forge/xgboost-feedstock
-
Notifications
You must be signed in to change notification settings - Fork 3
/
meta.yaml
244 lines (233 loc) · 9.08 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
{% set name = "xgboost" %}
{% set version = "2.1.3" %}
{% set build_number = 0 %}
{% set min_python = "3.9" %}
{% set string_prefix = "rapidsai" %}
package:
name: xgboost-split
version: {{ version }}
source:
url: https://github.com/dmlc/xgboost/releases/download/v{{ version }}/xgboost-{{ version }}.tar.gz
sha256: 90b1b7b770803299b337dd9b9206760d9c16f418403c77acce74b350c6427667
patches:
# xgboost patches
- patches/0001-Enable-latest-libcxx-on-MacOS.patch # [osx]
- patches/0002-Remove-nvidia-nccl-cu12-from-pyproject.toml.patch
- patches/0003-Mark-wheels-as-any-platform-compatible.patch
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: >-
{{ ((linux or win) and cuda_compiler_version == "None") or 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"]
- librmm # [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 != "None"]
- librmm # [linux and cuda_compiler != "None"]
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:
- cuda-version {{ cuda_compiler_version }} # [cuda_compiler != "None"]
- nccl # [linux and cuda_compiler != "None"]
- librmm # [linux and cuda_compiler != "None"]
run:
- cuda-version >=11.2,<12.0a0 # [(cuda_compiler_version or "").startswith("11")]
- cuda-version >=12.0,<13.0a0 # [(cuda_compiler_version or "").startswith("12")]
run_constrained:
- {{ pin_compatible('librmm', max_pin='x.x') }} # [linux and cuda_compiler != "None"]
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
script: install-py-xgboost.sh # [not win]
script: install-win-wrapper.bat # [win]
build:
noarch: python
string: {{ string_prefix }}_pyh{{ PKG_HASH }}_{{ PKG_BUILDNUM }}
force_use_keys:
- librmm # [linux and cuda_compiler != "None"]
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: # [build_platform != target_platform]
- python # [build_platform != target_platform]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
host:
- {{ pin_subpackage('libxgboost', max_pin='x.x.x') }}
- libxgboost =*={{ string_prefix }}_h*_{{ PKG_BUILDNUM }}
- python >={{ min_python }}
- hatchling >=1.12.1
- packaging >=21.3
- pip
run:
- {{ pin_subpackage('libxgboost', max_pin='x.x.x') }}
- libxgboost =*={{ string_prefix }}_h*_{{ PKG_BUILDNUM }}
- python >={{ min_python }}
- numpy
- scipy
- scikit-learn
test:
requires:
- python
- pip
imports:
- xgboost
commands:
- pip check
script: test-py-xgboost.py
- name: xgboost
build:
noarch: python
string: {{ string_prefix }}_pyh{{ PKG_HASH }}_{{ PKG_BUILDNUM }}
force_use_keys:
- librmm # [linux and cuda_compiler != "None"]
requirements:
host:
- python >={{ min_python }}
- {{ pin_subpackage('py-xgboost', max_pin="x.x.x.x.x.x") }}
- py-xgboost =*={{ string_prefix }}_pyh*_{{ PKG_BUILDNUM }}
run:
- python >={{ min_python }}
- {{ pin_subpackage('py-xgboost', max_pin="x.x.x.x.x.x") }}
- py-xgboost =*={{ string_prefix }}_pyh*_{{ PKG_BUILDNUM }}
test:
requires:
- python
imports:
- xgboost
- 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
force_use_keys:
- librmm # [linux and cuda_compiler != "None"]
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('libxgboost', max_pin='x.x.x') }}
- libxgboost =*={{ string_prefix }}_h*_{{ PKG_BUILDNUM }}
- r-base
- r-matrix
- r-data.table
- r-magrittr
- r-jsonlite
- r-knitr
run:
- {{ pin_subpackage('libxgboost', max_pin='x.x.x') }}
- libxgboost =*={{ string_prefix }}_h*_{{ PKG_BUILDNUM }}
- r-base
- r-matrix
- r-data.table
- r-magrittr
- r-jsonlite
test:
requires:
- r-base
files:
- test-r-xgboost.r
commands:
- Rscript test-r-xgboost.r
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