Skip to content

Commit

Permalink
more barriers
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Oct 5, 2023
1 parent a1dd97b commit b394aec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions audiolm_pytorch/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ def __init__(
if self.is_main and force_clear_prev_results is True or (not exists(force_clear_prev_results) and len([*self.results_folder.glob('**/*')]) > 0 and yes_or_no('do you want to clear previous experiment checkpoints and results?')):
rmtree(str(self.results_folder))

self.accelerator.wait_for_everyone()
self.results_folder.mkdir(parents = True, exist_ok = True)

# Initialize experiment trackers if an external Accelerator is not passed in
Expand Down Expand Up @@ -705,6 +706,7 @@ def __init__(
if self.is_main and force_clear_prev_results is True or (not exists(force_clear_prev_results) and len([*self.results_folder.glob('**/*')]) > 0 and yes_or_no('do you want to clear previous experiment checkpoints and results?')):
rmtree(str(self.results_folder))

self.accelerator.wait_for_everyone()
self.results_folder.mkdir(parents = True, exist_ok = True)

hps = {"num_train_steps": num_train_steps, "data_max_length": data_max_length, "learning_rate": lr}
Expand Down Expand Up @@ -1239,6 +1241,7 @@ def __init__(
if force_clear_prev_results is True or (not exists(force_clear_prev_results) and len([*self.results_folder.glob('**/*')]) > 0 and yes_or_no('do you want to clear previous experiment checkpoints and results?')):
rmtree(str(self.results_folder))

self.accelerator.wait_for_everyone()
self.results_folder.mkdir(parents = True, exist_ok = True)

hps = {"num_train_steps": num_train_steps, "data_max_length": data_max_length, "learning_rate": lr}
Expand Down
2 changes: 1 addition & 1 deletion audiolm_pytorch/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.5.4'
__version__ = '1.5.5'

0 comments on commit b394aec

Please sign in to comment.