re-commit

This commit is contained in:
WinstonLiyt
2024-07-11 08:49:37 +00:00
parent 29184aff9b
commit bf1b140f68
11 changed files with 527 additions and 23 deletions
+13 -13
View File
@@ -23,18 +23,17 @@ class EnvUtils(unittest.TestCase):
# NOTE: Since I don't know the exact environment in which it will be used, here's just an example.
# NOTE: Because you need to download the data during the prepare process. So you need to have pyqlib in your environment.
# def test_local(self):
# local_conf = LocalConf(
# py_bin="/home/v-linlanglv/miniconda3/envs/RD-Agent-310/bin",
# default_entry="qrun conf.yaml",
# )
# qle = LocalEnv(conf=local_conf)
# qle.prepare()
# exe_path = str(DIRNAME / "env_tpl")
# conf_path = str(DIRNAME / "env_tpl" / "conf.yaml")
# qle.run(entry="qrun " + conf_path, local_path=exe_path)
# mlrun_p = DIRNAME / "env_tpl" / "mlruns"
# self.assertTrue(mlrun_p.exists(), f"Expected output file {mlrun_p} not found")
def test_local(self):
local_conf = LocalConf(
py_bin="/home/v-linlanglv/miniconda3/envs/RD-Agent-310/bin",
default_entry="qrun conf.yaml",
)
qle = LocalEnv(conf=local_conf)
qle.prepare()
conf_path = str(DIRNAME / "env_tpl" / "conf.yaml")
qle.run(entry="qrun " + conf_path)
mlrun_p = DIRNAME / "env_tpl" / "mlruns"
self.assertTrue(mlrun_p.exists(), f"Expected output file {mlrun_p} not found")
def test_docker(self):
"""
@@ -51,7 +50,8 @@ class EnvUtils(unittest.TestCase):
self.assertTrue(mlrun_p.exists(), f"Expected output file {mlrun_p} not found")
# read experiment
result = qtde.run(local_path=str(DIRNAME / "env_tpl"), entry="python read_exp.py")
result = qtde.run(local_path=str(DIRNAME / "env_tpl"), entry="python read_exp_res.py")
print("here")
print(result)