mirror of
https://github.com/macaodha/batdetect2.git
synced 2026-05-22 22:32:18 +02:00
Modify max epochs with override before logging
This commit is contained in:
parent
44f9870e9e
commit
ae4f742345
@ -215,18 +215,15 @@ def build_trainer(
|
||||
run_name=run_name,
|
||||
)
|
||||
|
||||
if num_epochs is not None:
|
||||
trainer_conf.max_epochs = num_epochs
|
||||
|
||||
train_logger.log_hyperparams(
|
||||
config.model_dump(
|
||||
mode="json",
|
||||
exclude_none=True,
|
||||
)
|
||||
config.model_dump(mode="json", exclude_none=True)
|
||||
)
|
||||
|
||||
train_config = trainer_conf.model_dump(exclude_none=True)
|
||||
|
||||
if num_epochs is not None:
|
||||
train_config["max_epochs"] = num_epochs
|
||||
|
||||
return Trainer(
|
||||
**train_config,
|
||||
logger=train_logger,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user