Skip to content

Commit 092e64d

Browse files
committed
format code
1 parent 6a98e33 commit 092e64d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

primus/backends/megatron/core/dist_checkpointing/strategies/filesystem_async.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
)
1313

1414
from primus.modules.module_utils import log_rank_0, warning_rank_0
15-
15+
16+
1617
class PrimusFileSystemWriterAsync(FileSystemWriterAsync):
1718
def __init__(self, *args, **kwargs):
1819
super().__init__(*args, **kwargs)
@@ -41,7 +42,7 @@ def preload_tensors(*args, **kwargs):
4142
return super(PrimusFileSystemWriterAsync, PrimusFileSystemWriterAsync).preload_tensors(
4243
*args, **kwargs
4344
)
44-
45+
4546
# unlike torch.version.hip
4647
# hipRuntimeGetVersion() can return the HIP runtime version instead of build-time
4748
@staticmethod
@@ -56,7 +57,7 @@ def get_hip_runtime_version():
5657
if error_code != 0:
5758
return (-1, -1)
5859
# (major_version, minor_version)
59-
return (version.value//10000000, (version.value//100000)%100)
60+
return (version.value // 10000000, (version.value // 100000) % 100)
6061
except Exception as e:
6162
print(e)
62-
return (-1, -1)
63+
return (-1, -1)

0 commit comments

Comments
 (0)