[BE] Enable ruff's UP rules and autoformat utils/ (#105424)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/105424
Approved by: https://github.com/ezyang, https://github.com/malfet
This commit is contained in:
Justin Chu
2023-07-18 16:21:14 +00:00
committed by PyTorch MergeBot
parent 91ab32e4b1
commit abc1cadddb
45 changed files with 122 additions and 121 deletions

View File

@ -953,7 +953,7 @@ class SummaryWriter:
# Maybe we should encode the tag so slashes don't trip us up?
# I don't think this will mess us up, but better safe than sorry.
subdir = "%s/%s" % (str(global_step).zfill(5), self._encode(tag))
subdir = f"{str(global_step).zfill(5)}/{self._encode(tag)}"
save_path = os.path.join(self._get_file_writer().get_logdir(), subdir)
fs = tf.io.gfile