Skip to content

Commit

Permalink
Improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
george0st committed Jan 1, 2024
1 parent 1e84b1c commit 903171f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions qgate_sln_mlrun/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(self, setup: Setup, templates: [str]=[DEFAULT_TEMPLATE_HTML,
Initial
:param setup: specific usecase
:param templates: list of templates for generation outputs
:param templates: list of templates for generation outputs (support templetes as file of embeded templates)
"""
self._setup=setup
self._data={}
Expand Down Expand Up @@ -78,6 +78,7 @@ def testcase_state(self, state="DONE"):
# endregion

def render(self):
"""Generate/Render final outputs basen on templates"""
# https://zetcode.com/python/jinja/
# https://ultraconfig.com.au/blog/jinja2-a-crash-course-for-beginners/
# https://www.analyticsvidhya.com/blog/2022/04/the-ultimate-guide-to-master-jinja-template/
Expand Down Expand Up @@ -154,8 +155,6 @@ def _summary(self):
self._data["summary"]["count_testcases_err"]=count_testcases-count_testcases_done
self._data["summary"]["first_errors"]=first_errors



def _system_info(self):
self._data["version"] = __version__
self._data["model_version"] = self._get_model_version()
Expand All @@ -178,16 +177,15 @@ def _get_model_version(self):
return TSBase.get_model_info(self._setup.model_definition)

def _mlrun_server(self):
# Return server MLRun version

"""Return server MLRun version"""
server_version=""
with suppress(Exception):
run_db_factory = mlrun.db.factory.RunDBFactory()
server_version = run_db_factory._run_db.server_version
return server_version

def _memory(self):

"""Return size of memory"""
mem_total, mem_free = "", ""
with suppress(Exception):
import psutil
Expand Down

0 comments on commit 903171f

Please sign in to comment.