Skip to content

Commit

Permalink
refactor: use None as default value for job_name param in init. (ray-…
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaihui authored Jan 2, 2024
1 parent 6153a9c commit 1f76e2e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fed/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def init(
sender_proxy_cls: SenderProxy = None,
receiver_proxy_cls: ReceiverProxy = None,
receiver_sender_proxy_cls: SenderReceiverProxy = None,
job_name: str = constants.RAYFED_DEFAULT_JOB_NAME,
job_name: str = None,
sending_failure_handler: Callable[[Exception], None] = None,
):
"""
Expand Down Expand Up @@ -166,6 +166,9 @@ def init(
assert party, "Party should be provided."
assert party in addresses, f"Party {party} is not in the addresses {addresses}."

if job_name is None:
job_name = constants.RAYFED_DEFAULT_JOB_NAME

fed_utils.validate_addresses(addresses)
init_global_context(
current_party=party,
Expand Down

0 comments on commit 1f76e2e

Please sign in to comment.