This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| ZFS Snapshot Staging Script for TrueNAS Backups | |
| This script prepares a consistent, read-only view of ZFS snapshots for backup tools like restic. | |
| It cleans up existing mounts, finds a common snapshot across target datasets, | |
| and mounts the snapshots under a staging root. | |
| Usage: | |
| python3 zfs_backup_staging.py [--dry-run] [-v] | |
| python3 zfs_backup_staging.py --cleanup [--dry-run] [-v] | |
| Designed for cron: Run this script first to stage, then trigger the backup (e.g., backrest). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [[language]] | |
| name = "python" | |
| scope = "source.python" | |
| injection-regex = "python" | |
| file-types = ["py","pyi","py3","pyw",".pythonstartup",".pythonrc"] | |
| shebangs = ["python"] | |
| roots = [".", "pyproject.toml", "pyrightconfig.json"] | |
| comment-token = "#" | |
| # language-servers = ["pyright", "ruff"] | |
| language-servers = ["pyright"] |
We can't make this file beautiful and searchable because it's too large.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| split round_global_step round_step round tot_step opt_step global_step epoch grads/gt/mean grads/gt/std grads/pred/mean grads/pred/std grads_norm/gt/mean grads_norm/gt/std grads_norm/pred/mean grads_norm/pred/std params/mean params/std error/mse/grads/mean error/mse/grads/std error/l1/grads/mean error/l1/grads/std error/cosine/grads/mean error/cosine/grads/std error/mse/grads_norm/mean error/mse/grads_norm/std error/l1/grads_norm/mean error/l1/grads_norm/std val/acc val/total_loss val/class_loss val/grad_loss val/grad_angle_loss val/grad_norm_loss val/loss_grad_norm_weight train/acc train/total_loss train/class_loss train/grad_loss train/grad_angle_loss train/grad_norm_loss train/loss_grad_norm_weight test/acc test/total_loss test/class_loss test/grad_loss test/grad_angle_loss test/grad_norm_loss test/loss_grad_norm_weight | |
| val 0 0 -1 0 0 0 0 4.365574741982403e-12 0.010201672092080116 -0.0025583957321941853 0.18272711336612701 0.5096651315689087 0.0819932296872139 9.246217727661133 0.01757507026195526 4.420875 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logging | |
| import hydra | |
| import wandb | |
| from omegaconf import DictConfig, OmegaConf | |
| log = logging.getLogger(__name__) # Hydra configured | |
| @hydra.main(config_name="testconf") |