Skip to content

Commit

Permalink
Better checkpoint file names.
Browse files Browse the repository at this point in the history
  • Loading branch information
djbielejeski committed May 9, 2023
1 parent cdf58e4 commit 8f8a49c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dreambooth_helpers/joepenna_dreambooth_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@ def saturate_from_file(
def toJSON(self):
return json.dumps(self, default=lambda o: o.__dict__, sort_keys=True, indent=4)

def create_checkpoint_file_name(self, steps):
def create_checkpoint_file_name(self, steps: str):
date_string = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H-%M-%S")
return f"{date_string}_{self.project_name}_" \
f"{steps}_steps_" \
f"{int(steps):05d}_steps_" \
f"{self.training_images_count}_training_images_" \
f"{self.token}_token_" \
f"{self.class_word}_class_word.ckpt".replace(" ", "_")
Expand Down

0 comments on commit 8f8a49c

Please sign in to comment.