From f5d7ff9f0fcf90e710081adcf14b75e49233c4db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Caillaut?= <2855911+gcaillaut@users.noreply.github.com> Date: Tue, 24 Sep 2024 21:21:27 +0200 Subject: [PATCH] Do not fail when git is not installed (#1280) --- megatron/neox_arguments/neox_args.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/megatron/neox_arguments/neox_args.py b/megatron/neox_arguments/neox_args.py index 5194047d5..df7e51da6 100644 --- a/megatron/neox_arguments/neox_args.py +++ b/megatron/neox_arguments/neox_args.py @@ -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