From 5e0f88e4ba11a35b43e4f870eb3fb3da69567e14 Mon Sep 17 00:00:00 2001 From: Kevin Ta <116312994+kta-intel@users.noreply.github.com> Date: Fri, 29 Mar 2024 14:28:32 -0400 Subject: [PATCH] [Fixes #834] fx.init error when creating collaborator (#835) * Fixes issue with fx.init when creating collaborator Signed-off-by: kta-intel * Fixes #834 Signed-off-by: kta-intel * remove cert created by fx.init smoke test Signed-off-by: kta-intel * fix Lint with Flake8 / build test Signed-off-by: kta-intel --------- Signed-off-by: kta-intel --- openfl/interface/collaborator.py | 5 +++++ openfl/native/native.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/openfl/interface/collaborator.py b/openfl/interface/collaborator.py index bd20df300c..c28d4f194a 100644 --- a/openfl/interface/collaborator.py +++ b/openfl/interface/collaborator.py @@ -68,6 +68,11 @@ def start_(plan, collaborator_name, data_config, secure): help='The data path to be associated with the collaborator') @option('-s', '--silent', help='Do not prompt', is_flag=True) def create_(collaborator_name, data_path, silent): + """Creates a user for an experiment.""" + create(collaborator_name, data_path, silent) + + +def create(collaborator_name, data_path, silent): """Creates a user for an experiment.""" if data_path and is_directory_traversal(data_path): echo('Data path is out of the openfl workspace scope.') diff --git a/openfl/native/native.py b/openfl/native/native.py index 35ab3ed195..1842ec6412 100644 --- a/openfl/native/native.py +++ b/openfl/native/native.py @@ -203,7 +203,7 @@ def init(workspace_template: str = 'default', log_level: str = 'INFO', collaborator.create( col_name, str(data_path), silent=True) collaborator.generate_cert_request( - col_name, str(data_path), silent=True, skip_package=True) + col_name, silent=True, skip_package=True) collaborator.certify(col_name, silent=True) data_path += 1