Commit 62585f1
fix: lazy-load torch-dependent modules in __init__.py
torch is an optional dependency but was being imported at module load time,
causing ImportError in CI environments without torch installed.
Use __getattr__ at module level for lazy on-demand import of VLOGMahjong
and base_modules classes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent c1b2233 commit 62585f1
1 file changed
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
0 commit comments