Skip to content

Commit

Permalink
Fix: extract git dir from env var incorporate to ray (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanlin2013 committed Jun 16, 2022
1 parent d44e0d1 commit a0a3780
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mbl/workflow/grid_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,12 @@ def mlflow_auto_tags(func: Callable):
def wrapper(*args, **kwargs):
tags = {
"docker.image.id": "hostname",
"git.commit": "git rev-parse --short HEAD",
"git.commit": f"git --git-dir {os.getenv('GITDIR')} "
f"rev-parse --short HEAD",
}
mlflow.set_tags(
{
k: subprocess.check_output(v.split(), cwd=os.getcwd())
.decode("ascii")
.strip()
k: subprocess.check_output(v.split()).decode("ascii").strip()
for k, v in tags.items()
}
)
Expand Down

0 comments on commit a0a3780

Please sign in to comment.