Skip to content

Commit

Permalink
Merge pull request rapidsai#1012 from rapidsai/branch-0.9
Browse files Browse the repository at this point in the history
[gpuCI] Auto-merge branch-0.9 to branch-0.10 [skip ci]
  • Loading branch information
GPUtester authored Aug 16, 2019
2 parents 8ab0e29 + 09eb9d2 commit 959fc41
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
- PR #988: Switch to exact tsne
- PR #991: Cleanup python code in cuml.dask.cluster
- PR #996: ucx_initialized being properly set in CommsContext
- PR #1007: Throws a well defined error when mutigpu is not enabled

# cuML 0.8.0 (27 June 2019)

Expand Down
8 changes: 7 additions & 1 deletion python/cuml/dask/cluster/kmeans.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,13 @@ def func_fit(sessionId, n_clusters, max_iter, tol, verbose, random_state,
:param r: Stops memoizatiion caching
:return: The fit model
"""
from cuml.cluster.kmeans_mg import KMeansMG as cumlKMeans
try:
from cuml.cluster.kmeans_mg import KMeansMG as cumlKMeans
except ImportError:
raise Exception("cuML has not been built with multiGPU support "
"enabled. Build with the --multigpu flag to"
" enable multiGPU support.")

handle = worker_state(sessionId)["handle"]

df = concat(dfs)
Expand Down
11 changes: 9 additions & 2 deletions python/cuml/dask/linear_model/linear_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,12 @@ def _fit_on_worker(data, params):
from cuml.linear_model.linear_regression_mg import LinearRegressionMG as cuOLS # NOQA
ols = cuOLS()
intercept = ols._fit_mg(alloc_info, params)
except ImportError:
raise Exception("cuML has not been built with multiGPU support "
"enabled. Build with the --multigpu flag to enable"
" multiGPU support.")
except Exception as e:
print("FAILURE in FIT: " + str(e))
print("Failure in Fit(): " + str(e))

[t.close() for t in open_ipcs]
# [t.join() for t in open_ipcs]
Expand Down Expand Up @@ -413,7 +417,10 @@ def _predict_on_worker(data, intercept, params):
from cuml.linear_model.linear_regression_mg import LinearRegressionMG as cuOLS # NOQA
ols = cuOLS()
ols._predict_mg(alloc_info, intercept, params)

except ImportError:
raise Exception("cuML has not been built with multiGPU support "
"enabled. Build with the --multigpu flag to enable"
" multiGPU support.")
except Exception as e:
print("Failure in predict(): " + str(e))

Expand Down

0 comments on commit 959fc41

Please sign in to comment.