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-853 | Helper for package ignored in start_session #616

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]
Copy link
Member

Choose a reason for hiding this comment

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

Wait, it we can do this here, we should be able to do it also on the combiner? In that case - can we completely eliminate the need to set the helper in the session_config and instead have it encoded in the fedn.yaml? Even if we in the future will not always have a package, I think we will always have the concept of a Project where a fedn.yaml is used to configure things.

Copy link
Member Author

Choose a reason for hiding this comment

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

I do not completely follow, the package is not used by combiner, sire you could fetch this iformation using the statestore client. Also, this is beyond this PR. This is a small fix.


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