Skip to content

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 26 Oct 06:35
· 26 commits to main since this release
00c3717

Added

  • argus_cortex.moderation — content-moderation clients shared by the
    stages, hoisted from argus-curator. Both talk HTTP to a server the deployer
    runs; nothing imports a detector.
    • NudeNetClient(base_url, timeout) — a NudeNet server's /infer, returning
      NsfwResult (detections, highest score per class, exposed score) and
      raising NudeNetCheckFailed per image. NudeNetLabel / NUDENET_LABELS
      are NudeNet's 18 classes; DEFAULT_EXPOSED_LABELS (the five exposed
      buttocks/breast/genitalia/anus classes) and exposed_score() are the
      suite's one definition of nudity.
    • SingGuardClient(base_url, timeout, thinking, policy, downscale) — a
      SingGuard server's /api/guard/check, returning GuardResult (verdict,
      the rules that fired, explanation, model, policy name) and raising
      GuardCheckFailed. rule_matches() / rule_letter() match rules by
      letter or full name; policy_name() names a custom policy by a sha256
      prefix.
    • Proxies in the environment are ignored: images go only to the configured
      server. Config errors (ModerationConfigError) never echo the URL. A
      user:password@ in the URL is sent as HTTP Basic auth.
  • [images] extra (Pillow), for SingGuardClient's downscaling of images
    over 1536 px / 4 MB; imported only when it downscales. Downscaling is on by
    default, so without the extra SingGuardClient(...) raises
    ModerationConfigError at construction unless given downscale=False.

Changed

  • release.yml now creates the GitHub Release for each v* tag once the
    version is on PyPI, with that version's CHANGELOG.md section as notes and
    the built sdist/wheel attached (a missing section fails the job; a re-run
    edits the Release). Tags with -, rc, a<n> or b<n> are pre-releases.