Hi, I want to change some parameters of the
Trainer (e.g. modify the callbacks or change the logging frequency) after each call to
Trainer.fit(). The training loop would then look something like this:
model = ... trainer = pl.Trainer() for _ in range(num_stages): trainer.fit(model, train_dataloader) trainer.fit_loop.max_steps += max_steps # Changing the parameters as shown below does not work! trainer.log_every_n_steps += 100 trainer.callbacks = [....]
An alternative would be to create a new
Trainer instance in each iteration. However, the optimizer state would not be preserved (e.g. the learning rate).
Is there some way to either modify parameters of the
Trainer later on, or can I somehow create a new instance which continues the training at the same learning rate and optimizer state?
Thanks a lot!