trainloop 0.3.0__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {trainloop-0.3.0 → trainloop-0.4.0}/PKG-INFO +1 -1
- {trainloop-0.3.0 → trainloop-0.4.0}/pyproject.toml +1 -1
- {trainloop-0.3.0 → trainloop-0.4.0}/src/trainloop/hooks.py +4 -4
- {trainloop-0.3.0 → trainloop-0.4.0}/README.md +0 -0
- {trainloop-0.3.0 → trainloop-0.4.0}/src/trainloop/__init__.py +0 -0
- {trainloop-0.3.0 → trainloop-0.4.0}/src/trainloop/py.typed +0 -0
- {trainloop-0.3.0 → trainloop-0.4.0}/src/trainloop/trainer.py +0 -0
- {trainloop-0.3.0 → trainloop-0.4.0}/src/trainloop/utils.py +0 -0
|
@@ -248,7 +248,7 @@ class ProgressHook(_StatsHook):
|
|
|
248
248
|
def on_before_step(self, trainer: BaseTrainer):
|
|
249
249
|
super().on_before_step(trainer)
|
|
250
250
|
self.lrs = [
|
|
251
|
-
(i, param_group["lr"])
|
|
251
|
+
(param_group.get("name", str(i)), param_group["lr"])
|
|
252
252
|
for i, param_group in enumerate(trainer.optimizer.param_groups)
|
|
253
253
|
] # record the LR before the scheduler steps
|
|
254
254
|
|
|
@@ -279,7 +279,7 @@ class ProgressHook(_StatsHook):
|
|
|
279
279
|
)
|
|
280
280
|
+ f" loss {loss:.4f}"
|
|
281
281
|
+ (f" grad_norm {grad_norm:.4f}" if grad_norm is not None else "")
|
|
282
|
-
+ (" " + " ".join(f"
|
|
282
|
+
+ (" " + " ".join(f"lr/{name} {lr:.2e}" for name, lr in self.lrs))
|
|
283
283
|
+ (
|
|
284
284
|
(
|
|
285
285
|
" | "
|
|
@@ -321,7 +321,7 @@ class LoggingHook(_StatsHook):
|
|
|
321
321
|
records: Records,
|
|
322
322
|
):
|
|
323
323
|
lrs = [
|
|
324
|
-
(i, param_group["lr"])
|
|
324
|
+
(param_group.get("name", f"group_{i}"), param_group["lr"])
|
|
325
325
|
for i, param_group in enumerate(trainer.optimizer.param_groups)
|
|
326
326
|
]
|
|
327
327
|
trainer.log(
|
|
@@ -334,7 +334,7 @@ class LoggingHook(_StatsHook):
|
|
|
334
334
|
"data_time": data_time,
|
|
335
335
|
"step_time": step_time,
|
|
336
336
|
"non_finite_grad_retry_count": non_finite_grad_retry_count,
|
|
337
|
-
"lr": {
|
|
337
|
+
"lr": {name: lr for name, lr in lrs},
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
340
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|