Skip to content

Commit bcf9881

Browse files
committed
[CoreEngine] save the relationship between endpoint and run id.
1 parent 3214f4a commit bcf9881

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

python/fedml/computing/scheduler/master/deploy_job_launcher.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from fedml.computing.scheduler.model_scheduler import device_client_constants
44
from fedml.computing.scheduler.model_scheduler.device_model_cards import FedMLModelCards
55
from fedml.computing.scheduler.scheduler_entry.constants import Constants
6-
from fedml.computing.scheduler.scheduler_core.compute_cache_manager import ComputeCacheManager
76

87

98
class FedMLDeployJobLauncher:
@@ -90,11 +89,7 @@ def check_model_device_ready_and_deploy(self, request_json, run_id, master_devic
9089
serving_devices.extend(device_slave_ids)
9190

9291
# Start to deploy the model
93-
endpoint_id = FedMLDeployJobLauncher.deploy_model(serving_devices, request_json, run_id=run_id)
92+
FedMLDeployJobLauncher.deploy_model(serving_devices, request_json, run_id=run_id)
9493

95-
# Save the relationship between run id and endpoint
96-
ComputeCacheManager.get_instance().set_redis_params()
97-
ComputeCacheManager.get_instance().get_gpu_cache().set_endpoint_run_id_map(
98-
endpoint_id, run_id)
9994

10095

python/fedml/computing/scheduler/slave/base_slave_protocol_manager.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,12 @@ def callback_start_train(self, topic, payload):
257257
model_master_device_id=model_master_device_id,
258258
model_slave_device_id=model_slave_device_id)
259259
else:
260+
# Save the relationship between run id and endpoint
261+
ComputeCacheManager.get_instance().set_redis_params()
262+
ComputeCacheManager.get_instance().get_gpu_cache().set_endpoint_run_id_map(
263+
endpoint_id, run_id)
264+
265+
# Report the run status with finished status and return
260266
self.generate_status_report(run_id, edge_id, server_agent_id=server_agent_id).report_client_id_status(
261267
edge_id, GeneralConstants.MSG_MLOPS_CLIENT_STATUS_FINISHED, run_id=run_id)
262268
return

0 commit comments

Comments
 (0)