Skip to content

Instantly share code, notes, and snippets.

View YashashGaurav's full-sized avatar

~BlacKHawK~ YashashGaurav

View GitHub Profile
@YashashGaurav
YashashGaurav / log_custom_ml_models.py
Last active September 19, 2022 22:47
best version of model logging system that I have built for GDrive - Kinda depends on wandb for naming - but easily customizable to any to other service provider.
# Model Logging setup
import os
from os.path import isfile, join
def log_checkpoint(
epoch: int,
model: torch.nn.Module,
optimizer: torch.optim.Optimizer,
lr_scheduler: object, # Cuz the base class seemed like a protected instance