Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

save_interval is deprecated and should be None #11

Open
Gavin-Evans opened this issue Jan 11, 2023 · 0 comments
Open

save_interval is deprecated and should be None #11

Gavin-Evans opened this issue Jan 11, 2023 · 0 comments

Comments

@Gavin-Evans
Copy link

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})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant