[backport] CI fixes (#6933)
* Relax shotgun test. (#6900) It's non-deterministic algorithm, the test is flaky. * Disable pylint error. (#6911) * [CI] Skip external memory gtest on osx. (#6901) * [CI] Fix custom metric test with empty dataset. (#6917) * Reduce Travis environment setup time. (#6912) * Remove unused r from travis. * Don't update homebrew. * Don't install indirect/unused dependencies like libgit2, wget, openssl. * Move graphviz installation to conda. * Relax shotgun test. (#6918) * Relax test for decision stump in distributed environment. (#6919) * Backport cupy fix.
This commit is contained in:
@@ -1872,7 +1872,9 @@ class Booster(object):
|
||||
)
|
||||
)
|
||||
return _prediction_output(shape, dims, preds, False)
|
||||
if lazy_isinstance(data, "cupy.core.core", "ndarray"):
|
||||
if lazy_isinstance(data, "cupy.core.core", "ndarray") or lazy_isinstance(
|
||||
data, "cupy._core.core", "ndarray"
|
||||
):
|
||||
from .data import _transform_cupy_array
|
||||
data = _transform_cupy_array(data)
|
||||
interface = data.__cuda_array_interface__
|
||||
@@ -2027,7 +2029,7 @@ class Booster(object):
|
||||
"""
|
||||
if isinstance(fout, (STRING_TYPES, os.PathLike)):
|
||||
fout = os.fspath(os.path.expanduser(fout))
|
||||
fout = open(fout, 'w')
|
||||
fout = open(fout, 'w') # pylint: disable=consider-using-with
|
||||
need_close = True
|
||||
else:
|
||||
need_close = False
|
||||
|
||||
Reference in New Issue
Block a user