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

Added support for neptune logger #8210

Merged
merged 5 commits into from
Jan 23, 2024
Merged

Conversation

harishankar-gopalan
Copy link
Contributor

What does this PR do ?

Adds Neptune logging support to NeMo which is already exposed by the PTL trainer.

Collection: Core, NLP

Changelog

  • In experiment manager, consumed NeptuneLogger parameters from the OmegaConf
  • Added tests for NeptuneLogger
  • Added documentation for NeptuneLogger configuration

Usage

  • Can be directly used by configuring the mentioned keys in the docs under exp_manager similar to how WandB params are specified.
# Add a code snippet demonstrating how to use this 

Jenkins CI

To run Jenkins, a NeMo User with write access must comment jenkins on the PR.

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • New Feature
  • Bugfix
  • Documentation

If you haven't finished some of the above items you can still open "Draft" PR.

Who can review?

Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.

@titu1994

Additional Information

  • Related to # (issue)

@github-actions github-actions bot added core Changes to NeMo Core NLP labels Jan 21, 2024
@@ -195,6 +195,36 @@ def test_trainer_loggers(self, tmp_path):
)
assert isinstance(test_trainer.logger, pl.loggers.WandbLogger)

@pytest.mark.unit
def test_trainer_neptune_logger(self, tmp_path):
pytest.importorskip("neptune", reason="could not import `neptune`, use `pip install neptune` to run this test")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added conditional test case skip if neptune is not installed.

if "api_key" not in neptune_kwargs and not os.getenv("NEPTUNE_API_TOKEN", None):
raise ValueError(
"either api_key should be set in neptune_kwargs or NEPTUNE_API_TOKEN should be set in environment variable for neptune_logger"
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Havent checked for import error here, as PyTorchLightning by default checks for the same within its NeptuneLogger wrapper.

@titu1994
Copy link
Collaborator

jenkins

@harishankar-gopalan
Copy link
Contributor Author

Hi @titu1994 what would be the next process to get this merged to the main trunk ?

@titu1994
Copy link
Collaborator

Could you avoid merging the main branch with this PR, I need to see the tests pass. It is fine if the branch is out of date with the main branch.

@titu1994
Copy link
Collaborator

jenkins

@harishankar-gopalan
Copy link
Contributor Author

harishankar-gopalan commented Jan 23, 2024

jenkins

I guess the automation is completed and all checks have passed.
@titu1994

Copy link
Collaborator

@titu1994 titu1994 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR !

@titu1994 titu1994 merged commit 8abdb25 into NVIDIA:main Jan 23, 2024
11 checks passed
yaoyu-33 pushed a commit that referenced this pull request Jan 31, 2024
* Added support for neptune logger

Signed-off-by: Harishankar G <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixed config indentation in example config

Signed-off-by: Harishankar G <[email protected]>

---------

Signed-off-by: Harishankar G <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
stevehuang52 pushed a commit that referenced this pull request Jan 31, 2024
* Added support for neptune logger

Signed-off-by: Harishankar G <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixed config indentation in example config

Signed-off-by: Harishankar G <[email protected]>

---------

Signed-off-by: Harishankar G <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: stevehuang52 <[email protected]>
ssh-meister pushed a commit to ssh-meister/NeMo that referenced this pull request Feb 15, 2024
* Added support for neptune logger

Signed-off-by: Harishankar G <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixed config indentation in example config

Signed-off-by: Harishankar G <[email protected]>

---------

Signed-off-by: Harishankar G <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: Sasha Meister <[email protected]>
pablo-garay pushed a commit that referenced this pull request Mar 19, 2024
* Added support for neptune logger

Signed-off-by: Harishankar G <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixed config indentation in example config

Signed-off-by: Harishankar G <[email protected]>

---------

Signed-off-by: Harishankar G <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: Pablo Garay <[email protected]>
rohitrango pushed a commit to rohitrango/NeMo that referenced this pull request Jun 25, 2024
* Added support for neptune logger

Signed-off-by: Harishankar G <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixed config indentation in example config

Signed-off-by: Harishankar G <[email protected]>

---------

Signed-off-by: Harishankar G <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Changes to NeMo Core NLP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants