mrs83 commited on
Commit
073de93
·
1 Parent(s): 17918b4

add superlink host and port settings

Browse files
blossomtune_gradio/config.py CHANGED
@@ -17,3 +17,5 @@ SMTP_REQUIRE_TLS = util.strtobool(os.getenv("SMTP_REQUIRE_TLS", "false"))
17
  SMTP_USER = os.getenv("SMTP_USER", "")
18
  SMTP_PASSWORD = os.getenv("SMTP_PASSWORD", "")
19
  EMAIL_PROVIDER = os.getenv("EMAIL_PROVIDER", "smtp")
 
 
 
17
  SMTP_USER = os.getenv("SMTP_USER", "")
18
  SMTP_PASSWORD = os.getenv("SMTP_PASSWORD", "")
19
  EMAIL_PROVIDER = os.getenv("EMAIL_PROVIDER", "smtp")
20
+ SUPERLINK_HOST = os.getenv("SUPERLINK_HOST", "")
21
+ SUPERLINK_PORT = int(os.getenv("SUPERLINK_PORT", 9092))
blossomtune_gradio/federation.py CHANGED
@@ -119,10 +119,12 @@ def check_participant_status(pid_to_check: str, email: str, activation_code: str
119
  if not cfg.SPACE_ID
120
  else f"{cfg.SPACE_ID.split('/')[1]}-{cfg.SPACE_ID.split('/')[0]}.hf.space"
121
  )
 
 
122
  connection_string = f"""### ✅ Approved
123
  Your request for ID `{participant_id}` has been approved.
124
  - **Your Assigned Partition ID:** `{partition_id}`
125
- - **Superlink Address:** `{hostname}:9092`
126
 
127
  **Instructions:** Your Flower client code should use your assigned Partition ID to load the correct data subset.
128
  The server address is for your client's connection command.
 
119
  if not cfg.SPACE_ID
120
  else f"{cfg.SPACE_ID.split('/')[1]}-{cfg.SPACE_ID.split('/')[0]}.hf.space"
121
  )
122
+ superlink_hostname = cfg.SUPERLINK_HOST or hostname
123
+ superlink_port = str(cfg.SUPERLINK_PORT)
124
  connection_string = f"""### ✅ Approved
125
  Your request for ID `{participant_id}` has been approved.
126
  - **Your Assigned Partition ID:** `{partition_id}`
127
+ - **Superlink Address:** `{superlink_hostname}:{superlink_port}`
128
 
129
  **Instructions:** Your Flower client code should use your assigned Partition ID to load the correct data subset.
130
  The server address is for your client's connection command.