Skip to content

Commit

Permalink
set session_id if empty earlier in start session process.
Browse files Browse the repository at this point in the history
  • Loading branch information
niklastheman committed Nov 17, 2023
1 parent 2880e51 commit 19b04fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion fedn/fedn/network/api/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import copy
import os
import threading
import uuid
from io import BytesIO

from flask import jsonify, send_from_directory
Expand Down Expand Up @@ -863,7 +864,7 @@ def start_session(

# Setup session config
session_config = {
"session_id": session_id,
"session_id": session_id if session_id else str(uuid.uuid4()),
"round_timeout": round_timeout,
"buffer_size": round_buffer_size,
"model_id": model_id,
Expand Down
2 changes: 1 addition & 1 deletion fedn/fedn/network/controller/controlbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def create_session(self, config):
session_id = uuid.uuid4()
config["session_id"] = str(session_id)
else:
session_id = config["session_id"] if config["session_id"] else uuid.uuid4()
session_id = config["session_id"]

self.tracer.create_session(id=session_id)
self.tracer.set_session_config(session_id, config)
Expand Down

0 comments on commit 19b04fe

Please sign in to comment.