Lightning-AI / pytorch-lightning

Pretrain, finetune and deploy AI models on multiple GPUs, TPUs with zero code changes.
https://lightning.ai
Apache License 2.0
28.07k stars 3.36k forks source link

Apply the ignore of the `save_hyperparameters` function to args #19761

Open doveppp opened 5 months ago

doveppp commented 5 months ago

Description & Motivation

Currently, the ignore parameter of the save_hyperparameters function only filters its own arguments.

Can we apply hp = {k: v for k, v in hp.items() if k not in ignore} before obj._set_hparams(hp)?

image

Pitch

No response

Alternatives

No response

Additional context

No response

cc @borda

aseemk98 commented 1 month ago

I'll take this up.