Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug/SK-931 | --preferred-combiner should not be boolean #667

Merged
merged 15 commits into from
Aug 16, 2024
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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove this

"validator": True,
"trainer": True,
"init": None,
Expand Down
2 changes: 1 addition & 1 deletion 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", "--preferred-combiner", type=str,required=False, 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 Down
3 changes: 1 addition & 2 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", "--preferred-combiner", required=False,type=str, default="combiner",help="url to the combiner or 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 Down Expand Up @@ -262,7 +262,6 @@ 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")

try:
validate_client_config(config)
except InvalidClientConfig as e:
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this changed to "str"?

Copy link
Contributor Author

@sowmyasris sowmyasris Aug 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this param is for preferred-combiner which will be the name of the combiner, so verifying if it is string.

:param combiner: name of preferred combiner
:type combiner: str
:param id: id of client
Expand Down
Loading