Unverified Commit 17d0290e authored by ropoctl's avatar ropoctl Committed by GitHub
Browse files

Why crash the whole run when HFHub gives a 50x error? (#23320)

Logging an error and continuing is probably following the principle of least surprise.
parent d712ebd8
...@@ -3649,6 +3649,8 @@ class Trainer: ...@@ -3649,6 +3649,8 @@ class Trainer:
_, self.push_in_progress = self.repo.push_to_hub( _, self.push_in_progress = self.repo.push_to_hub(
commit_message=commit_message, blocking=False, auto_lfs_prune=True commit_message=commit_message, blocking=False, auto_lfs_prune=True
) )
except Exception as e:
logger.error(f"Error when pushing to hub: {e}")
finally: finally:
if self.args.hub_strategy == HubStrategy.CHECKPOINT: if self.args.hub_strategy == HubStrategy.CHECKPOINT:
# Move back the checkpoint to its place # Move back the checkpoint to its place
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment