From ceeb95bcb8c12e5047be7f12440296bd9532c0e3 Mon Sep 17 00:00:00 2001 From: Zengwei Yao Date: Wed, 6 Apr 2022 11:55:29 +0800 Subject: [PATCH] update icefall/__init__.py to import more common functions. (#294) --- icefall/__init__.py | 31 +++++++++++++++++++++++++++++++ pyproject.toml | 1 + 2 files changed, 32 insertions(+) diff --git a/icefall/__init__.py b/icefall/__init__.py index 983539d6f..f466d6a62 100644 --- a/icefall/__init__.py +++ b/icefall/__init__.py @@ -1,3 +1,34 @@ +from .checkpoint import ( + average_checkpoints, + find_checkpoints, + load_checkpoint, + remove_checkpoints, + save_checkpoint, + save_checkpoint_with_global_batch_idx, +) + +from .decode import ( + get_lattice, + nbest_decoding, + nbest_oracle, + one_best_decoding, + rescore_with_attention_decoder, + rescore_with_n_best_list, + rescore_with_whole_lattice, +) + +from .dist import ( + cleanup_dist, + setup_dist, +) + +from .env import ( + get_env_info, + get_git_branch_name, + get_git_date, + get_git_sha1, +) + from .utils import ( AttributeDict, MetricsTracker, diff --git a/pyproject.toml b/pyproject.toml index 01ff869db..ec5623f90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,6 @@ [tool.isort] profile = "black" +skip = ["icefall/__init__.py"] [tool.black] line-length = 80