Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[testing] Remove linux hardcoding from daal4py's _launch_algorithms.py #2121

Merged
merged 9 commits into from
Oct 23, 2024
5 changes: 4 additions & 1 deletion daal4py/sklearn/monkeypatch/tests/test_patching.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ def get_result_log():
absolute_path = str(pathlib.Path(__file__).parent.absolute())
try:
process = subprocess.check_output(
[sys.executable, absolute_path + "/utils/_launch_algorithms.py"]
[
sys.executable,
os.sep.join([absolute_path, "utils", "_launch_algorithms.py"]),
]
)
except subprocess.CalledProcessError as e:
print(e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
from sklearn.datasets import load_diabetes, load_iris, make_regression
from sklearn.metrics import pairwise_distances, roc_auc_score

absolute_path = str(pathlib.Path(__file__).parent.absolute())
sys.path.append(absolute_path + "/../")
sys.path.append(str(pathlib.Path(__file__).parent.parent.absolute()))
from _models_info import MODELS_INFO, TYPES


Expand Down Expand Up @@ -84,7 +83,7 @@ def run_patch(model_info, dtype):
logging.info(i)


def run_algotithms():
def run_algorithms():
for info in MODELS_INFO:
for t in TYPES:
model_name = get_class_name(info["model"])
Expand Down Expand Up @@ -114,5 +113,5 @@ def run_utils():


if __name__ == "__main__":
run_algotithms()
run_algorithms()
run_utils()