mirror of
https://github.com/nod-ai/AMD-SHARK-Studio.git
synced 2026-02-19 11:56:43 -05:00
In models testing fix paths to be relative to the script dir not cwd (#1128)
authored-by: Boian Petkantchin <boian@nod-labs.com>
This commit is contained in:
committed by
GitHub
parent
49925950f1
commit
4fac46f7bb
@@ -48,7 +48,9 @@ def load_csv_and_convert(filename, gen=False):
|
||||
)
|
||||
# This is a pytest workaround
|
||||
if gen:
|
||||
with open("tank/dict_configs.py", "w+") as out:
|
||||
with open(
|
||||
os.path.join(os.path.dirname(__file__), "dict_configs.py"), "w+"
|
||||
) as out:
|
||||
out.write("ALL = [\n")
|
||||
for c in model_configs:
|
||||
out.write(str(c) + ",\n")
|
||||
@@ -68,7 +70,9 @@ def get_valid_test_params():
|
||||
dynamic_list = (True, False)
|
||||
# TODO: This is soooo ugly, but for some reason creating the dict at runtime
|
||||
# results in strange pytest failures.
|
||||
load_csv_and_convert("tank/all_models.csv", True)
|
||||
load_csv_and_convert(
|
||||
os.path.join(os.path.dirname(__file__), "all_models.csv"), True
|
||||
)
|
||||
from tank.dict_configs import ALL
|
||||
|
||||
config_list = ALL
|
||||
|
||||
Reference in New Issue
Block a user