Skip to content

Apply the ignore of the save_hyperparameters function to args #19761

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

Closed
doveppp opened this issue Apr 11, 2024 · 5 comments · Fixed by #20718
Closed

Apply the ignore of the save_hyperparameters function to args #19761

doveppp opened this issue Apr 11, 2024 · 5 comments · Fixed by #20718
Labels
feature Is an improvement or enhancement good first issue Good for newcomers help wanted Open to be worked on

Comments

@doveppp
Copy link

doveppp commented Apr 11, 2024

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

@doveppp doveppp added feature Is an improvement or enhancement needs triage Waiting to be triaged by maintainers labels Apr 11, 2024
@awaelchli awaelchli added help wanted Open to be worked on good first issue Good for newcomers and removed needs triage Waiting to be triaged by maintainers labels Aug 3, 2024
@Borda Borda changed the title Apply the ignore of the save_hyperparameters function to args as well. Apply the ignore of the save_hyperparameters function to args Aug 6, 2024
@aseemk98
Copy link

I'll take this up.

@vgauraha62
Copy link

hey did you resolve this issue?

@22ema
Copy link

22ema commented Dec 18, 2024

I'll take this up.

@kushagragpt99
Copy link

Hey! Is this issue still open? I checked the PR #20213 and it's still open. I'd love to contribute if it's still open.

@deependujha
Copy link
Contributor

Hi @doveppp, it already filters. collect_init_args recursively collects all the arguments passed to __init__ method. And, then we filter ignore from it.

Image

We don't need to again filter it (as per your suggestion).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Is an improvement or enhancement good first issue Good for newcomers help wanted Open to be worked on
Projects
None yet
7 participants