"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "fe82b1bfa07aa054ef70583a561cb7c3978c697f"
Unverified Commit 7fa7408b authored by Matt's avatar Matt Committed by GitHub
Browse files

Terminate previous pushes when we get to the final push (#16409)

parent 867f3950
...@@ -370,7 +370,7 @@ class PushToHubCallback(Callback): ...@@ -370,7 +370,7 @@ class PushToHubCallback(Callback):
def on_train_end(self, logs=None): def on_train_end(self, logs=None):
if self.last_job is not None and not self.last_job.is_done: if self.last_job is not None and not self.last_job.is_done:
logger.info("Waiting for existing upload to finish...") self.last_job._process.terminate() # Gotta go fast
while not self.last_job.is_done: while not self.last_job.is_done:
sleep(1) sleep(1)
self.model.save_pretrained(self.output_dir) self.model.save_pretrained(self.output_dir)
......
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