Skip to content

Commit

Permalink
Bug/SK-853 | Helper for package ignored in start_session #616
Browse files Browse the repository at this point in the history
  • Loading branch information
Wrede authored Jun 7, 2024
1 parent 0628178 commit 48d2647
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fedn/network/api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ def start_session(
round_buffer_size: int = -1,
delete_models: bool = True,
validate: bool = True,
helper: str = "numpyhelper",
helper: str = "",
min_clients: int = 1,
requested_clients: int = 8,
):
Expand Down
8 changes: 6 additions & 2 deletions fedn/network/api/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ def start_session(
round_buffer_size=-1,
delete_models=True,
validate=True,
helper="numpyhelper",
helper="",
min_clients=1,
requested_clients=8,
):
Expand Down Expand Up @@ -1002,13 +1002,17 @@ def start_session(
return jsonify({"success": False, "message": "A session is already running."})

# Check if compute package is set
if not self.statestore.get_compute_package():
package = self.statestore.get_compute_package()
if not package:
return jsonify(
{
"success": False,
"message": "No compute package set. Set compute package before starting session.",
}
)
if not helper:
# get helper from compute package
helper = package["helper"]

# Check that initial (seed) model is set
if not self.statestore.get_initial_model():
Expand Down

0 comments on commit 48d2647

Please sign in to comment.