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

neptune.init deprecation fix #15393

Merged
merged 5 commits into from
Oct 31, 2022
Merged

Conversation

wouterzwerink
Copy link
Contributor

@wouterzwerink wouterzwerink commented Oct 28, 2022

What does this PR do?

neptune.init is deprecated. Support will end in neptune-client==1.0.0. neptune.init_run should be used instead.

Fixes #15394

Does your PR introduce any breaking changes? If yes, please list them.

None

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 list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the 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 🙃

neptune.init is deprecated. Support will end in neptune-client==1.0.0. neptune.init_run should be used instead.
@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Oct 28, 2022
@awaelchli awaelchli added logger: neptune bug Something isn't working labels Oct 28, 2022
@awaelchli awaelchli added this to the v1.8.x milestone Oct 28, 2022
@awaelchli
Copy link
Contributor

@wouterzwerink This is a great start, thanks for providing the fix for this. Two more things we need to do:

  • Find the version in which init got deprecated. In NeptuneLogger, conditionally use init or init_run depending on whether the installed version is greater or smaller than that.
  • We would need to update the init references in tests in tests/tests_pytorch/loggers/test_neptune.py

We can of course help with these items.

wouterzwerink and others added 2 commits October 31, 2022 11:00
neptune.new.init is deprecated, neptune.new.init_run should be
used instead. This commit updates the test files to of the
NeptuneLogger to use init_run.
@wouterzwerink
Copy link
Contributor Author

@awaelchli I have updated the references to init in the test files.
neptune-client has marked init as deprecated since neptune-client 0.16.10. However, it seems unnecessary to conditionally use init or init_run, since init_run has been supported (and preferred) since the switch from legacy neptune to neptune.new. It looks to me like lightning does not support the legacy neptune API, so init_run should always work.

@awaelchli
Copy link
Contributor

@wouterzwerink That's really good news. Thanks for checking!

@awaelchli awaelchli added the community This PR is from the community label Oct 31, 2022
@awaelchli awaelchli self-assigned this Oct 31, 2022
@mergify mergify bot added the ready PRs ready to be merged label Oct 31, 2022
@awaelchli awaelchli merged commit c287b5d into Lightning-AI:master Oct 31, 2022
@carmocca carmocca modified the milestones: v1.8.x, v1.8 Oct 31, 2022
@wouterzwerink wouterzwerink deleted the patch-1 branch November 2, 2022 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community This PR is from the community logger: neptune pl Generic label for PyTorch Lightning package ready PRs ready to be merged
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

NeptuneDeprecationWarning for neptune.init in NeptuneLogger
3 participants