You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for chief (coordinator) node in TensorFlow distributed training
The actual train_tf_ps.py is only a placeholder for development testings and must be refined and correctly commented for a real workload.
- Extend `train_tf_ps.py` to include a chief address and port in cluster configuration.
- Update `make_parameter_server_strategy` to validate and configure the chief node, including `TF_CONFIG` setup.
- Modify `run_tf_training_from_bastion.sh` to detect and validate a routable IPv4 address for the chief node.
- Adjust `.gitignore` to exclude `output/`.
- Add gRPC port mapping for the chief node in `docker-compose.yml`.
- Update model saving path in `train_tf_ps.py` to include `.keras` extension.
parser=argparse.ArgumentParser(description="Train TF Keras model on health.csv with optional ParameterServerStrategy")
251
287
parser.add_argument("--data-path", default=os.environ.get("DATA_PATH", "infra/local/mysql-database/health.csv"), help="Path to CSV (when running on bastion/host)")
252
288
parser.add_argument("--data-url", default=os.environ.get("DATA_URL", ""), help="HTTP(S) URL to CSV (used inside cluster if path not mounted)")
parser.add_argument("--chief-addr", default=os.environ.get("CHIEF_ADDR", ""), help="Routable IPv4 address of the coordinator (bastion) accessible from K8s pods")
299
+
parser.add_argument("--chief-port", type=int, default=int(os.environ.get("CHIEF_PORT", "2223")), help="Coordinator gRPC port (exposed on tf-bastion)")
262
300
returnparser.parse_args(argv)
263
301
264
302
265
303
if__name__=="__main__":
266
304
args=parse_args(sys.argv[1:])
267
-
305
+
input("Press enter to continue...")
268
306
# Resolve data source: prefer local path; if not existent and data-url provided -> use URL
0 commit comments