You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue has been reported by multiple users when they attempted to install and use JAHS-Bench-201 whose surrogates are based on XGBoost on macOS. Here are a few details:
MacBook Pro 15", 2018
MacOS 13.0 (Ventura) but happened on MacOS 12.* (Monterey) as well
MacBook Pro 13'', M2, 2022 (Monterey)
I created a new conda environment (conda 4.13.0) with Python 3.7.15 (but the same error with Python 3.10.) and installed JAHS-Bench-201 with pip install jahs-bench. Running python -m jahs_bench_examples.minimal leads to the following error:
[20:03:24] WARNING: /Users/runner/work/xgboost/xgboost/src/gbm/gbtree.cc:386: Loading from a raw memory buffer on CPU only machine. Changing tree_method to hist.
Traceback (most recent call last):
File "/usr/local/Caskroom/miniconda/base/envs/jahs_bench_test/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/Caskroom/miniconda/base/envs/jahs_bench_test/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/Caskroom/miniconda/base/envs/jahs_bench_test/lib/python3.7/site-packages/jahs_bench_examples/minimal.py", line 13, in <module>
run()
File "/usr/local/Caskroom/miniconda/base/envs/jahs_bench_test/lib/python3.7/site-packages/jahs_bench_examples/minimal.py", line 5, in run
benchmark = jahs_bench.Benchmark(task="cifar10", kind="surrogate", download=True)
File "/usr/local/Caskroom/miniconda/base/envs/jahs_bench_test/lib/python3.7/site-packages/jahs_bench/api.py", line 135, in __init__
loaders[kind]()
File "/usr/local/Caskroom/miniconda/base/envs/jahs_bench_test/lib/python3.7/site-packages/jahs_bench/api.py", line 148, in _load_surrogate
self._surrogates[o] = XGBSurrogate.load(pth) if not self._lazy else \
File "/usr/local/Caskroom/miniconda/base/envs/jahs_bench_test/lib/python3.7/site-packages/jahs_bench/surrogate/model.py", line 462, in load
model = joblib.load(outdir / cls.__model_filename)
File "/usr/local/Caskroom/miniconda/base/envs/jahs_bench_test/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 587, in load
obj = _unpickle(fobj, filename, mmap_mode)
File "/usr/local/Caskroom/miniconda/base/envs/jahs_bench_test/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 506, in _unpickle
obj = unpickler.load()
File "/usr/local/Caskroom/miniconda/base/envs/jahs_bench_test/lib/python3.7/pickle.py", line 1088, in load
dispatch[key[0]](self)
File "/usr/local/Caskroom/miniconda/base/envs/jahs_bench_test/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 331, in load_build
Unpickler.load_build(self)
File "/usr/local/Caskroom/miniconda/base/envs/jahs_bench_test/lib/python3.7/pickle.py", line 1552, in load_build
setstate(state)
File "/usr/local/Caskroom/miniconda/base/envs/jahs_bench_test/lib/python3.7/site-packages/xgboost/core.py", line 1452, in __setstate__
_LIB.XGBoosterUnserializeFromBuffer(handle, ptr, length))
File "/usr/local/Caskroom/miniconda/base/envs/jahs_bench_test/lib/python3.7/site-packages/xgboost/core.py", line 218, in _check_call
raise XGBoostError(py_str(_LIB.XGBGetLastError()))
xgboost.core.XGBoostError: [20:03:24] /Users/runner/work/xgboost/xgboost/src/tree/tree_updater.cc:20: Unknown tree updater grow_gpu_hist
Stack trace:
[bt] (0) 1 libxgboost.dylib 0x000000012a9fa4a4 dmlc::LogMessageFatal::~LogMessageFatal() + 116
[bt] (1) 2 libxgboost.dylib 0x000000012ab43f39 xgboost::TreeUpdater::Create(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, xgboost::GenericParameter const*) + 729
[bt] (2) 3 libxgboost.dylib 0x000000012aa85d8a xgboost::gbm::GBTree::LoadConfig(xgboost::Json const&) + 2634
[bt] (3) 4 libxgboost.dylib 0x000000012aaa4246 xgboost::LearnerConfiguration::LoadConfig(xgboost::Json const&) + 742
[bt] (4) 5 libxgboost.dylib 0x000000012aaa5827 xgboost::LearnerIO::Load(dmlc::Stream*) + 743
[bt] (5) 6 libxgboost.dylib 0x000000012a9f5101 XGBoosterUnserializeFromBuffer + 145
[bt] (6) 7 libffi.8.dylib 0x00000001075cda22 ffi_call_unix64 + 82
[bt] (7) 8 ??? 0x00007ff7b8e931e0 0x0 + 140701935940064
Details on versions of any packages installed in the conda environment (conda list):
Hi, apologies for the slow response. This is actually a pickle compatibility issue, we recommend using save_model instead of Python pickle. The latter requires the pickled object to preserve the complete information including parameters like which device to use. Since the macos build is not CUDA-enabled, the GPU implementation is not available on that platform. save_model function can be used to discard all the hyper-parameters that are not related to the model itself. For more details, please see https://xgboost.readthedocs.io/en/stable/tutorials/saving_model.html .
This issue has been reported by multiple users when they attempted to install and use JAHS-Bench-201 whose surrogates are based on XGBoost on macOS. Here are a few details:
MacBook Pro 15", 2018
MacOS 13.0 (Ventura) but happened on MacOS 12.* (Monterey) as well
MacBook Pro 13'', M2, 2022 (Monterey)
I created a new conda environment (conda 4.13.0) with Python 3.7.15 (but the same error with Python 3.10.) and installed JAHS-Bench-201 with
pip install jahs-bench
. Runningpython -m jahs_bench_examples.minimal
leads to the following error:Details on versions of any packages installed in the conda environment (
conda list
):The text was updated successfully, but these errors were encountered: