mirror of
https://github.com/k2-fsa/sherpa-onnx.git
synced 2026-11-13 06:20:52 +08:00
Fix non_streaming_server.py crash when using modified_beam_search (#3819)
check_args() referenced args.num_active_paths, but this script defines the flag as --max-active-paths (and consumes args.max_active_paths), so --decoding-method modified_beam_search crashed with AttributeError at startup.
This commit is contained in:
1 parent
4f970063eb
commit
2744aa2cd0
1 file changed
+1
-1
@@ -490,7 +490,7 @@ def check_args(args):
|
||||
raise ValueError(f"Unsupported decoding method {args.decoding_method}")
|
||||
|
||||
if args.decoding_method == "modified_beam_search":
|
||||
assert args.num_active_paths > 0, args.num_active_paths
|
||||
assert args.max_active_paths > 0, args.max_active_paths
|
||||
assert Path(args.encoder).is_file(), args.encoder
|
||||
assert Path(args.decoder).is_file(), args.decoder
|
||||
assert Path(args.joiner).is_file(), args.joiner
|
||||
|
||||
Reference in new issue
Block a user