Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
lm-evaluation-harness
Commits
f832c776
Commit
f832c776
authored
Jun 23, 2023
by
haileyschoelkopf
Browse files
add additional err handling for get_git_commit_hash
parent
8d14b376
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
lm_eval/utils.py
lm_eval/utils.py
+3
-2
No files found.
lm_eval/utils.py
View file @
f832c776
...
...
@@ -328,9 +328,10 @@ def get_git_commit_hash():
Source: https://github.com/EleutherAI/gpt-neox/blob/b608043be541602170bfcfb8ec9bf85e8a0799e0/megatron/neox_arguments/neox_args.py#L42
"""
try
:
git_hash
=
subprocess
.
check_output
([
"g
i
t"
,
"describe"
,
"--always"
]).
strip
()
git_hash
=
subprocess
.
check_output
([
"gt"
,
"describe"
,
"--always"
]).
strip
()
git_hash
=
git_hash
.
decode
()
except
subprocess
.
CalledProcessError
:
except
subprocess
.
CalledProcessError
or
FileNotFoundError
:
# FileNotFoundError occurs when git not installed on system
git_hash
=
None
return
git_hash
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment