Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
wandb_osh
✓ import wandb_osh
✗ from wandb_osh import WandbOSH
wandb_osh is a module, not a class; the main class is wandb_osh.WandbOSH
TriggerWandbSyncHook
✓ from wandb_osh import TriggerWandbSyncHook
✗ from wandb_osh.hooks import TriggerWandbSyncHook
The hook is re-exported from the top-level module since v1.0.0
wandb_osh.set_log_level
✓ wandb_osh.set_log_level('INFO')
✗ wandb_osh.set_log_level(logging.INFO)
Accepts a string, not a logging level constant; added in v1.2.0
Minimal setup for offline W&B logging with automatic sync trigger.
import wandb_osh
import wandb
# Initialize W&B in offline mode
wandb.init(mode="offline", project="my_project")
# Create the sync trigger
trigger = wandb_osh.TriggerWandbSyncHook()
# Example: trigger sync after each run (e.g., at end of script)
# Note: In practice, the trigger runs in a background thread/process.
# For a full example, see the GitHub README.
print("Run completed. Sync will be triggered automatically.")
wandb-osh --version
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'wandb_osh'
Library not installed or wrong import path.
fixInstall using: pip install wandb-osh
AttributeError: module 'wandb_osh' has no attribute 'TriggerWandbSyncHook'
Outdated version (<1.0.0) or trying to import from wrong submodule.
fixUpdate to latest version: pip install --upgrade wandb-osh, then use: from wandb_osh import TriggerWandbSyncHook
wandb.errors.error.UsageError: Mode must be 'offline' to use TriggerWandbSyncHook
W&B initialized without mode='offline'.
fixCall wandb.init(mode='offline', ...) before creating the trigger.
Audit
Dependencies
wandbrequiredCore dependency for W&B integration
lightningoptionalOptional integration for PyTorch Lightning