Skip to content

Commit

Permalink
update other places
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed May 11, 2021
1 parent 23521a5 commit 8f01b98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python-package/lightgbm/dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _concat(seq: List[_DaskPart]) -> _DaskPart:
elif isinstance(seq[0], ss.spmatrix):
return ss.vstack(seq, format='csr')
else:
raise TypeError('Data must be one of: numpy arrays, pandas dataframes, sparse matrices (from scipy). Got %s.' % str(type(seq[0])))
raise TypeError(f'Data must be one of: numpy arrays, pandas dataframes, sparse matrices (from scipy). Got {str(type(seq[0]))}.')


def _train_part(
Expand Down Expand Up @@ -413,7 +413,7 @@ def _train(
)

machines = ','.join([
'%s:%d' % (urlparse(worker_address).hostname, port)
f'{urlparse(worker_address).hostname}:{port}'
for worker_address, port
in worker_address_to_port.items()
])
Expand Down Expand Up @@ -572,7 +572,7 @@ def _predict(
drop_axis=1
)
else:
raise TypeError('Data must be either Dask Array or Dask DataFrame. Got %s.' % str(type(data)))
raise TypeError(f'Data must be either Dask Array or Dask DataFrame. Got {str(type(data))}.')


class _DaskLGBMModel:
Expand Down

0 comments on commit 8f01b98

Please sign in to comment.