From d32f019c17114af21319caf8d7ed400e4f2efd8d Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Tue, 15 Oct 2024 17:27:38 +0200 Subject: [PATCH] fix(example): pytorch not reacting to change of os --- examples/pytorch/pytorch-instruction.schema.yml.jinja | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/pytorch/pytorch-instruction.schema.yml.jinja b/examples/pytorch/pytorch-instruction.schema.yml.jinja index 54a01be..119b84d 100644 --- a/examples/pytorch/pytorch-instruction.schema.yml.jinja +++ b/examples/pytorch/pytorch-instruction.schema.yml.jinja @@ -65,7 +65,7 @@ pretty: {% if package == "conda" %} conda install - {% if os == "mac" %} + {% if __os__ == "macos" %} {% if compute_platform == "cpu" %} pytorch{{ "-nightly" if build == "preview" }}::pytorch torchvision torchaudio {% else %} @@ -90,7 +90,7 @@ pretty: {% elif package == "pip" %} pip3 install {{ "--pre" if build == "preview" }} torch torchvision torchaudio - {% if os == "mac" %} + {% if __os__ == "macos" %} {{ raise("Mac does not support ROCm or CUDA!") if compute_platform != "cpu" }} {% if build == "preview" %} --index-url https://download.pytorch.org/whl/nightly/cpu @@ -104,13 +104,13 @@ pretty: {% if build == "preview" %} --index-url https://download.pytorch.org/whl/nightly/cu121 {% else %} - {% if os == "win" %} + {% if __os__ == "windows" %} --index-url https://download.pytorch.org/whl/cu121 {% endif %} {% endif %} {% elif compute_platform == "ro60" %} - {{ raise("Windows does not support ROCm!") if os != "linux" }} + {{ raise("Windows does not support ROCm!") if __os__ != "linux" }} --index-url https://download.pytorch.org/whl/{{ "nightly/" if build == "preview" }}rocm6.0 {# CPU #} @@ -118,7 +118,7 @@ pretty: {% if build == "preview" %} --index-url https://download.pytorch.org/whl/nightly/cpu {% else %} - {% if os == "linux" %} + {% if __os__ == "linux" %} --index-url https://download.pytorch.org/whl/cpu {% endif %} {% endif %}