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

Fix: Data from AIStore #11241

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Fix: Data from AIStore #11241

wants to merge 9 commits into from

Conversation

monica-sekoyan
Copy link
Collaborator

What does this PR do ?

Changing path patterns to also take into account paths starting with s3:// and adding cache manifests for NeMoLazyIterator.

Collection: common

Changelog

  • Add specific line by line info of high level changes in this PR.

Usage

  • You can potentially add a usage example below
# Add a code snippet demonstrating how to use this 

GitHub Actions CI

The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.

The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
To re-run CI remove and add the label again.
To run CI on an untrusted fork, a NeMo user with write access must first click "Approve and run".

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.

Additional Information

  • Related to # (issue)

Signed-off-by: monica-sekoyan <[email protected]>
@github-actions github-actions bot added the core Changes to NeMo Core label Nov 13, 2024
@@ -902,17 +902,15 @@ def setup(self, stage: Optional[str] = None):
if stage in ('fit', 'validate'):
val_deferred_setup = (
'validation_ds' in self._cfg
and self._cfg.validation_ds is not None
and not self._cfg.validation_ds
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need this change? the change not self._cfg.validation_ds seems to be the opposite of the previous self._cfg.validation_ds is not None

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh, sorry, the condition should be changed for self.test_dataloader(), as it is not None but [], corrected now

'test_ds' in self._cfg
and self._cfg.test_ds is not None
and self._cfg.test_ds.get('defer_setup', False)
'test_ds' in self._cfg and not self._cfg.test_ds and self._cfg.test_ds.get('defer_setup', False)

Choose a reason for hiding this comment

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

Same issue as @stevehuang52 raised above

@@ -70,8 +68,7 @@ def is_datastore_cache_shared() -> bool:


def ais_cache_base() -> str:
"""Return path to local cache for AIS.
"""
"""Return path to local cache for AIS."""

Choose a reason for hiding this comment

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

nit: lots of formatting changes that I'm not sure if necessary

Copy link
Contributor

beep boop 🤖: 🙏 The following files have warnings. In case you are familiar with these, please try helping us to improve the code base.


Your code was analyzed with PyLint. The following annotations have been identified:

************* Module nemo.collections.common.data.lhotse.nemo_adapters
nemo/collections/common/data/lhotse/nemo_adapters.py:49:0: C0301: Line too long (124/119) (line-too-long)
nemo/collections/common/data/lhotse/nemo_adapters.py:279:0: C0301: Line too long (125/119) (line-too-long)
nemo/collections/common/data/lhotse/nemo_adapters.py:280:0: C0301: Line too long (133/119) (line-too-long)
nemo/collections/common/data/lhotse/nemo_adapters.py:349:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/common/data/lhotse/nemo_adapters.py:484:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/common/data/lhotse/nemo_adapters.py:488:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/common/data/lhotse/nemo_adapters.py:497:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/common/data/lhotse/nemo_adapters.py:502:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/common/data/lhotse/nemo_adapters.py:506:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/common/data/lhotse/nemo_adapters.py:510:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/common/data/lhotse/nemo_adapters.py:532:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/common/data/lhotse/nemo_adapters.py:554:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/common/data/lhotse/nemo_adapters.py:576:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/common/data/lhotse/nemo_adapters.py:586:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/common/data/lhotse/nemo_adapters.py:24:0: W0611: Unused import lhotse.serialization (unused-import)
************* Module nemo.core.classes.modelPT
nemo/core/classes/modelPT.py:82:0: C0301: Line too long (130/119) (line-too-long)
nemo/core/classes/modelPT.py:177:0: C0301: Line too long (121/119) (line-too-long)
nemo/core/classes/modelPT.py:184:0: C0301: Line too long (154/119) (line-too-long)
nemo/core/classes/modelPT.py:252:0: C0301: Line too long (131/119) (line-too-long)
nemo/core/classes/modelPT.py:256:0: C0301: Line too long (132/119) (line-too-long)
nemo/core/classes/modelPT.py:304:0: C0301: Line too long (160/119) (line-too-long)
nemo/core/classes/modelPT.py:384:0: C0301: Line too long (135/119) (line-too-long)
nemo/core/classes/modelPT.py:1226:0: C0301: Line too long (123/119) (line-too-long)
nemo/core/classes/modelPT.py:1463:0: C0301: Line too long (140/119) (line-too-long)
nemo/core/classes/modelPT.py:1674:0: C0301: Line too long (128/119) (line-too-long)
nemo/core/classes/modelPT.py:1693:0: C0301: Line too long (135/119) (line-too-long)
nemo/core/classes/modelPT.py:1703:0: C0301: Line too long (122/119) (line-too-long)
nemo/core/classes/modelPT.py:1757:0: C0301: Line too long (166/119) (line-too-long)
nemo/core/classes/modelPT.py:1826:0: C0301: Line too long (120/119) (line-too-long)
nemo/core/classes/modelPT.py:1957:0: C0301: Line too long (151/119) (line-too-long)
nemo/core/classes/modelPT.py:217:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/core/classes/modelPT.py:863:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/core/classes/modelPT.py:920:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/core/classes/modelPT.py:924:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/core/classes/modelPT.py:931:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/core/classes/modelPT.py:1199:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/core/classes/modelPT.py:1623:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/core/classes/modelPT.py:1741:4: C0116: Missing function or method docstring (missing-function-docstring)

-----------------------------------
Your code has been rated at 9.66/10

Thank you for improving NeMo's documentation!

@monica-sekoyan monica-sekoyan marked this pull request as ready for review November 13, 2024 11:44
@@ -92,6 +92,8 @@ def __init__(
self.shuffle_shards = shuffle_shards
self.shard_seed = shard_seed
paths = expand_sharded_filepaths(path)
cache_datastore_manifests(paths)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this necessary? Wondering since this is not in LazyNeMoTarredIterator, and that lhotse should be able to automatically fetch and cache the data? @pzelasko what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common core Changes to NeMo Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants