Skip to content

Commit b74c654

Browse files
committed
fix: Always assign the (possibly to None) lm_gc property
1 parent a68265c commit b74c654

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

recognition/advanced_tree_search.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ def specialize_lm_config(crp, lm_config):
313313
).out_lm
314314
for i, lm in enumerate(arpa_lms)
315315
}
316+
lm_gc = None
316317
else:
317318
lm_gc = AdvancedTreeSearchLmImageAndGlobalCacheJob(
318319
crp, lmgc_scorer if lmgc_scorer is not None else feature_scorer, extra_config, extra_post_config
@@ -463,11 +464,11 @@ def specialize_lm_config(crp, lm_config):
463464
config._update(extra_config)
464465
post_config._update(extra_post_config)
465466

466-
return config, post_config
467+
return config, post_config, lm_gc
467468

468469
@classmethod
469470
def hash(cls, kwargs):
470-
config, post_config = cls.create_config(**kwargs)
471+
config, post_config, lm_gc = cls.create_config(**kwargs)
471472
return super().hash(
472473
{
473474
"config": config,

0 commit comments

Comments
 (0)