add eval_accumulation_steps
Browse files- train_od.py +3 -0
train_od.py
CHANGED
|
@@ -192,6 +192,8 @@ def build_parser():
|
|
| 192 |
p.add_argument("--disable-augmentations", action="store_true")
|
| 193 |
p.add_argument("--eval-max-batches", type=int, default=None,
|
| 194 |
help="cap eval batches for profiling")
|
|
|
|
|
|
|
| 195 |
p.add_argument("--mini-train", action="store_true",
|
| 196 |
help="after profiling, also run a short real training+eval phase")
|
| 197 |
return p
|
|
@@ -343,6 +345,7 @@ def main():
|
|
| 343 |
remove_unused_columns=False,
|
| 344 |
eval_strategy="steps",
|
| 345 |
eval_steps=args.eval_steps,
|
|
|
|
| 346 |
logging_steps=20,
|
| 347 |
save_strategy="steps",
|
| 348 |
save_steps=args.save_steps,
|
|
|
|
| 192 |
p.add_argument("--disable-augmentations", action="store_true")
|
| 193 |
p.add_argument("--eval-max-batches", type=int, default=None,
|
| 194 |
help="cap eval batches for profiling")
|
| 195 |
+
p.add_argument("--eval-accumulation-steps", type=int, default=4,
|
| 196 |
+
help="offload eval predictions to CPU every N batches (avoids GPU OOM)")
|
| 197 |
p.add_argument("--mini-train", action="store_true",
|
| 198 |
help="after profiling, also run a short real training+eval phase")
|
| 199 |
return p
|
|
|
|
| 345 |
remove_unused_columns=False,
|
| 346 |
eval_strategy="steps",
|
| 347 |
eval_steps=args.eval_steps,
|
| 348 |
+
eval_accumulation_steps=args.eval_accumulation_steps,
|
| 349 |
logging_steps=20,
|
| 350 |
save_strategy="steps",
|
| 351 |
save_steps=args.save_steps,
|