Skip to content

Commit

Permalink
fix(example): pytorch not reacting to change of os
Browse files Browse the repository at this point in the history
  • Loading branch information
WyvernIXTL committed Oct 15, 2024
1 parent 7245890 commit d32f019
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/pytorch/pytorch-instruction.schema.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand All @@ -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
Expand All @@ -104,21 +104,21 @@ 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 #}
{% else %}
{% 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 %}
Expand Down

0 comments on commit d32f019

Please sign in to comment.