clearml-server/server/config/info.py
allegroai 4f2564d33a Add Artifacts support, changed tags to system_tags and added user tags
Add hyper parameter sorting
Add min/max value for all time series metrics
2019-09-24 21:35:41 +03:00

29 lines
537 B
Python

from functools import lru_cache
from pathlib import Path
root = Path(__file__).parent.parent
@lru_cache()
def get_build_number():
try:
return (root / "BUILD").read_text().strip()
except FileNotFoundError:
return ""
@lru_cache()
def get_version():
try:
return (root / "VERSION").read_text().strip()
except FileNotFoundError:
return ""
@lru_cache()
def get_commit_number():
try:
return (root / "COMMIT").read_text().strip()
except FileNotFoundError:
return ""