imbalanced-losses

v0.7.0 safe
1.8
Low Risk

imbalanced-losses is a PyTorch library of training losses for class-imbalanced classification and ranking-metric optimization. It provides Focal Loss, plus differentiable surrogates for Average Precision (Smooth-AP), Recall-at-Quantile, and Partial-AUC-at-Budget, all with built-in DDP all-gather support for globally-correct estimation across multi-GPU training.

📦 Package Quality Overall: Low (4.4/10)

✦ High Test Suite 9.0

Test suite present — 14 test file(s) found

  • Test runner config found: pyproject.toml
  • 14 test file(s) detected (e.g. test_pauc_flow.py)
◈ Medium Documentation 5.0

Some documentation present

  • Detailed PyPI description (33271 chars)
○ Low Contributing Guide 2.0

No contributing guide or governance files found

  • No CONTRIBUTING, CODE_OF_CONDUCT, or governance files found
◈ Medium Type Annotations 5.0

Partial type annotation coverage

  • 221 type-annotated function signatures detected in source
○ Low Multiple Contributors 1.0

Unable to verify contributor count: no GitHub repository found

  • No GitHub repository linked — contributor count unavailable

🔬 Heuristic Checks

✓ Outbound Network Calls

No suspicious network call patterns found

⚠ Code Obfuscation score 10.0

Found 5 obfuscation pattern(s)

  • h.Tensor) -> float: model.eval() scores = model(X).squeeze(-1).sigmoid().cpu().numpy()
  • et: float) -> dict: model.eval() scores = model(X).squeeze(1).numpy() model.train()
  • h.Tensor) -> float: model.eval() scores = model(X).view(-1).sigmoid().cpu().numpy()
  • s: int, ) -> float: model.eval() probs = torch.softmax(model(X), dim=1).cpu().numpy()
  • False) # equivalent to model.eval() probs = torch.softmax(model(X), dim=1).cpu().numpy()
⚠ Shell / Subprocess Execution score 2.0

Found 1 shell execution pattern(s)

  • d, old_path) result = subprocess.run( [sys.executable, golden.__file__, "--compare",
✓ Credential Harvesting

No credential harvesting patterns detected

✓ Typosquatting

No typosquatting candidates detected

✓ Registered Email Domain

Email domain looks legitimate: gatech.edu>

✓ Suspicious Page Links

All external links appear legitimate

✓ Git Repository History

No GitHub repository linked

  • No GitHub repository link found
⚠ Maintainer History score 6.0

3 maintainer concern(s) found

  • Author name is missing or very short
  • Author "" appears to have only 1 package on PyPI (new or inactive account)
  • Package has no PyPI classifiers (low effort / metadata quality)
✓ Known CVE Vulnerabilities

No known vulnerabilities found in OSV database.

💡 AI App Starter Prompt

Use this prompt to build a project with imbalanced-losses
Build a simple Python application using the imbalanced-losses package to demonstrate its core features.

💬 Discussion Feed

Leave a comment

No discussion yet. Be the first to share your thoughts!