Skip to content

Conversation

@kaushikb11
Copy link
Contributor

What does this PR do?

Add ignore param to save_hyperparameters

Fixes #6003

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

Make sure you had fun coding 🙃

@kaushikb11 kaushikb11 added the feature Is an improvement or enhancement label Feb 18, 2021
@codecov
Copy link

codecov bot commented Feb 18, 2021

Codecov Report

Merging #6056 (4d4d735) into master (0456b45) will decrease coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff           @@
##           master   #6056   +/-   ##
======================================
- Coverage      91%     91%   -0%     
======================================
  Files         160     160           
  Lines       11423   11430    +7     
======================================
- Hits        10434   10412   -22     
- Misses        989    1018   +29     

Borda
Borda previously requested changes Feb 18, 2021
ignore = [ignore]
if isinstance(ignore, list):
ignore = [arg for arg in ignore if isinstance(arg, str)]
init_args = {k: v for k, v in init_args.items() if k not in ignore}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about if ignore=None from default?

1 not in None <- TypeError: argument of type 'NoneType' is not iterable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Borda: I am doing a check for if ignore, if it's None, init_args won't be changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And also the other tests will fail, as the default is None :)

@pep8speaks
Copy link

pep8speaks commented Feb 18, 2021

Hello @kaushikb11! Thanks for updating this PR.

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-02-22 11:07:25 UTC

@kaushikb11 kaushikb11 requested a review from Borda February 18, 2021 15:44
@Borda Borda requested a review from SkafteNicki February 18, 2021 20:06
@rohitgr7 rohitgr7 mentioned this pull request Feb 18, 2021
11 tasks
@kaushikb11
Copy link
Contributor Author

@Borda Your requested change.

@mergify mergify bot removed the has conflicts label Feb 22, 2021
Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !

@kaushikb11 kaushikb11 added the ready PRs ready to be merged label Mar 2, 2021
@Borda Borda enabled auto-merge (squash) March 4, 2021 19:02
@Borda Borda dismissed their stale review March 4, 2021 19:02

...

@Borda Borda merged commit 59acf57 into Lightning-AI:master Mar 4, 2021
@Borda Borda requested a review from awaelchli March 4, 2021 19:02
@tchaton tchaton added this to the 1.3 milestone Mar 8, 2021
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 ready PRs ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ignore param to save_hyperparameters

8 participants