Spaces:
Runtime error
Runtime error
Soutrik
commited on
Commit
·
98ad2ca
1
Parent(s):
53f077b
added: flag for docker compose
Browse files
src/train_optuna_callbacks.py
CHANGED
@@ -203,6 +203,10 @@ def setup_trainer(cfg: DictConfig):
|
|
203 |
json.dump(best_hyperparams, f, indent=4)
|
204 |
logger.info(f"Best hyperparameters saved to {best_hyperparams_path}")
|
205 |
|
|
|
|
|
|
|
|
|
206 |
# Testing phase with best hyperparameters
|
207 |
if cfg.get("test", False):
|
208 |
best_hyperparams_path = Path(cfg.paths.ckpt_dir) / "best_hyperparams.json"
|
|
|
203 |
json.dump(best_hyperparams, f, indent=4)
|
204 |
logger.info(f"Best hyperparameters saved to {best_hyperparams_path}")
|
205 |
|
206 |
+
# train_done.flag file to indicate training completion in checkpoints directory
|
207 |
+
with open(Path(cfg.paths.ckpt_dir) / "train_done.flag", "w") as f:
|
208 |
+
f.write("Training completed successfully!")
|
209 |
+
|
210 |
# Testing phase with best hyperparameters
|
211 |
if cfg.get("test", False):
|
212 |
best_hyperparams_path = Path(cfg.paths.ckpt_dir) / "best_hyperparams.json"
|