Human-Pose-Transfer icon indicating copy to clipboard operation
Human-Pose-Transfer copied to clipboard

save_interval is deprecated and should be None

Open Gavin-Evans opened this issue 1 year ago • 0 comments

pytorch-ignite=0.4.10

Error: ValueError: Argument save_interval is deprecated and should be None. This argument will be removed in 0.5.0.Please, use events filtering instead, e.g. Events.ITERATION_STARTED(every=1000)


solution:

mcp = ModelCheckpoint(config["output"], "network", save_interval=None, n_saved=config["log"]["model_checkpoint"]["n_saved"], require_empty=False, save_as_state_dict=True, create_dir=True)

trainer.add_event_handler(Events.ITERATION_STARTED(every=config["log"]["model_checkpoint"]["save_interval"]),
mcp, to_save={"G2": generator2, "D": discriminator})

Gavin-Evans avatar Jan 11 '23 16:01 Gavin-Evans