Skip to content

Commit

Permalink
Merge pull request #186 from JoeyHwong-gk/fl_fix
Browse files Browse the repository at this point in the history
fix env variable error in aggregation
  • Loading branch information
kubeedge-bot authored Sep 8, 2021
2 parents bb4f651 + 06fb692 commit 938326a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,9 @@ def run_server():
participants_count = int(Context.get_parameters(
"participants_count", 1
))
agg_ip = Context.get_parameters("AGG_IP", "0.0.0.0")
agg_port = int(Context.get_parameters("AGG_PORT", "7363"))

server = AggregationServer(
aggregation=aggregation_algorithm,
host=agg_ip,
http_port=agg_port,
exit_round=exit_round,
ws_size=20 * 1024 * 1024,
participants_count=participants_count
Expand Down
7 changes: 5 additions & 2 deletions lib/sedna/service/server/aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from starlette.types import ASGIApp, Receive, Scope, Send

from sedna.common.log import LOGGER
from sedna.common.config import Context
from sedna.common.utils import get_host_ip
from sedna.common.class_factory import ClassFactory, ClassType
from sedna.algorithms.aggregation import AggClient
Expand Down Expand Up @@ -211,12 +212,14 @@ def __init__(
self,
aggregation: str,
host: str = None,
http_port: int = 7363,
http_port: int = None,
exit_round: int = 1,
participants_count: int = 1,
ws_size: int = 10 * 1024 * 1024):
if not host:
host = get_host_ip()
host = Context.get_parameters("AGG_BIND_IP", get_host_ip())
if not http_port:
http_port = int(Context.get_parameters("AGG_BIND_PORT", 7363))
super(
AggregationServer,
self).__init__(
Expand Down

0 comments on commit 938326a

Please sign in to comment.