Skip to content

Commit 31a5f13

Browse files
authored
quickfix (SSH based option fix) (#863)
* fixed bug in SSH not correctly creating dispatcher_kwargs + clarified error message
1 parent 3a0a522 commit 31a5f13

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

netpyne/batchtools/search.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,15 @@ def ray_search(dispatcher_constructor: Callable, # constructor for the dispatche
202202
expected_total = params.pop('_expected_trials_per_sample') * num_samples
203203
if (dispatcher_constructor == runtk.dispatchers.SSHDispatcher) or \
204204
(dispatcher_constructor == SSHGridDispatcher):
205-
if submit_constructor == submits.SGESubmitSFS:
205+
dispatcher_kwargs = None
206+
if submit_constructor == submits.SGESubmitSSH:
206207
from fabric import connection
207208
dispatcher_kwargs = {'connection': connection.Connection(host)}
208209
if submit_constructor == submits.SlurmSubmitSSH:
209210
from batchtk.utils import TOTPConnection
210211
dispatcher_kwargs = {'connection': TOTPConnection(host, key)}
212+
if dispatcher_kwargs == None:
213+
raise ValueError("for SSH based methods, please provide either 'sftp' or None as the comm_type")
211214
else:
212215
dispatcher_kwargs = {}
213216
if ray_config is None:
@@ -514,20 +517,20 @@ def search(dispatcher_constructor: Optional[Callable] = None, # constructor for
514517
"""
515518
SEE:
516519
'variant_generator'
517-
'random' -> points to variant_generator
520+
'random' <- deprecated -> points to variant_generator
518521
'ax'
519-
'dragonfly'
520-
'skopt'
522+
'dragonfly' <- deprecated
523+
'skopt' <- deprecated
521524
'hyperopt'
522525
'bayesopt'
523526
'bohb'
524527
'nevergrad'
525528
'optuna'
526529
'zoopt'
527-
'sigopt'
530+
'sigopt' <- deprecated
528531
'hebo'
529-
'blendsearch'
530-
'cfo'
532+
'blendsearch' <- deprecated
533+
'cfo' <- deprecated
531534
"""
532535

533536

0 commit comments

Comments
 (0)