Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 3, 2023
1 parent 764652a commit 3adddd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 1 addition & 3 deletions nemo/collections/asr/parts/submodules/ctc_greedy_decoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,7 @@ class GreedyCTCInferConfig:
preserve_alignments: bool = False
compute_timestamps: bool = False
preserve_frame_confidence: bool = False
confidence_measure_cfg: Optional[ConfidenceMethodConfig] = field(
default_factory=lambda: ConfidenceMethodConfig()
)
confidence_measure_cfg: Optional[ConfidenceMethodConfig] = field(default_factory=lambda: ConfidenceMethodConfig())

Check notice

Code scanning / CodeQL

Unnecessary lambda Note

This 'lambda' is just a simple wrapper around a callable object. Use that object directly.
confidence_method_cfg: str = "DEPRECATED"

def __post_init__(self):
Expand Down
8 changes: 2 additions & 6 deletions nemo/collections/asr/parts/submodules/rnnt_greedy_decoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -2185,9 +2185,7 @@ class GreedyRNNTInferConfig:
max_symbols_per_step: Optional[int] = 10
preserve_alignments: bool = False
preserve_frame_confidence: bool = False
confidence_measure_cfg: Optional[ConfidenceMethodConfig] = field(
default_factory=lambda: ConfidenceMethodConfig()
)
confidence_measure_cfg: Optional[ConfidenceMethodConfig] = field(default_factory=lambda: ConfidenceMethodConfig())

Check notice

Code scanning / CodeQL

Unnecessary lambda Note

This 'lambda' is just a simple wrapper around a callable object. Use that object directly.
confidence_method_cfg: str = "DEPRECATED"

def __post_init__(self):
Expand All @@ -2204,9 +2202,7 @@ class GreedyBatchedRNNTInferConfig:
max_symbols_per_step: Optional[int] = 10
preserve_alignments: bool = False
preserve_frame_confidence: bool = False
confidence_measure_cfg: Optional[ConfidenceMethodConfig] = field(
default_factory=lambda: ConfidenceMethodConfig()
)
confidence_measure_cfg: Optional[ConfidenceMethodConfig] = field(default_factory=lambda: ConfidenceMethodConfig())

Check notice

Code scanning / CodeQL

Unnecessary lambda Note

This 'lambda' is just a simple wrapper around a callable object. Use that object directly.
confidence_method_cfg: str = "DEPRECATED"

def __post_init__(self):
Expand Down

0 comments on commit 3adddd2

Please sign in to comment.