Skip to content

Commit

Permalink
Do not fail when git is not installed (#1280)
Browse files Browse the repository at this point in the history
  • Loading branch information
gcaillaut authored Sep 24, 2024
1 parent 1bce90c commit f5d7ff9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion megatron/neox_arguments/neox_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def get_git_commit_hash():
try:
git_hash = subprocess.check_output(["git", "describe", "--always"]).strip()
git_hash = git_hash.decode()
except subprocess.CalledProcessError:
except (subprocess.CalledProcessError, FileNotFoundError):
git_hash = None
return git_hash

Expand Down

0 comments on commit f5d7ff9

Please sign in to comment.