Skip to content

Commit 6940fe9

Browse files
committed
Refactor LoRAServerSocket initialization for improved readability
- Reformatted the constructor of the `LoRAServerSocket` class to enhance clarity by using multi-line argument definitions. - Updated the `lora_contributor_sample_script.py` for consistent formatting of the `LoRAServerSocket` instantiation.
1 parent d1767f7 commit 6940fe9

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

src/scripts/lora_contributor_sample_script.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ def main():
1616

1717
stop_event = threading.Event()
1818
server_obj = LoRAServer(args.base_model, args.lora_model_id, args.out_dir)
19-
t = LoRAServerSocket(args.host, args.port_a, server_obj, stop_event, stop_timeout=1.0)
19+
t = LoRAServerSocket(
20+
args.host, args.port_a, server_obj, stop_event, stop_timeout=1.0
21+
)
2022
t.start()
2123

2224
try:

src/zklora/lora_contributor_mpi/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,14 @@ def finalize_proofs_and_collect(self):
115115

116116

117117
class LoRAServerSocket(threading.Thread):
118-
def __init__(self, host, port, lora_server: LoRAServer, stop_event, stop_timeout: float = 1200.0):
118+
def __init__(
119+
self,
120+
host,
121+
port,
122+
lora_server: LoRAServer,
123+
stop_event,
124+
stop_timeout: float = 1200.0,
125+
):
119126
super().__init__()
120127
self.host = host
121128
self.port = port

0 commit comments

Comments
 (0)