Skip to content

Commit ab2684f

Browse files
committed
remove add_ssh_config()
1 parent f89d9e2 commit ab2684f

4 files changed

Lines changed: 13 additions & 15 deletions

File tree

ludwig/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
__version__ = '3.1.0'
3+
__version__ = '3.2.0'
44

55

66
def print_ludwig(s):

ludwig/__main__.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,6 @@
1919
from ludwig import configs
2020

2121

22-
def add_ssh_config():
23-
"""
24-
copy content of <ludwig_data_path>/.ludwig/config to ~/.ssh/ludwig_config.
25-
26-
note: this file contains the hostnames of Ludwig workers and their corresponding IP addresses.
27-
"""
28-
src = configs.WorkerDirs.ludwig_data / '.ludwig' / 'config'
29-
dst = Path().home() / '.ssh' / 'ludwig_config' # do not overwrite existing config
30-
print_ludwig('Copying {} to {}'.format(src, dst))
31-
shutil.copy(src, dst)
32-
33-
3422
def status():
3523
"""
3624
return filtered stdout (to which workers are printing) to get a sense of what workers are doing

ludwig/configs.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,16 @@ class Constants:
3232
runs = 'runs'
3333
added_param_names = ['job_name', 'param_name', 'project_path', 'save_path']
3434

35+
worker2ip = {
36+
'bengio': '130.126.181.116',
37+
'hinton': '130.126.181.117',
38+
'hoff': '130.126.181.118',
39+
'norman': '130.126.181.119',
40+
'hawkins': '130.126.181.120',
41+
'hebb': '130.126.181.121',
42+
'pitts': '130.126.181.122',
43+
'lecun': '130.126.181.123',
44+
}
45+
3546

3647
hostname = socket.gethostname()

ludwig/uploader.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ def __init__(self,
2424
self.project_name = project_path.name
2525
self.src_name = src_name
2626
self.runs_path = self.project_path / 'runs'
27-
self.worker2ip = self.make_worker2ip()
2827

2928
@staticmethod
3029
def make_worker2ip():
@@ -127,7 +126,7 @@ def start_jobs(self,
127126
if not private_key_path.exists():
128127
raise OSError(f'Did not find {private_key_path}')
129128
sftp = pysftp.Connection(username='ludwig',
130-
host=self.worker2ip[worker],
129+
host=configs.Constants.worker2ip[worker],
131130
private_key=str(private_key_path),
132131
cnopts=cnopts)
133132

0 commit comments

Comments
 (0)