@@ -92,11 +92,14 @@ jobs:
92
92
93
93
- name : Install fairchem and dependencies
94
94
if : ${{ matrix.model.name == 'fairchem' }}
95
+ env :
96
+ HF_TOKEN : ${{ secrets.HUGGING_FACE_TOKEN }}
95
97
run : |
96
98
uv pip install "torch>2" --index-url https://download.pytorch.org/whl/cpu --system
97
99
uv pip install "torch-scatter" -f https://data.pyg.org/whl/torch-2.6.0+cpu.html --system
98
100
uv pip install "torch-sparse" -f https://data.pyg.org/whl/torch-2.6.0+cpu.html --system
99
101
uv pip install "fairchem-core>=2.2.0" --system
102
+ uv pip install "huggingface_hub[cli]" --system
100
103
uv pip install -e .[test] --resolution=${{ matrix.version.resolution }} --system
101
104
102
105
- name : Install torch_sim with model dependencies
@@ -108,6 +111,9 @@ jobs:
108
111
env :
109
112
HF_TOKEN : ${{ secrets.HUGGING_FACE_TOKEN }}
110
113
run : |
114
+ if [ "${{ matrix.model.name }}" == "fairchem" ]; then
115
+ huggingface-cli login --token "$HF_TOKEN"
116
+ fi
111
117
pytest --cov=torch_sim --cov-report=xml ${{ matrix.model.test_path }}
112
118
113
119
- name : Upload coverage to Codecov
@@ -151,4 +157,11 @@ jobs:
151
157
uses : astral-sh/setup-uv@v6
152
158
153
159
- 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