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 ckpt conversion bug #2399

Merged
merged 2 commits into from
Mar 13, 2024
Merged

Conversation

zhr1201
Copy link
Contributor

@zhr1201 zhr1201 commented Mar 11, 2024

A bug was introduced in #2381, basically it will skip copying all the weight if remove_list is empty.

default="",
type=str,
help='dict of name adder, e.g."{\"key1\": \"value1\"}"')
parser.add_argument(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

yapf was complaining

@@ -39,18 +41,22 @@ def main():

state = torch.load(args.input_ckpt, map_location="cpu")
new_state = {}

if args.remove_list:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

it skips cloning the weight if remove_list is empty

@@ -175,7 +175,7 @@ def ctc_prefix_beam_search(
next_score1.ns = log_add(next_score1.ns,
prefix_score.ns + prob)
if next_score1.v_ns < prefix_score.v_ns + prob:
next_score1.vs_ns = prefix_score.v_ns + prob
next_score1.v_ns = prefix_score.v_ns + prob
Copy link
Contributor Author

Choose a reason for hiding this comment

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

typo

@zhr1201 zhr1201 marked this pull request as draft March 11, 2024 02:54
@zhr1201 zhr1201 marked this pull request as ready for review March 11, 2024 03:15
@zhr1201
Copy link
Contributor Author

zhr1201 commented Mar 11, 2024

there seems to be a clang format version mismatch in pre commit hook and github workflow

@xingchensong
Copy link
Member

xingchensong commented Mar 11, 2024

  1. modification of wenet/transformer/search.py is duplicated with [ctc] Update search.py #2398
  2. please run pre-commit run --all-files for examples/aishell/whisper/local/modify_ckpt.py

@zhr1201
Copy link
Contributor Author

zhr1201 commented Mar 12, 2024

pulled in the version fix from main

Copy link
Member

@xingchensong xingchensong left a comment

Choose a reason for hiding this comment

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

thx

@xingchensong xingchensong merged commit c8084ef into wenet-e2e:main Mar 13, 2024
5 checks passed
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.

2 participants