Skip to content

Conversation

ekmb
Copy link
Collaborator

@ekmb ekmb commented Jul 19, 2024

What does this PR do ?

Add a one line overview of what this PR aims to accomplish.

Before your PR is "Ready for review"

Pre checks:

  • Have you signed your commits? Use git commit -s to sign.
  • Do all unittests finish successfully before sending PR?
    1. pytest or (if your machine does not have GPU) pytest --cpu from the root folder (given you marked your test cases accordingly @pytest.mark.run_only_on('CPU')).
    2. Sparrowhawk tests bash tools/text_processing_deployment/export_grammars.sh --MODE=test ...
  • If you are adding a new feature: Have you added test cases for both pytest and Sparrowhawk here.
  • Have you added __init__.py for every folder and subfolder, including data folder which has .TSV files?
  • Have you followed codeQL results and removed unused variables and imports (report is at the bottom of the PR in github review box) ?
  • Have you added the correct license header Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. to all newly added Python files?
  • If you copied nemo_text_processing/text_normalization/en/graph_utils.py your header's second line should be Copyright 2015 and onwards Google, Inc.. See an example here.
  • Remove import guards (try import: ... except: ...) if not already done.
  • If you added a new language or a new feature please update the NeMo documentation (lives in different repo).
  • Have you added your language support to tools/text_processing_deployment/pynini_export.py.

PR Type:

  • New Feature
  • Bugfix
  • Documentation
  • Test

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

Signed-off-by: Evelina <ebakhturina@nvidia.com>
Comment on lines 161 to 173
# try:
# test_data_local_size = getsize(test_data_archive)
# except:
# # File does not exist.
# test_data_local_size = -1

# if config.option.use_local_test_data:
# if test_data_local_size == -1:
# pytest.exit("Test data `{}` is not present in the system".format(test_data_archive))
# else:
# print(
# "Using the local `{}` test archive ({}B) found in the `{}` folder.".format(
# __TEST_DATA_FILENAME, test_data_local_size, test_dir

Check notice

Code scanning / CodeQL

Commented-out code Note test

This comment appears to contain commented-out code.
Comment on lines 179 to 190
# if not config.option.use_local_test_data:
# try:
# url = __TEST_DATA_URL + __TEST_DATA_FILENAME
# u = urllib.request.urlopen(url)
# except:
# # Couldn't access remote archive.
# if test_data_local_size == -1:
# pytest.exit("Test data not present in the system and cannot access the '{}' URL".format(url))
# else:
# print(
# "Cannot access the '{}' URL, using the test data ({}B) found in the `{}` folder.".format(
# url, test_data_local_size, test_dir

Check notice

Code scanning / CodeQL

Commented-out code Note test

This comment appears to contain commented-out code.
Comment on lines 200 to 201
# if test_data_local_size != test_data_remote_size:
# print(

Check notice

Code scanning / CodeQL

Commented-out code Note test

This comment appears to contain commented-out code.
Comment on lines 209 to 212
# else:
# print(
# "A valid `{}` test archive ({}B) found in the `{}` folder.".format(
# __TEST_DATA_FILENAME, test_data_local_size, test_dir

Check notice

Code scanning / CodeQL

Commented-out code Note test

This comment appears to contain commented-out code.
Comment on lines 216 to 218
# else:
# # untar local test data
# extract_data_from_tar(test_dir, test_data_archive, local_data=config.option.use_local_test_data)

Check notice

Code scanning / CodeQL

Commented-out code Note test

This comment appears to contain commented-out code.
Signed-off-by: Evelina <ebakhturina@nvidia.com>
ekmb added 3 commits July 18, 2024 23:39
Signed-off-by: Evelina <ebakhturina@nvidia.com>
Signed-off-by: Evelina <ebakhturina@nvidia.com>
Signed-off-by: Evelina <ebakhturina@nvidia.com>
@ekmb ekmb closed this Jul 24, 2024
@ekmb ekmb deleted the restarat_ci branch July 24, 2024 15:25
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.

1 participant