fix: mypy complaints
This commit is contained in:
parent
f6dc9c8e7f
commit
75c6d5bacd
7 changed files with 26 additions and 23 deletions
|
|
@ -9,17 +9,20 @@ This library is designed to be a standalone package that decouples the logging l
|
|||
The recommended way to use the logger is through the `get_logger()` singleton:
|
||||
|
||||
```python
|
||||
from experiment_logger import get_logger
|
||||
from experiment_logger import UnifiedLogger, get_logger
|
||||
|
||||
logger = get_logger()
|
||||
# Initialize at the start of your script (e.g., in train.py)
|
||||
logger.init(
|
||||
project_name="MyProject",
|
||||
logger = UnifiedLogger(
|
||||
run_name="my_experiment_run",
|
||||
config={"learning_rate": 3e-4},
|
||||
project_name="MyProject",
|
||||
base_dir="runs",
|
||||
use_wandb=True
|
||||
)
|
||||
|
||||
# In other files, retrieve the initialized singleton:
|
||||
# logger = get_logger()
|
||||
|
||||
# Log metrics (Scalar values, numpy scalars, or JAX types)
|
||||
logger.log({"loss": 0.5, "accuracy": 0.98}, step=100)
|
||||
|
||||
|
|
|
|||
Reference in a new issue