Skip to content

Commit a6f85ea

Browse files
committed
fix(ci): improve GLiNER validation to confirm PyTorch exclusion
- Update validation step to verify GLiNER dependencies are properly excluded - Should show ImportError confirming PyTorch is not installed in CI - This validates our segfault prevention strategy is working
1 parent 3c72863 commit a6f85ea

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,21 @@ jobs:
4848
run: |
4949
python -m pytest tests/ -v --ignore=tests/test_gliner_annotator.py
5050
51-
- name: Validate GLiNER imports (without running tests that load PyTorch models)
51+
- name: Validate GLiNER module structure (without PyTorch dependencies)
5252
run: |
5353
python -c "
54-
import sys
54+
print('Validating GLiNER module can be imported without PyTorch...')
5555
try:
5656
from datafog.processing.text_processing.gliner_annotator import GLiNERAnnotator
57-
print(' GLiNER imports work')
57+
print(' GLiNER imported unexpectedly - PyTorch may be installed')
5858
except ImportError as e:
59-
print(f'⚠️ GLiNER dependencies not available (expected in CI): {e}')
59+
if 'GLiNER dependencies not available' in str(e):
60+
print('✅ GLiNER properly reports missing dependencies (expected in CI)')
61+
else:
62+
print(f'✅ GLiNER import blocked as expected: {e}')
6063
except Exception as e:
61-
print(f'❌ GLiNER import error: {e}')
62-
sys.exit(1)
64+
print(f'❌ Unexpected GLiNER error: {e}')
65+
exit(1)
6366
"
6467
6568
- name: Run coverage on core modules only

0 commit comments

Comments
 (0)