• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

yzhao062 / pyod / 25819303985 / 4
94%
master: 94%

Build:
Build:
LAST BUILD BRANCH: fix/update-to-pythresh-v1
DEFAULT BRANCH: master
Ran 13 May 2026 07:09PM UTC
Files 184
Run time 9s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 May 2026 06:44PM UTC coverage: 93.726% (-0.001%) from 93.727%
25819303985.4

push

github

yzhao062
fix(gaal): extend optional-torch guard to mo_gaal, so_gaal, so_gaal_new

Follow-up to PR #660. PR #660 fixed pyod/models/gaal_base.py's
print-then-crash torch import pattern, but the user-visible imports
`from pyod.models.mo_gaal import MO_GAAL` and
`from pyod.models.so_gaal import SO_GAAL` reach the old broken pattern
in their OWN module tops before importing from gaal_base, so without
torch installed users still got the bare `ModuleNotFoundError`.
Apply the same try/except guarded-import pattern to mo_gaal.py,
so_gaal.py, and so_gaal_new.py (the v3+ deep-learning re-implementation
of SO_GAAL also tracked in the GAAL family). All four files now raise
the identical actionable message pointing at
`pip install pyod[torch]` or `pip install torch`. Also unifies the
gaal_base.py message to mention the project-native extra alongside
the raw torch install command.

Verified with a missing-torch import blocker: pyod.models.gaal_base,
pyod.models.mo_gaal, pyod.models.so_gaal, and pyod.models.so_gaal_new
all raise the new actionable ImportError. GAAL tests
(test_mo_gaal.py + test_so_gaal.py + test_so_gaal_new.py) pass 44/44
in the torch-installed environment.

Note: a regression test that runs in a torch-installed environment but
exercises the missing-torch import path is left for a separate
follow-up; the import-blocker test scaffolding is nontrivial relative
to this small bug fix.

17896 of 19094 relevant lines covered (93.73%)

0.94 hits per line

Source Files on job 25819303985.4
  • Tree
  • List 184
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 25819303985
  • 7e863485 on github
  • Prev Job for on development (#25786171094.10)
  • Next Job for on development (#25825218661.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc