@@ -92,11 +92,14 @@ jobs:
9292
9393 - name : Install fairchem and dependencies
9494 if : ${{ matrix.model.name == 'fairchem' }}
95+ env :
96+ HF_TOKEN : ${{ secrets.HUGGING_FACE_TOKEN }}
9597 run : |
9698 uv pip install "torch>2" --index-url https://download.pytorch.org/whl/cpu --system
9799 uv pip install "torch-scatter" -f https://data.pyg.org/whl/torch-2.6.0+cpu.html --system
98100 uv pip install "torch-sparse" -f https://data.pyg.org/whl/torch-2.6.0+cpu.html --system
99101 uv pip install "fairchem-core>=2.2.0" --system
102+ uv pip install "huggingface_hub[cli]" --system
100103 uv pip install -e .[test] --resolution=${{ matrix.version.resolution }} --system
101104
102105 - name : Install torch_sim with model dependencies
@@ -108,6 +111,9 @@ jobs:
108111 env :
109112 HF_TOKEN : ${{ secrets.HUGGING_FACE_TOKEN }}
110113 run : |
114+ if [ "${{ matrix.model.name }}" == "fairchem" ]; then
115+ huggingface-cli login --token "$HF_TOKEN"
116+ fi
111117 pytest --cov=torch_sim --cov-report=xml ${{ matrix.model.test_path }}
112118
113119 - name : Upload coverage to Codecov
@@ -151,4 +157,11 @@ jobs:
151157 uses : astral-sh/setup-uv@v6
152158
153159 - name : Run example
154- run : uv run --with . ${{ matrix.example }}
160+ env :
161+ HF_TOKEN : ${{ secrets.HUGGING_FACE_TOKEN }}
162+ run : |
163+ if [[ "${{ matrix.example }}" == *"fairchem"* ]]; then
164+ uv pip install "huggingface_hub[cli]" --system
165+ huggingface-cli login --token "$HF_TOKEN"
166+ fi
167+ uv run --with . ${{ matrix.example }}
0 commit comments