Further improvements and savings in Jenkins pipeline (#5904)
* Publish artifacts only on the master and release branches * Build CUDA only for Compute Capability 7.5 when building PRs * Run all Windows jobs in a single worker image * Build nightly XGBoost4J SNAPSHOT JARs with Scala 2.12 only * Show skipped Python tests on Windows * Make Graphviz optional for Python tests * Add back C++ tests * Unstash xgboost_cpp_tests * Fix label to CUDA 10.1 * Install cuPy for CUDA 10.1 * Install jsonschema * Address reviewer's feedback
This commit is contained in:
committed by
GitHub
parent
6c0c87216f
commit
ac9136ee49
@@ -15,7 +15,7 @@ except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
pytestmark = pytest.mark.skipif(**tm.no_matplotlib())
|
||||
pytestmark = pytest.mark.skipif(**tm.no_multiple(tm.no_matplotlib(), tm.no_graphviz()))
|
||||
|
||||
|
||||
dpath = 'demo/data/'
|
||||
|
||||
@@ -437,6 +437,7 @@ def test_sklearn_api_gblinear():
|
||||
|
||||
|
||||
@pytest.mark.skipif(**tm.no_matplotlib())
|
||||
@pytest.mark.skipif(**tm.no_graphviz())
|
||||
def test_sklearn_plotting():
|
||||
from sklearn.datasets import load_iris
|
||||
|
||||
|
||||
@@ -98,6 +98,26 @@ def no_json_schema():
|
||||
return {'condition': True, 'reason': reason}
|
||||
|
||||
|
||||
def no_graphviz():
|
||||
reason = 'graphviz is not installed'
|
||||
try:
|
||||
import graphviz # noqa
|
||||
return {'condition': False, 'reason': reason}
|
||||
except ImportError:
|
||||
return {'condition': True, 'reason': reason}
|
||||
|
||||
|
||||
def no_multiple(*args):
|
||||
condition = False
|
||||
reason = ''
|
||||
for arg in args:
|
||||
condition = (condition or arg['condition'])
|
||||
if arg['condition']:
|
||||
reason = arg['reason']
|
||||
break
|
||||
return {'condition': condition, 'reason': reason}
|
||||
|
||||
|
||||
# Contains a dataset in numpy format as well as the relevant objective and metric
|
||||
class TestDataset:
|
||||
def __init__(self, name, get_dataset, objective, metric
|
||||
|
||||
Reference in New Issue
Block a user