Skip to content

Commit

Permalink
changed the type of the combiner to string
Browse files Browse the repository at this point in the history
  • Loading branch information
sowmyasris committed Jul 31, 2024
1 parent efcea62 commit 035749d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/async-clients/run_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"secure": False,
"preshared_cert": False,
"verify": False,
"preferred_combiner": False,
"combiner": "combiner",
"validator": True,
"trainer": True,
"init": None,
Expand Down
8 changes: 4 additions & 4 deletions fedn/cli/client_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def list_clients(ctx, protocol: str, host: str, port: str, token: str = None, n_
@click.option("-s", "--secure", required=False, default=False)
@click.option("-pc", "--preshared-cert", required=False, default=False)
@click.option("-v", "--verify", is_flag=True, help="Verify SSL/TLS for REST service")
@click.option("-c", "--preferred-combiner", required=False, default=False)
@click.option("-c", "--combiner", type=str,required=False, default="combiner",name="name of the preferred combiner")
@click.option("-va", "--validator", required=False, default=True)
@click.option("-tr", "--trainer", required=False, default=True)
@click.option("-in", "--init", required=False, default=None, help="Set to a filename to (re)init client from file state.")
Expand All @@ -101,7 +101,7 @@ def client_cmd(
secure,
preshared_cert,
verify,
preferred_combiner,
combiner,
validator,
trainer,
init,
Expand All @@ -121,7 +121,7 @@ def client_cmd(
:param secure:
:param preshared_cert:
:param verify_cert:
:param preferred_combiner:
:param combiner:
:param init:
:param logfile:
:param hearbeat_interval
Expand All @@ -142,7 +142,7 @@ def client_cmd(
"secure": secure,
"preshared_cert": preshared_cert,
"verify": verify,
"preferred_combiner": preferred_combiner,
"preferred_combiner": combiner,
"validator": validator,
"trainer": trainer,
"logfile": logfile,
Expand Down
10 changes: 6 additions & 4 deletions fedn/cli/run_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def build_cmd(ctx, path):
@click.option("-s", "--secure", required=False, default=False)
@click.option("-pc", "--preshared-cert", required=False, default=False)
@click.option("-v", "--verify", is_flag=True, help="Verify SSL/TLS for REST service")
@click.option("-c", "--preferred-combiner", required=False, default=False)
@click.option("-c", "--combiner", required=False,type=str, default="combiner",help="name of the preferred combiner")
@click.option("-va", "--validator", required=False, default=True)
@click.option("-tr", "--trainer", required=False, default=True)
@click.option("-in", "--init", required=False, default=None, help="Set to a filename to (re)init client from file state.")
Expand All @@ -204,7 +204,7 @@ def client_cmd(
secure,
preshared_cert,
verify,
preferred_combiner,
combiner,
validator,
trainer,
init,
Expand All @@ -224,7 +224,7 @@ def client_cmd(
:param secure:
:param preshared_cert:
:param verify_cert:
:param preferred_combiner:
:param combiner:
:param init:
:param logfile:
:param hearbeat_interval
Expand All @@ -245,7 +245,7 @@ def client_cmd(
"secure": secure,
"preshared_cert": preshared_cert,
"verify": verify,
"preferred_combiner": preferred_combiner,
"preferred_combiner": combiner,
"validator": validator,
"trainer": trainer,
"logfile": logfile,
Expand All @@ -262,6 +262,7 @@ def client_cmd(
apply_config(init, config)
click.echo(f"\nClient configuration loaded from file: {init}")
click.echo("Values set in file override defaults and command line arguments...\n")
click.echo(f"config {config}")

try:
validate_client_config(config)
Expand Down Expand Up @@ -316,6 +317,7 @@ def combiner_cmd(ctx, discoverhost, discoverport, token, name, host, port, fqdn,
)

if init:
print(config)
apply_config(init, config)
click.echo(f"\nCombiner configuration loaded from file: {init}")
click.echo("Values set in file override defaults and command line arguments...\n")
Expand Down
2 changes: 1 addition & 1 deletion fedn/network/clients/connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ConnectorClient:
:param force_ssl: True if https is used, False if http
:type force_ssl: bool
:param verify: True if certificate is verified, False if not
:type verify: bool
:type verify: str
:param combiner: name of preferred combiner
:type combiner: str
:param id: id of client
Expand Down

0 comments on commit 035749d

Please sign in to comment.