Spaces:
Running
Running
adds callback
Browse files- trainer.py +4 -0
trainer.py
CHANGED
|
@@ -66,6 +66,10 @@ class SmolLM3Trainer:
|
|
| 66 |
|
| 67 |
# Simple console callback for basic monitoring
|
| 68 |
class SimpleConsoleCallback:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
def on_log(self, args, state, control, logs=None, **kwargs):
|
| 70 |
"""Log metrics to console"""
|
| 71 |
if logs and isinstance(logs, dict):
|
|
|
|
| 66 |
|
| 67 |
# Simple console callback for basic monitoring
|
| 68 |
class SimpleConsoleCallback:
|
| 69 |
+
def on_init_end(self, args, state, control, **kwargs):
|
| 70 |
+
"""Called when training initialization is complete"""
|
| 71 |
+
print("🔧 Training initialization completed")
|
| 72 |
+
|
| 73 |
def on_log(self, args, state, control, logs=None, **kwargs):
|
| 74 |
"""Log metrics to console"""
|
| 75 |
if logs and isinstance(logs, dict):
|