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

[CoreEngine] report the job status with reasonable edge id when it is running in the public cloud agent. #1220

Merged
merged 1 commit into from
Aug 17, 2023
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 python/fedml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
_global_training_type = None
_global_comm_backend = None

__version__ = "0.8.8a23"
__version__ = "0.8.8a24"


def init(args=None):
Expand Down
6 changes: 4 additions & 2 deletions python/fedml/cli/server_deployment/server_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ def cleanup_run_when_finished(self):
logging.info("Cleanup run successfully when finished.")

self.mlops_metrics.broadcast_server_training_status(
self.run_id, ServerConstants.MSG_MLOPS_SERVER_STATUS_FINISHED
self.run_id, ServerConstants.MSG_MLOPS_SERVER_STATUS_FINISHED, edge_id=self.edge_id
)

try:
Expand All @@ -661,7 +661,9 @@ def cleanup_run_when_starting_failed(self):

logging.info("Cleanup run successfully when starting failed.")

self.mlops_metrics.broadcast_server_training_status(self.run_id, ServerConstants.MSG_MLOPS_SERVER_STATUS_FAILED)
self.mlops_metrics.broadcast_server_training_status(self.run_id,
ServerConstants.MSG_MLOPS_SERVER_STATUS_FAILED,
edge_id=self.edge_id)

try:
self.mlops_metrics.stop_sys_perf()
Expand Down
4 changes: 2 additions & 2 deletions python/fedml/core/mlops/mlops_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,15 +268,15 @@ def common_report_server_training_status(self, run_id, status, role=None):
self.messenger.send_message_json(topic_name, message_json)
self.report_server_id_status(run_id, status)

def broadcast_server_training_status(self, run_id, status, role=None, is_from_model=False):
def broadcast_server_training_status(self, run_id, status, role=None, is_from_model=False, edge_id=None):
if self.messenger is None:
return
topic_name = "fl_run/fl_server/mlops/status"
if role is None:
role = "normal"
msg = {
"run_id": run_id,
"edge_id": self.edge_id,
"edge_id": self.edge_id if edge_id is None else edge_id,
"status": status,
"role": role,
}
Expand Down
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def finalize_options(self):

setup(
name="fedml",
version="0.8.8a23",
version="0.8.8a24",
author="FedML Team",
author_email="[email protected]",
description="A research and production integrated edge-cloud library for "
Expand Down