claude_refactor_v2: temp changes before src changes
This commit is contained in:
48
src/conf/tracking_conf.py
Normal file
48
src/conf/tracking_conf.py
Normal file
@@ -0,0 +1,48 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import gin
|
||||
|
||||
|
||||
@gin.configurable
|
||||
class TrackingConfig:
|
||||
"""Experiment tracking + diagnostics.
|
||||
|
||||
Independent axis: changing these flags does not affect training results,
|
||||
only what is observed/recorded.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
use_wandb: bool = False,
|
||||
use_tb: bool = True,
|
||||
wandb_project: str = "caption-test-gtauav",
|
||||
wandb_run_name: str | None = None,
|
||||
wandb_entity: str | None = None,
|
||||
log_grad_norms: bool = True,
|
||||
use_gradcam: bool = False,
|
||||
gradcam_every: int = 5,
|
||||
gradcam_samples: int = 8,
|
||||
use_profiler: bool = False,
|
||||
profiler_warmup: int = 3,
|
||||
profiler_active: int = 5,
|
||||
) -> None:
|
||||
self.use_wandb = use_wandb
|
||||
self.use_tb = use_tb
|
||||
self.wandb_project = wandb_project
|
||||
self.wandb_run_name = wandb_run_name
|
||||
self.wandb_entity = wandb_entity
|
||||
self.log_grad_norms = log_grad_norms
|
||||
self.use_gradcam = use_gradcam
|
||||
self.gradcam_every = gradcam_every
|
||||
self.gradcam_samples = gradcam_samples
|
||||
self.use_profiler = use_profiler
|
||||
self.profiler_warmup = profiler_warmup
|
||||
self.profiler_active = profiler_active
|
||||
|
||||
|
||||
def get_tracking_cfg(path2cfg: str) -> TrackingConfig:
|
||||
"""Load ONLY tracking config (TESTING ONLY — use load_all_configs in production)."""
|
||||
gin.clear_config()
|
||||
gin.parse_config_file(f"{path2cfg}tracking.gin")
|
||||
return TrackingConfig()
|
||||
|
||||
Reference in New Issue
Block a user