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

Add dummy logger for internally disabling logging for some features #1836

Conversation

SkafteNicki
Copy link
Member

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

What does this PR do?

Fixes #1828 and #1830
Make sure that users code can run during tuner algorithms (learning rate finder and batch scaler) when they call loggers directly in their code.

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@mergify mergify bot requested a review from a team May 14, 2020 13:54
@williamFalcon
Copy link
Contributor

williamFalcon commented May 14, 2020

awesome!
in the case where i did this:

self.logger.experiment.add_image('images', grid, 0)

would the no-op still let any arbitrary function work like add_image since it's not defined? we basically need a way to allow any call here no?

I assume that's what this is doing?

class DummyExperiment(object):
    """ Dummy experiment """
    def nop(*args, **kw):
        pass

    def __getattr__(self, _):
        return self.nop

@williamFalcon
Copy link
Contributor

Never mind lol... answered myself haha.

Well done!

image

@williamFalcon williamFalcon merged commit 88f816e into Lightning-AI:master May 14, 2020
@SkafteNicki SkafteNicki deleted the bugfix/logger_for_tuner_algoritms branch June 15, 2020 14:32
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

Successfully merging this pull request may close these issues.

Automatic batch-size scaling is missing properties
2 participants