Remove duplicated os.path.join (#17192)

This commit is contained in:
Shijie Wu 2022-05-11 20:28:32 -04:00 committed by GitHub
parent a10f61834d
commit d1d5ebb16c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1808,7 +1808,7 @@ class Trainer:
local_rank = xm.get_local_ordinal() if is_torch_tpu_available() else self.args.local_rank
if local_rank != -1:
rng_file = os.path.join(checkpoint, f"rng_state_{local_rank}.pth")
if not os.path.isfile(os.path.join(checkpoint, rng_file)):
if not os.path.isfile(rng_file):
logger.info(
f"Didn't find an RNG file for process {local_rank}, if you are resuming a training that "
"wasn't launched in a distributed fashion, reproducibility is not guaranteed."