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

Feature/SK-1257 | Bugfixes and improvements of combiner, and new load test #774

Open
wants to merge 52 commits into
base: master
Choose a base branch
from

Conversation

ahellander
Copy link
Member

Description

Implements a new load test based on reading, writing and sending numpy arrays. Resolves bugs;

  • Files are not deleted as the should in FedOpt
  • Improves error handling in FedOpt
  • Adds some missing time measurements in combiner
  • Fixes the issue that fedn.yaml must contain python_env

@github-actions github-actions bot added feature New feature or request docs minor labels Dec 16, 2024
@ahellander ahellander changed the title Feature/sk 1257 | Bugfixes and improvements of combiner, and new load test Feature/SK-1257 | Bugfixes and improvements of combiner, and new load test Dec 16, 2024
@ahellander ahellander requested a review from Wrede January 8, 2025 11:10

Standing in examples/load-test
```
pip install -r requirements.txt
Copy link
Member

Choose a reason for hiding this comment

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

where's the req file?

way by sending and aggregating numeric arrays of varying size.

## Prerequisites
- [Python 3.9 or 3.10](https://www.python.org/downloads)
Copy link
Member

Choose a reason for hiding this comment

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

why only 3.9 and 3.10?

Copy link
Member

@Wrede Wrede left a comment

Choose a reason for hiding this comment

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

need some fixes

@@ -160,7 +160,7 @@ def get_or_set_environment(self) -> bool:
self.dispatcher.run_cmd("startup")
except KeyError:
logger.info("No startup command found in package. Continuing.")
return False
# return False
Copy link
Member

Choose a reason for hiding this comment

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

remove comment

@@ -215,6 +215,7 @@ def update_local_model(self, request):
return

fetch_model_time = time.time() - tic
print("FETCH_MODEL: ", fetch_model_time)
Copy link
Member

Choose a reason for hiding this comment

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

use logger for printing

@@ -237,6 +238,7 @@ def update_local_model(self, request):
tic = time.time()
self.send_model_to_combiner(model=out_model, id=model_update_id)
meta["upload_model"] = time.time() - tic
print("UPLOAD_MODEL ", meta["upload_model"])
Copy link
Member

Choose a reason for hiding this comment

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

use logger for printing

@@ -122,7 +124,7 @@ def heartbeat(self, client_name: str, client_id: str):
heartbeat = fedn.Heartbeat(sender=fedn.Client(name=client_name, role=fedn.CLIENT, client_id=client_id))

try:
logger.info("Sending heartbeat to combiner")
# logger.info("Sending heartbeat to combiner")
Copy link
Member

Choose a reason for hiding this comment

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

remove comments

@@ -142,7 +144,8 @@ def send_heartbeats(self, client_name: str, client_id: str, update_frequency: fl
except Exception as e:
return self._handle_unknown_error(e, "SendHeartbeat", lambda: self.send_heartbeats(client_name, client_id, update_frequency))
if isinstance(response, fedn.Response):
logger.info("Heartbeat successful.")
pass
# logger.info("Heartbeat successful.")
Copy link
Member

Choose a reason for hiding this comment

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

remove comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs feature New feature or request minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants