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 Canary not stripping prompt from reference + more test coverage #9987

Merged
merged 6 commits into from
Aug 1, 2024

Conversation

pzelasko
Copy link
Collaborator

What does this PR do ?

TL;DR: fix for a bug I accidentally introduced in #9901

Context:

Collection: ASR

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)

… coverage

Signed-off-by: Piotr Żelasko <petezor@gmail.com>
Signed-off-by: Piotr Żelasko <petezor@gmail.com>
Signed-off-by: Piotr Żelasko <petezor@gmail.com>
Copy link
Contributor

@bonham79 bonham79 left a comment

Choose a reason for hiding this comment

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

Left comments, also for sanity checking, can you run a toy model against a stable release and this branch just to ensure nothing pops up?

@github-actions github-actions bot added the ASR label Jul 31, 2024
Signed-off-by: Piotr Żelasko <petezor@gmail.com>
from torch import nn as nn

from nemo.collections.asr.parts.submodules.classifier import Classifier
from nemo.collections.common.parts import MultiLayerPerceptron
from nemo.core.classes import typecheck
from nemo.core.neural_types import LogitsType, LogprobsType, NeuralType
from nemo.core.neural_types import ChannelType, FloatType, LogitsType, LogprobsType, NeuralType

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'FloatType' is not used.
@@ -75,6 +85,7 @@ def _one_step_forward(
encoder_input_mask=None,
decoder_mems_list=None,
pos=0,
need_scores: bool = True,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we change the variable to return_scores to be consistent with other commands like this?

tbartley94
tbartley94 previously approved these changes Jul 31, 2024
Copy link
Collaborator

@tbartley94 tbartley94 left a comment

Choose a reason for hiding this comment

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

One name change, fix import flags from the CI.

Btw, how are you feeding temperature to the MLP now?

@pzelasko
Copy link
Collaborator Author

One name change, fix import flags from the CI.

OK

Btw, how are you feeding temperature to the MLP now?

It's applied directly in Categorical

Signed-off-by: Piotr Żelasko <petezor@gmail.com>
Signed-off-by: Piotr Żelasko <petezor@gmail.com>
@pzelasko pzelasko merged commit 876c851 into main Aug 1, 2024
223 checks passed
@pzelasko pzelasko deleted the fix-canary-validation branch August 1, 2024 02:03
adityavavre pushed a commit to adityavavre/NeMo that referenced this pull request Sep 15, 2024
…VIDIA#9987)

* Fix not stripping Canary prompt from the reference and add extra test coverage

Signed-off-by: Piotr Żelasko <petezor@gmail.com>

* Fix transcripts for Canary containing EOS

Signed-off-by: Piotr Żelasko <petezor@gmail.com>

* Fix validation_pass

Signed-off-by: Piotr Żelasko <petezor@gmail.com>

* Review

Signed-off-by: Piotr Żelasko <petezor@gmail.com>

* Revie 2

Signed-off-by: Piotr Żelasko <petezor@gmail.com>

* Fix non-deterministic unit test assertions

Signed-off-by: Piotr Żelasko <petezor@gmail.com>

---------

Signed-off-by: Piotr Żelasko <petezor@gmail.com>
Signed-off-by: adityavavre <aditya.vavre@gmail.com>
monica-sekoyan pushed a commit that referenced this pull request Oct 14, 2024
…9987)

* Fix not stripping Canary prompt from the reference and add extra test coverage

Signed-off-by: Piotr Żelasko <petezor@gmail.com>

* Fix transcripts for Canary containing EOS

Signed-off-by: Piotr Żelasko <petezor@gmail.com>

* Fix validation_pass

Signed-off-by: Piotr Żelasko <petezor@gmail.com>

* Review

Signed-off-by: Piotr Żelasko <petezor@gmail.com>

* Revie 2

Signed-off-by: Piotr Żelasko <petezor@gmail.com>

* Fix non-deterministic unit test assertions

Signed-off-by: Piotr Żelasko <petezor@gmail.com>

---------

Signed-off-by: Piotr Żelasko <petezor@gmail.com>
hainan-xv pushed a commit to hainan-xv/NeMo that referenced this pull request Nov 5, 2024
…VIDIA#9987)

* Fix not stripping Canary prompt from the reference and add extra test coverage

Signed-off-by: Piotr Żelasko <petezor@gmail.com>

* Fix transcripts for Canary containing EOS

Signed-off-by: Piotr Żelasko <petezor@gmail.com>

* Fix validation_pass

Signed-off-by: Piotr Żelasko <petezor@gmail.com>

* Review

Signed-off-by: Piotr Żelasko <petezor@gmail.com>

* Revie 2

Signed-off-by: Piotr Żelasko <petezor@gmail.com>

* Fix non-deterministic unit test assertions

Signed-off-by: Piotr Żelasko <petezor@gmail.com>

---------

Signed-off-by: Piotr Żelasko <petezor@gmail.com>
Signed-off-by: Hainan Xu <hainanx@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants